Ticket #42: keyboard.2.patch
| File keyboard.2.patch, 1.1 kB (added by crschmidt, 2 years ago) |
|---|
-
lib/OpenLayers/Control/KeyboardDefaults.js
old new 28 28 draw: function() { 29 29 OpenLayers.Event.observe(document, 30 30 'keypress', 31 this.defaultKeyDown.bind (this));31 this.defaultKeyDown.bindAsEventListener(this)); 32 32 }, 33 33 34 34 /** … … 48 48 case OpenLayers.Event.KEY_DOWN: 49 49 this.map.pan(0, 50); 50 50 break; 51 case 33: // Page Up 52 this.map.zoomIn(); 53 break; 54 case 34: // Page Down 55 this.map.zoomOut(); 56 break; 51 57 } 58 switch(evt.charCode) { 59 case 43: // + 60 this.map.zoomIn(); 61 break; 62 case 45: // - 63 this.map.zoomOut(); 64 break; 65 } 52 66 }, 53 67 54 68 /** @final @type String */
