Rename _ol_interaction_KeyboardZoom_ to KeyboardZoom
This commit is contained in:
@@ -8,7 +8,7 @@ import DragPan from './interaction/DragPan.js';
|
||||
import DragRotate from './interaction/DragRotate.js';
|
||||
import DragZoom from './interaction/DragZoom.js';
|
||||
import KeyboardPan from './interaction/KeyboardPan.js';
|
||||
import _ol_interaction_KeyboardZoom_ from './interaction/KeyboardZoom.js';
|
||||
import KeyboardZoom from './interaction/KeyboardZoom.js';
|
||||
import MouseWheelZoom from './interaction/MouseWheelZoom.js';
|
||||
import PinchRotate from './interaction/PinchRotate.js';
|
||||
import PinchZoom from './interaction/PinchZoom.js';
|
||||
@@ -84,7 +84,7 @@ export function defaults(opt_options) {
|
||||
var keyboard = options.keyboard !== undefined ? options.keyboard : true;
|
||||
if (keyboard) {
|
||||
interactions.push(new KeyboardPan());
|
||||
interactions.push(new _ol_interaction_KeyboardZoom_({
|
||||
interactions.push(new KeyboardZoom({
|
||||
delta: options.zoomDelta,
|
||||
duration: options.zoomDuration
|
||||
}));
|
||||
|
||||
@@ -23,10 +23,10 @@ import Interaction from '../interaction/Interaction.js';
|
||||
* @extends {ol.interaction.Interaction}
|
||||
* @api
|
||||
*/
|
||||
var _ol_interaction_KeyboardZoom_ = function(opt_options) {
|
||||
var KeyboardZoom = function(opt_options) {
|
||||
|
||||
Interaction.call(this, {
|
||||
handleEvent: _ol_interaction_KeyboardZoom_.handleEvent
|
||||
handleEvent: KeyboardZoom.handleEvent
|
||||
});
|
||||
|
||||
var options = opt_options ? opt_options : {};
|
||||
@@ -52,7 +52,7 @@ var _ol_interaction_KeyboardZoom_ = function(opt_options) {
|
||||
|
||||
};
|
||||
|
||||
inherits(_ol_interaction_KeyboardZoom_, Interaction);
|
||||
inherits(KeyboardZoom, Interaction);
|
||||
|
||||
|
||||
/**
|
||||
@@ -64,7 +64,7 @@ inherits(_ol_interaction_KeyboardZoom_, Interaction);
|
||||
* @this {ol.interaction.KeyboardZoom}
|
||||
* @api
|
||||
*/
|
||||
_ol_interaction_KeyboardZoom_.handleEvent = function(mapBrowserEvent) {
|
||||
KeyboardZoom.handleEvent = function(mapBrowserEvent) {
|
||||
var stopEvent = false;
|
||||
if (mapBrowserEvent.type == EventType.KEYDOWN ||
|
||||
mapBrowserEvent.type == EventType.KEYPRESS) {
|
||||
@@ -83,4 +83,4 @@ _ol_interaction_KeyboardZoom_.handleEvent = function(mapBrowserEvent) {
|
||||
}
|
||||
return !stopEvent;
|
||||
};
|
||||
export default _ol_interaction_KeyboardZoom_;
|
||||
export default KeyboardZoom;
|
||||
|
||||
Reference in New Issue
Block a user