Rename _ol_interaction_KeyboardPan_ to KeyboardPan

This commit is contained in:
Frederic Junod
2018-01-11 13:51:59 +01:00
parent cb46dd2dbd
commit c6104b7860
2 changed files with 7 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ import DoubleClickZoom from './interaction/DoubleClickZoom.js';
import DragPan from './interaction/DragPan.js';
import DragRotate from './interaction/DragRotate.js';
import DragZoom from './interaction/DragZoom.js';
import _ol_interaction_KeyboardPan_ from './interaction/KeyboardPan.js';
import KeyboardPan from './interaction/KeyboardPan.js';
import _ol_interaction_KeyboardZoom_ from './interaction/KeyboardZoom.js';
import MouseWheelZoom from './interaction/MouseWheelZoom.js';
import PinchRotate from './interaction/PinchRotate.js';
@@ -83,7 +83,7 @@ export function defaults(opt_options) {
var keyboard = options.keyboard !== undefined ? options.keyboard : true;
if (keyboard) {
interactions.push(new _ol_interaction_KeyboardPan_());
interactions.push(new KeyboardPan());
interactions.push(new _ol_interaction_KeyboardZoom_({
delta: options.zoomDelta,
duration: options.zoomDuration

View File

@@ -25,10 +25,10 @@ import Interaction from '../interaction/Interaction.js';
* @param {olx.interaction.KeyboardPanOptions=} opt_options Options.
* @api
*/
var _ol_interaction_KeyboardPan_ = function(opt_options) {
var KeyboardPan = function(opt_options) {
Interaction.call(this, {
handleEvent: _ol_interaction_KeyboardPan_.handleEvent
handleEvent: KeyboardPan.handleEvent
});
var options = opt_options || {};
@@ -65,7 +65,7 @@ var _ol_interaction_KeyboardPan_ = function(opt_options) {
};
inherits(_ol_interaction_KeyboardPan_, Interaction);
inherits(KeyboardPan, Interaction);
/**
* Handles the {@link ol.MapBrowserEvent map browser event} if it was a
@@ -76,7 +76,7 @@ inherits(_ol_interaction_KeyboardPan_, Interaction);
* @this {ol.interaction.KeyboardPan}
* @api
*/
_ol_interaction_KeyboardPan_.handleEvent = function(mapBrowserEvent) {
KeyboardPan.handleEvent = function(mapBrowserEvent) {
var stopEvent = false;
if (mapBrowserEvent.type == EventType.KEYDOWN) {
var keyEvent = mapBrowserEvent.originalEvent;
@@ -108,4 +108,4 @@ _ol_interaction_KeyboardPan_.handleEvent = function(mapBrowserEvent) {
}
return !stopEvent;
};
export default _ol_interaction_KeyboardPan_;
export default KeyboardPan;