From 609f1756c7e915d6c09df9e42807155cac9538fc Mon Sep 17 00:00:00 2001 From: Matthias Kretschmar Date: Mon, 18 Sep 2017 08:29:58 +0200 Subject: [PATCH 1/2] Added minArea to DragBoxOptions (https://openlayers.org/en/latest/apidoc/ol.interaction.DragBox.html) --- types/openlayers/index.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index bd3a90a3c9..351146d884 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -12436,11 +12436,13 @@ declare module olx { /** * @typedef {{className: (string|undefined), * condition: (ol.EventsConditionType|undefined), + * minArea: (number|undefined), * boxEndCondition: (ol.DragBoxEndConditionType|undefined)}} */ interface DragBoxOptions { className?: string; condition?: ol.EventsConditionType; + minArea?: number; boxEndCondition?: ol.DragBoxEndConditionType; } From fa5cd1965765528bc25e8f563c22eda72341dd5c Mon Sep 17 00:00:00 2001 From: Matthias Kretschmar Date: Mon, 18 Sep 2017 09:39:52 +0200 Subject: [PATCH 2/2] added minArea to test --- types/openlayers/openlayers-tests.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 78cd6fb556..3ebea5f095 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -695,6 +695,7 @@ draw = new ol.interaction.Draw({ let dragbox: ol.interaction.DragBox = new ol.interaction.DragBox({ className: stringValue, + minArea: 10, condition: ol.events.condition.always, boxEndCondition: function (mapBrowserEvent: ol.MapBrowserEvent, startPixel: ol.Pixel, endPixel: ol.Pixel) { let width: number = endPixel[0] - startPixel[0];