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.
|
||||
* @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.
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('ol.Map', function() {
|
||||
|
||||
beforeEach(function() {
|
||||
options = {
|
||||
rotate: false,
|
||||
altShiftDragRotate: false,
|
||||
doubleClickZoom: false,
|
||||
dragPan: false,
|
||||
keyboard: false,
|
||||
|
||||
Reference in New Issue
Block a user