Rename _ol_interaction_KeyboardPan_ to KeyboardPan
This commit is contained in:
@@ -7,7 +7,7 @@ import DoubleClickZoom from './interaction/DoubleClickZoom.js';
|
|||||||
import DragPan from './interaction/DragPan.js';
|
import DragPan from './interaction/DragPan.js';
|
||||||
import DragRotate from './interaction/DragRotate.js';
|
import DragRotate from './interaction/DragRotate.js';
|
||||||
import DragZoom from './interaction/DragZoom.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 _ol_interaction_KeyboardZoom_ from './interaction/KeyboardZoom.js';
|
||||||
import MouseWheelZoom from './interaction/MouseWheelZoom.js';
|
import MouseWheelZoom from './interaction/MouseWheelZoom.js';
|
||||||
import PinchRotate from './interaction/PinchRotate.js';
|
import PinchRotate from './interaction/PinchRotate.js';
|
||||||
@@ -83,7 +83,7 @@ export function defaults(opt_options) {
|
|||||||
|
|
||||||
var keyboard = options.keyboard !== undefined ? options.keyboard : true;
|
var keyboard = options.keyboard !== undefined ? options.keyboard : true;
|
||||||
if (keyboard) {
|
if (keyboard) {
|
||||||
interactions.push(new _ol_interaction_KeyboardPan_());
|
interactions.push(new KeyboardPan());
|
||||||
interactions.push(new _ol_interaction_KeyboardZoom_({
|
interactions.push(new _ol_interaction_KeyboardZoom_({
|
||||||
delta: options.zoomDelta,
|
delta: options.zoomDelta,
|
||||||
duration: options.zoomDuration
|
duration: options.zoomDuration
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ import Interaction from '../interaction/Interaction.js';
|
|||||||
* @param {olx.interaction.KeyboardPanOptions=} opt_options Options.
|
* @param {olx.interaction.KeyboardPanOptions=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
var _ol_interaction_KeyboardPan_ = function(opt_options) {
|
var KeyboardPan = function(opt_options) {
|
||||||
|
|
||||||
Interaction.call(this, {
|
Interaction.call(this, {
|
||||||
handleEvent: _ol_interaction_KeyboardPan_.handleEvent
|
handleEvent: KeyboardPan.handleEvent
|
||||||
});
|
});
|
||||||
|
|
||||||
var options = opt_options || {};
|
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
|
* 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}
|
* @this {ol.interaction.KeyboardPan}
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
_ol_interaction_KeyboardPan_.handleEvent = function(mapBrowserEvent) {
|
KeyboardPan.handleEvent = function(mapBrowserEvent) {
|
||||||
var stopEvent = false;
|
var stopEvent = false;
|
||||||
if (mapBrowserEvent.type == EventType.KEYDOWN) {
|
if (mapBrowserEvent.type == EventType.KEYDOWN) {
|
||||||
var keyEvent = mapBrowserEvent.originalEvent;
|
var keyEvent = mapBrowserEvent.originalEvent;
|
||||||
@@ -108,4 +108,4 @@ _ol_interaction_KeyboardPan_.handleEvent = function(mapBrowserEvent) {
|
|||||||
}
|
}
|
||||||
return !stopEvent;
|
return !stopEvent;
|
||||||
};
|
};
|
||||||
export default _ol_interaction_KeyboardPan_;
|
export default KeyboardPan;
|
||||||
|
|||||||
Reference in New Issue
Block a user