Fix option property in ol.interaction.KeyboardPan

This commit is contained in:
Tom Payne
2014-01-29 20:39:29 +01:00
parent c8999a5e52
commit 7516aab1ca

View File

@@ -45,7 +45,7 @@ ol.interaction.KeyboardPan = function(opt_options) {
* @private
* @type {number}
*/
this.delta_ = goog.isDef(options.delta) ? options.delta : 128;
this.pixelDelta_ = goog.isDef(options.pixelDelta) ? options.pixelDelta : 128;
};
goog.inherits(ol.interaction.KeyboardPan, ol.interaction.Interaction);
@@ -71,7 +71,7 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
var view = map.getView();
goog.asserts.assertInstanceof(view, ol.View2D);
var view2DState = view.getView2DState();
var mapUnitsDelta = view2DState.resolution * this.delta_;
var mapUnitsDelta = view2DState.resolution * this.pixelDelta_;
var deltaX = 0, deltaY = 0;
if (keyCode == goog.events.KeyCodes.DOWN) {
deltaY = -mapUnitsDelta;