Correct property in ol.interaction.DefaultsOptions
This commit is contained in:
@@ -167,6 +167,8 @@
|
|||||||
/**
|
/**
|
||||||
* Interactions for the map. Default is true for all options.
|
* Interactions for the map. Default is true for all options.
|
||||||
* @typedef {Object} ol.interaction.DefaultsOptions
|
* @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
|
* @property {boolean|undefined} doubleClickZoom Whether double click zoom is
|
||||||
* desired.
|
* desired.
|
||||||
* @property {boolean|undefined} dragPan Whether drag-pan is desired.
|
* @property {boolean|undefined} dragPan Whether drag-pan is desired.
|
||||||
|
|||||||
@@ -28,9 +28,9 @@ ol.interaction.defaults = function(opt_options, opt_interactions) {
|
|||||||
|
|
||||||
var interactions = new ol.Collection();
|
var interactions = new ol.Collection();
|
||||||
|
|
||||||
var rotate = goog.isDef(options.rotate) ?
|
var altShiftDragRotate = goog.isDef(options.altShiftDragRotate) ?
|
||||||
options.rotate : true;
|
options.altShiftDragRotate : true;
|
||||||
if (rotate) {
|
if (altShiftDragRotate) {
|
||||||
interactions.push(new ol.interaction.DragRotate(
|
interactions.push(new ol.interaction.DragRotate(
|
||||||
ol.interaction.condition.altShiftKeysOnly));
|
ol.interaction.condition.altShiftKeysOnly));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ describe('ol.Map', function() {
|
|||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
options = {
|
options = {
|
||||||
rotate: false,
|
altShiftDragRotate: false,
|
||||||
doubleClickZoom: false,
|
doubleClickZoom: false,
|
||||||
dragPan: false,
|
dragPan: false,
|
||||||
keyboard: false,
|
keyboard: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user