Split TouchRotateAndZoom interaction.
Split TouchRotateAndZoom interaction into two new interaction: TouchRotate and TouchZoom.
This commit is contained in:
@@ -55,7 +55,8 @@ goog.require('ol.interaction.KeyboardPan');
|
||||
goog.require('ol.interaction.KeyboardZoom');
|
||||
goog.require('ol.interaction.MouseWheelZoom');
|
||||
goog.require('ol.interaction.TouchPan');
|
||||
goog.require('ol.interaction.TouchRotateAndZoom');
|
||||
goog.require('ol.interaction.TouchRotate');
|
||||
goog.require('ol.interaction.TouchZoom');
|
||||
goog.require('ol.interaction.condition');
|
||||
goog.require('ol.layer.Layer');
|
||||
goog.require('ol.renderer.Map');
|
||||
@@ -967,10 +968,16 @@ ol.Map.createInteractions_ = function(mapOptions) {
|
||||
interactions.push(new ol.interaction.TouchPan());
|
||||
}
|
||||
|
||||
var touchRotateZoom = goog.isDef(mapOptions.touchRotateZoom) ?
|
||||
mapOptions.touchRotateZoom : true;
|
||||
if (touchRotateZoom) {
|
||||
interactions.push(new ol.interaction.TouchRotateAndZoom());
|
||||
var touchRotate = goog.isDef(mapOptions.touchRotate) ?
|
||||
mapOptions.touchRotate : true;
|
||||
if (touchRotate) {
|
||||
interactions.push(new ol.interaction.TouchRotate());
|
||||
}
|
||||
|
||||
var touchZoom = goog.isDef(mapOptions.touchZoom) ?
|
||||
mapOptions.touchZoom : true;
|
||||
if (touchZoom) {
|
||||
interactions.push(new ol.interaction.TouchZoom());
|
||||
}
|
||||
|
||||
var dragPan = goog.isDef(mapOptions.dragPan) ?
|
||||
|
||||
Reference in New Issue
Block a user