Use Alt key instead of Shift for rotation
This commit is contained in:
@@ -6,6 +6,7 @@ goog.require('ol.Collection');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.MapProperty');
|
||||
goog.require('ol.Projection');
|
||||
goog.require('ol.control.AltDragRotate');
|
||||
goog.require('ol.control.CenterConstraint');
|
||||
goog.require('ol.control.Constraints');
|
||||
goog.require('ol.control.DblClickZoom');
|
||||
@@ -15,7 +16,6 @@ goog.require('ol.control.KeyboardZoom');
|
||||
goog.require('ol.control.MouseWheelZoom');
|
||||
goog.require('ol.control.ResolutionConstraint');
|
||||
goog.require('ol.control.RotationConstraint');
|
||||
goog.require('ol.control.ShiftDragRotate');
|
||||
goog.require('ol.control.ShiftDragZoom');
|
||||
goog.require('ol.dom');
|
||||
goog.require('ol.dom.Map');
|
||||
@@ -89,12 +89,12 @@ ol.createMap = function(target, opt_values, opt_rendererHints) {
|
||||
|
||||
if (!goog.object.containsKey(values, ol.MapProperty.CONTROLS)) {
|
||||
var controls = new ol.Collection();
|
||||
controls.push(new ol.control.AltDragRotate(constraints));
|
||||
controls.push(new ol.control.DblClickZoom(constraints));
|
||||
controls.push(new ol.control.DragPan(constraints));
|
||||
controls.push(new ol.control.KeyboardPan(constraints, 16));
|
||||
controls.push(new ol.control.KeyboardZoom(constraints));
|
||||
controls.push(new ol.control.MouseWheelZoom(constraints));
|
||||
controls.push(new ol.control.ShiftDragRotate(constraints));
|
||||
controls.push(new ol.control.ShiftDragZoom(constraints));
|
||||
values[ol.MapProperty.CONTROLS] = controls;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user