diff --git a/src/ol/pointer/NativeSource.js b/src/ol/pointer/NativeSource.js index bff977b7ee..9e573b7497 100644 --- a/src/ol/pointer/NativeSource.js +++ b/src/ol/pointer/NativeSource.js @@ -39,7 +39,7 @@ import EventSource from '../pointer/EventSource.js'; * @constructor * @extends {ol.pointer.EventSource} */ -const _ol_pointer_NativeSource_ = function(dispatcher) { +const NativeSource = function(dispatcher) { const mapping = { 'pointerdown': this.pointerDown, 'pointermove': this.pointerMove, @@ -53,7 +53,7 @@ const _ol_pointer_NativeSource_ = function(dispatcher) { EventSource.call(this, dispatcher, mapping); }; -inherits(_ol_pointer_NativeSource_, EventSource); +inherits(NativeSource, EventSource); /** @@ -61,7 +61,7 @@ inherits(_ol_pointer_NativeSource_, EventSource); * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.pointerDown = function(inEvent) { +NativeSource.prototype.pointerDown = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; @@ -71,7 +71,7 @@ _ol_pointer_NativeSource_.prototype.pointerDown = function(inEvent) { * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.pointerMove = function(inEvent) { +NativeSource.prototype.pointerMove = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; @@ -81,7 +81,7 @@ _ol_pointer_NativeSource_.prototype.pointerMove = function(inEvent) { * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.pointerUp = function(inEvent) { +NativeSource.prototype.pointerUp = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; @@ -91,7 +91,7 @@ _ol_pointer_NativeSource_.prototype.pointerUp = function(inEvent) { * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.pointerOut = function(inEvent) { +NativeSource.prototype.pointerOut = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; @@ -101,7 +101,7 @@ _ol_pointer_NativeSource_.prototype.pointerOut = function(inEvent) { * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.pointerOver = function(inEvent) { +NativeSource.prototype.pointerOver = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; @@ -111,7 +111,7 @@ _ol_pointer_NativeSource_.prototype.pointerOver = function(inEvent) { * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.pointerCancel = function(inEvent) { +NativeSource.prototype.pointerCancel = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; @@ -121,7 +121,7 @@ _ol_pointer_NativeSource_.prototype.pointerCancel = function(inEvent) { * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.lostPointerCapture = function(inEvent) { +NativeSource.prototype.lostPointerCapture = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; @@ -131,7 +131,7 @@ _ol_pointer_NativeSource_.prototype.lostPointerCapture = function(inEvent) { * * @param {Event} inEvent The in event. */ -_ol_pointer_NativeSource_.prototype.gotPointerCapture = function(inEvent) { +NativeSource.prototype.gotPointerCapture = function(inEvent) { this.dispatcher.fireNativeEvent(inEvent); }; -export default _ol_pointer_NativeSource_; +export default NativeSource; diff --git a/src/ol/pointer/PointerEventHandler.js b/src/ol/pointer/PointerEventHandler.js index 5955641db3..ff2698314c 100644 --- a/src/ol/pointer/PointerEventHandler.js +++ b/src/ol/pointer/PointerEventHandler.js @@ -38,7 +38,7 @@ import _ol_has_ from '../has.js'; import PointerEventType from '../pointer/EventType.js'; import MouseSource from '../pointer/MouseSource.js'; import _ol_pointer_MsSource_ from '../pointer/MsSource.js'; -import _ol_pointer_NativeSource_ from '../pointer/NativeSource.js'; +import NativeSource from '../pointer/NativeSource.js'; import PointerEvent from '../pointer/PointerEvent.js'; import TouchSource from '../pointer/TouchSource.js'; @@ -87,7 +87,7 @@ inherits(PointerEventHandler, EventTarget); */ PointerEventHandler.prototype.registerSources = function() { if (_ol_has_.POINTER) { - this.registerSource('native', new _ol_pointer_NativeSource_(this)); + this.registerSource('native', new NativeSource(this)); } else if (_ol_has_.MSPOINTER) { this.registerSource('ms', new _ol_pointer_MsSource_(this)); } else {