Skip to content

Commit

Permalink
Revert "Remove DragZoom from default interactions"
Browse files Browse the repository at this point in the history
This reverts commit c2330b9.
  • Loading branch information
tonio committed Jan 3, 2014
1 parent 1142d55 commit 39cf993
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/objectliterals.jsdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
7 changes: 7 additions & 0 deletions src/ol/interaction/interactiondefaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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;

};

0 comments on commit 39cf993

Please sign in to comment.