small fix - context was not correctly set to get the slide factor
git-svn-id: http://svn.openlayers.org/trunk/openlayers@648 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -23,7 +23,7 @@ OpenLayers.Control.KeyboardDefaults.prototype =
|
||||
draw: function() {
|
||||
Event.observe(document,
|
||||
'keypress',
|
||||
this.defaultKeyDown.bind(this.map));
|
||||
this.defaultKeyDown.bind(this));
|
||||
},
|
||||
|
||||
/**
|
||||
@@ -31,8 +31,8 @@ OpenLayers.Control.KeyboardDefaults.prototype =
|
||||
*/
|
||||
defaultKeyDown: function (evt) {
|
||||
|
||||
var slide = this.getResolution() * this.slideFactor;
|
||||
var center = this.getCenter();
|
||||
var slide = this.map.getResolution() * this.slideFactor;
|
||||
var center = this.map.getCenter();
|
||||
|
||||
var newCenter = center.copyOf();
|
||||
|
||||
@@ -52,7 +52,7 @@ OpenLayers.Control.KeyboardDefaults.prototype =
|
||||
}
|
||||
|
||||
if (!newCenter.equals(center)) {
|
||||
this.setCenter(newCenter);
|
||||
this.map.setCenter(newCenter);
|
||||
Event.stop(evt);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user