Correct property in ol.interaction.DefaultsOptions

This commit is contained in:
Tom Payne
2013-04-22 14:18:33 +02:00
parent baf8cc49a1
commit a4d8e1c4d8
3 changed files with 6 additions and 4 deletions

View File

@@ -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.

View File

@@ -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));
}

View File

@@ -72,7 +72,7 @@ describe('ol.Map', function() {
beforeEach(function() {
options = {
rotate: false,
altShiftDragRotate: false,
doubleClickZoom: false,
dragPan: false,
keyboard: false,