[OpenLayers-Commits] r4782 - sandbox/tschaub/wfsv/lib/OpenLayers/Control
commits at openlayers.org
commits at openlayers.org
Wed Oct 3 12:11:23 EDT 2007
Author: tcoulter
Date: 2007-10-03 12:11:19 -0400 (Wed, 03 Oct 2007)
New Revision: 4782
Modified:
sandbox/tschaub/wfsv/lib/OpenLayers/Control/UndoRedo.js
Log:
Edit: The shift key didn't register when pressing Ctrl-Shift-Z.
Modified: sandbox/tschaub/wfsv/lib/OpenLayers/Control/UndoRedo.js
===================================================================
--- sandbox/tschaub/wfsv/lib/OpenLayers/Control/UndoRedo.js 2007-10-03 16:06:48 UTC (rev 4781)
+++ sandbox/tschaub/wfsv/lib/OpenLayers/Control/UndoRedo.js 2007-10-03 16:11:19 UTC (rev 4782)
@@ -74,7 +74,7 @@
keyup: this.handleKeyup
};
this.handler = new OpenLayers.Handler.Keyboard(
- this, keyboardOptions, {keyMask: OpenLayers.Handler.MOD_CTRL}
+ this, keyboardOptions
);
this.undoStack = new Array();
@@ -99,11 +99,11 @@
handleKeydown: function(code) {
evt = this.handler.evt;
- if (code == this.KEY_Z)
+ if (code == this.KEY_Z && evt.ctrlKey == true && evt.shiftKey == false)
{
this.undo();
}
- else if ((code == this.KEY_Y) || (code == this.KEY_Z && evt.ctrlShift == true))
+ else if (evt.ctrlKey == true && ((code == this.KEY_Y) || (code == this.KEY_Z && evt.shiftKey == true)))
{
this.redo();
More information about the Commits
mailing list