allow user to set the slide factor in keyboarddefauls

git-svn-id: http://svn.openlayers.org/trunk/openlayers@646 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-21 13:09:17 +00:00
parent 1cca9fcde7
commit ee2b60ff6b

View File

@@ -7,6 +7,9 @@ OpenLayers.Control.KeyboardDefaults = Class.create();
OpenLayers.Control.KeyboardDefaults.prototype =
Object.extend( new OpenLayers.Control(), {
/** @type int */
slideFactor: 50,
/**
* @constructor
*/
@@ -28,7 +31,7 @@ OpenLayers.Control.KeyboardDefaults.prototype =
*/
defaultKeyDown: function (evt) {
var slide = this.getResolution() * 50;
var slide = this.getResolution() * this.slideFactor;
var center = this.getCenter();
var newCenter = center.copyOf();