diff --git a/src/objectliterals.jsdoc b/src/objectliterals.jsdoc index 03b42ccef8..d71f39e2df 100644 --- a/src/objectliterals.jsdoc +++ b/src/objectliterals.jsdoc @@ -167,6 +167,8 @@ /** * Interactions for the map. Default is true for all options. * @typedef {Object} ol.interaction.DefaultsOptions + * @property {boolean|undefined} altShiftDragRotate Whether Alt-Shift-drag + * rotate is desired. * @property {boolean|undefined} doubleClickZoom Whether double click zoom is * desired. * @property {boolean|undefined} dragPan Whether drag-pan is desired. diff --git a/src/ol/interaction/interactiondefaults.js b/src/ol/interaction/interactiondefaults.js index 024399f4e0..0ad6ee5e78 100644 --- a/src/ol/interaction/interactiondefaults.js +++ b/src/ol/interaction/interactiondefaults.js @@ -28,9 +28,9 @@ ol.interaction.defaults = function(opt_options, opt_interactions) { var interactions = new ol.Collection(); - var rotate = goog.isDef(options.rotate) ? - options.rotate : true; - if (rotate) { + var altShiftDragRotate = goog.isDef(options.altShiftDragRotate) ? + options.altShiftDragRotate : true; + if (altShiftDragRotate) { interactions.push(new ol.interaction.DragRotate( ol.interaction.condition.altShiftKeysOnly)); } diff --git a/test/spec/ol/map.test.js b/test/spec/ol/map.test.js index 8fea115322..c4d702b284 100644 --- a/test/spec/ol/map.test.js +++ b/test/spec/ol/map.test.js @@ -72,7 +72,7 @@ describe('ol.Map', function() { beforeEach(function() { options = { - rotate: false, + altShiftDragRotate: false, doubleClickZoom: false, dragPan: false, keyboard: false,