Rename _ol_interaction_KeyboardZoom_ to KeyboardZoom

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

View File

@@ -8,7 +8,7 @@ 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 KeyboardPan from './interaction/KeyboardPan.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 MouseWheelZoom from './interaction/MouseWheelZoom.js';
import PinchRotate from './interaction/PinchRotate.js'; import PinchRotate from './interaction/PinchRotate.js';
import PinchZoom from './interaction/PinchZoom.js'; import PinchZoom from './interaction/PinchZoom.js';
@@ -84,7 +84,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 KeyboardPan()); interactions.push(new KeyboardPan());
interactions.push(new _ol_interaction_KeyboardZoom_({ interactions.push(new KeyboardZoom({
delta: options.zoomDelta, delta: options.zoomDelta,
duration: options.zoomDuration duration: options.zoomDuration
})); }));

View File

@@ -23,10 +23,10 @@ import Interaction from '../interaction/Interaction.js';
* @extends {ol.interaction.Interaction} * @extends {ol.interaction.Interaction}
* @api * @api
*/ */
var _ol_interaction_KeyboardZoom_ = function(opt_options) { var KeyboardZoom = function(opt_options) {
Interaction.call(this, { Interaction.call(this, {
handleEvent: _ol_interaction_KeyboardZoom_.handleEvent handleEvent: KeyboardZoom.handleEvent
}); });
var options = opt_options ? opt_options : {}; 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} * @this {ol.interaction.KeyboardZoom}
* @api * @api
*/ */
_ol_interaction_KeyboardZoom_.handleEvent = function(mapBrowserEvent) { KeyboardZoom.handleEvent = function(mapBrowserEvent) {
var stopEvent = false; var stopEvent = false;
if (mapBrowserEvent.type == EventType.KEYDOWN || if (mapBrowserEvent.type == EventType.KEYDOWN ||
mapBrowserEvent.type == EventType.KEYPRESS) { mapBrowserEvent.type == EventType.KEYPRESS) {
@@ -83,4 +83,4 @@ _ol_interaction_KeyboardZoom_.handleEvent = function(mapBrowserEvent) {
} }
return !stopEvent; return !stopEvent;
}; };
export default _ol_interaction_KeyboardZoom_; export default KeyboardZoom;