Defines in a namespace that can be required
For consistency, all defines are in the ol namespace. If they are to be moved to another namespace, they need to be requireable.
This commit is contained in:
@@ -6,6 +6,7 @@ goog.require('goog.asserts');
|
||||
goog.require('goog.events.KeyCodes');
|
||||
goog.require('goog.events.KeyHandler.EventType');
|
||||
goog.require('goog.functions');
|
||||
goog.require('ol');
|
||||
goog.require('ol.View2D');
|
||||
goog.require('ol.coordinate');
|
||||
goog.require('ol.events.ConditionType');
|
||||
@@ -13,12 +14,6 @@ goog.require('ol.events.condition');
|
||||
goog.require('ol.interaction.Interaction');
|
||||
|
||||
|
||||
/**
|
||||
* @define {number} Pan duration.
|
||||
*/
|
||||
ol.interaction.KEYBOARD_PAN_DURATION = 100;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Allows the user to pan the map using keyboard arrows.
|
||||
@@ -93,7 +88,7 @@ ol.interaction.KeyboardPan.prototype.handleMapBrowserEvent =
|
||||
var delta = [deltaX, deltaY];
|
||||
ol.coordinate.rotate(delta, view2DState.rotation);
|
||||
ol.interaction.Interaction.pan(
|
||||
map, view, delta, ol.interaction.KEYBOARD_PAN_DURATION);
|
||||
map, view, delta, ol.KEYBOARD_PAN_DURATION);
|
||||
mapBrowserEvent.preventDefault();
|
||||
stopEvent = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user