Revert "Remove DragZoom from default interactions"
This reverts commit c2330b9786.
This commit is contained in:
@@ -342,6 +342,8 @@
|
||||
* desired. Default is `true`.
|
||||
* @property {boolean|undefined} mouseWheelZoom Whether mousewheel zoom is
|
||||
* desired. Default is `true`.
|
||||
* @property {boolean|undefined} shiftDragZoom Whether Shift-drag zoom is
|
||||
* desired. Default is `true`.
|
||||
* @property {boolean|undefined} touchPan Whether touch pan is
|
||||
* desired. Default is `true`.
|
||||
* @property {boolean|undefined} touchRotate Whether touch rotate is desired. Default is `true`.
|
||||
|
||||
@@ -5,6 +5,7 @@ goog.require('ol.Kinetic');
|
||||
goog.require('ol.interaction.DoubleClickZoom');
|
||||
goog.require('ol.interaction.DragPan');
|
||||
goog.require('ol.interaction.DragRotate');
|
||||
goog.require('ol.interaction.DragZoom');
|
||||
goog.require('ol.interaction.KeyboardPan');
|
||||
goog.require('ol.interaction.KeyboardZoom');
|
||||
goog.require('ol.interaction.MouseWheelZoom');
|
||||
@@ -98,6 +99,12 @@ ol.interaction.defaults = function(opt_options) {
|
||||
}));
|
||||
}
|
||||
|
||||
var shiftDragZoom = goog.isDef(options.shiftDragZoom) ?
|
||||
options.shiftDragZoom : true;
|
||||
if (shiftDragZoom) {
|
||||
interactions.push(new ol.interaction.DragZoom());
|
||||
}
|
||||
|
||||
return interactions;
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user