From 87d80be9155cf09ff4b2fd63f3bd9077ff72e799 Mon Sep 17 00:00:00 2001 From: Logan BOUNET Date: Wed, 3 Jul 2019 10:29:13 -0400 Subject: [PATCH] Add minArea typedef and ctor prop in DragZoom --- src/ol/interaction/DragZoom.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ol/interaction/DragZoom.js b/src/ol/interaction/DragZoom.js index 4050193eb1..92737648df 100644 --- a/src/ol/interaction/DragZoom.js +++ b/src/ol/interaction/DragZoom.js @@ -17,6 +17,8 @@ import DragBox from './DragBox.js'; * Default is {@link module:ol/events/condition~shiftKeyOnly}. * @property {number} [duration=200] Animation duration in milliseconds. * @property {boolean} [out=false] Use interaction for zooming out. + * @property {number} [minArea=64] The minimum area of the box in pixel, this value is used by the parent default + * `boxEndCondition` function. */ @@ -42,6 +44,7 @@ class DragZoom extends DragBox { super({ condition: condition, className: options.className || 'ol-dragzoom', + minArea: options.minArea, onBoxEnd: onBoxEnd });