add an observeElement option to Handler.Keyboard and Control.KeyboardDefaults to control the DOM element on which key events are observed

This commit is contained in:
Éric Lemoine
2012-01-26 13:11:33 +01:00
parent 2ecec3ddc3
commit c0b02b278a
4 changed files with 95 additions and 27 deletions
+5 -1
View File
@@ -46,7 +46,11 @@
var map = null;
function init(){
var options = {
controls: [new OpenLayers.Control.KeyboardDefaults()]
controls: [
new OpenLayers.Control.KeyboardDefaults({
observeElement: 'map'
})
]
};
map = new OpenLayers.Map('map', options);
var wms = new OpenLayers.Layer.WMS(