Support changing the modification key used to draw the zoomBox, from Jachym
with minor modifications. (Closes #1769) git-svn-id: http://svn.openlayers.org/trunk/openlayers@8285 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -54,6 +54,17 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
*/
|
*/
|
||||||
handleRightClicks: false,
|
handleRightClicks: false,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APIProperty: zoomBoxKeyMask
|
||||||
|
* {Integer} <OpenLayers.Handler> key code of the key, which has to be
|
||||||
|
* pressed, while drawing the zoom box with the mouse on the screen.
|
||||||
|
* You should probably set handleRightClicks to true if you use this
|
||||||
|
* with MOD_CTRL, to disable the context menu for machines which use
|
||||||
|
* CTRL-Click as a right click.
|
||||||
|
* Default: <OpenLayers.Handler.MOD_SHIFT
|
||||||
|
*/
|
||||||
|
zoomBoxKeyMask: OpenLayers.Handler.MOD_SHIFT,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor: OpenLayers.Control.Navigation
|
* Constructor: OpenLayers.Control.Navigation
|
||||||
* Create a new navigation control
|
* Create a new navigation control
|
||||||
@@ -136,7 +147,7 @@ OpenLayers.Control.Navigation = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
OpenLayers.Util.extend({map: this.map}, this.dragPanOptions)
|
OpenLayers.Util.extend({map: this.map}, this.dragPanOptions)
|
||||||
);
|
);
|
||||||
this.zoomBox = new OpenLayers.Control.ZoomBox(
|
this.zoomBox = new OpenLayers.Control.ZoomBox(
|
||||||
{map: this.map, keyMask: OpenLayers.Handler.MOD_SHIFT});
|
{map: this.map, keyMask: this.zoomBoxKeyMask});
|
||||||
this.dragPan.draw();
|
this.dragPan.draw();
|
||||||
this.zoomBox.draw();
|
this.zoomBox.draw();
|
||||||
this.handlers.wheel = new OpenLayers.Handler.MouseWheel(
|
this.handlers.wheel = new OpenLayers.Handler.MouseWheel(
|
||||||
|
|||||||
Reference in New Issue
Block a user