From d97151b825359c08740a5f74c16dc9b234ca8cb9 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Wed, 17 Jan 2018 11:54:31 +0100 Subject: [PATCH] Rename _ol_pointer_EventSource_ to EventSource --- src/ol/pointer/EventSource.js | 8 ++++---- src/ol/pointer/MouseSource.js | 6 +++--- src/ol/pointer/MsSource.js | 6 +++--- src/ol/pointer/NativeSource.js | 6 +++--- src/ol/pointer/TouchSource.js | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/ol/pointer/EventSource.js b/src/ol/pointer/EventSource.js index 0606214b58..27440755b2 100644 --- a/src/ol/pointer/EventSource.js +++ b/src/ol/pointer/EventSource.js @@ -7,7 +7,7 @@ * mapping. * @constructor */ -const _ol_pointer_EventSource_ = function(dispatcher, mapping) { +const EventSource = function(dispatcher, mapping) { /** * @type {ol.pointer.PointerEventHandler} */ @@ -26,7 +26,7 @@ const _ol_pointer_EventSource_ = function(dispatcher, mapping) { * List of events supported by this source. * @return {Array.} Event names */ -_ol_pointer_EventSource_.prototype.getEvents = function() { +EventSource.prototype.getEvents = function() { return Object.keys(this.mapping_); }; @@ -36,7 +36,7 @@ _ol_pointer_EventSource_.prototype.getEvents = function() { * @param {string} eventType The event type. * @return {function(Event)} Handler */ -_ol_pointer_EventSource_.prototype.getHandlerForEvent = function(eventType) { +EventSource.prototype.getHandlerForEvent = function(eventType) { return this.mapping_[eventType]; }; -export default _ol_pointer_EventSource_; +export default EventSource; diff --git a/src/ol/pointer/MouseSource.js b/src/ol/pointer/MouseSource.js index 68c51c4024..0aa04f6879 100644 --- a/src/ol/pointer/MouseSource.js +++ b/src/ol/pointer/MouseSource.js @@ -32,7 +32,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import {inherits} from '../index.js'; -import _ol_pointer_EventSource_ from '../pointer/EventSource.js'; +import EventSource from '../pointer/EventSource.js'; /** * @param {ol.pointer.PointerEventHandler} dispatcher Event handler. @@ -47,7 +47,7 @@ const _ol_pointer_MouseSource_ = function(dispatcher) { 'mouseover': this.mouseover, 'mouseout': this.mouseout }; - _ol_pointer_EventSource_.call(this, dispatcher, mapping); + EventSource.call(this, dispatcher, mapping); /** * @const @@ -62,7 +62,7 @@ const _ol_pointer_MouseSource_ = function(dispatcher) { this.lastTouches = []; }; -inherits(_ol_pointer_MouseSource_, _ol_pointer_EventSource_); +inherits(_ol_pointer_MouseSource_, EventSource); /** diff --git a/src/ol/pointer/MsSource.js b/src/ol/pointer/MsSource.js index a06d511dcf..683b0dc0c6 100644 --- a/src/ol/pointer/MsSource.js +++ b/src/ol/pointer/MsSource.js @@ -32,7 +32,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import {inherits} from '../index.js'; -import _ol_pointer_EventSource_ from '../pointer/EventSource.js'; +import EventSource from '../pointer/EventSource.js'; /** * @param {ol.pointer.PointerEventHandler} dispatcher Event handler. @@ -50,7 +50,7 @@ const _ol_pointer_MsSource_ = function(dispatcher) { 'MSGotPointerCapture': this.msGotPointerCapture, 'MSLostPointerCapture': this.msLostPointerCapture }; - _ol_pointer_EventSource_.call(this, dispatcher, mapping); + EventSource.call(this, dispatcher, mapping); /** * @const @@ -71,7 +71,7 @@ const _ol_pointer_MsSource_ = function(dispatcher) { ]; }; -inherits(_ol_pointer_MsSource_, _ol_pointer_EventSource_); +inherits(_ol_pointer_MsSource_, EventSource); /** diff --git a/src/ol/pointer/NativeSource.js b/src/ol/pointer/NativeSource.js index 05949efd9e..bff977b7ee 100644 --- a/src/ol/pointer/NativeSource.js +++ b/src/ol/pointer/NativeSource.js @@ -32,7 +32,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import {inherits} from '../index.js'; -import _ol_pointer_EventSource_ from '../pointer/EventSource.js'; +import EventSource from '../pointer/EventSource.js'; /** * @param {ol.pointer.PointerEventHandler} dispatcher Event handler. @@ -50,10 +50,10 @@ const _ol_pointer_NativeSource_ = function(dispatcher) { 'gotpointercapture': this.gotPointerCapture, 'lostpointercapture': this.lostPointerCapture }; - _ol_pointer_EventSource_.call(this, dispatcher, mapping); + EventSource.call(this, dispatcher, mapping); }; -inherits(_ol_pointer_NativeSource_, _ol_pointer_EventSource_); +inherits(_ol_pointer_NativeSource_, EventSource); /** diff --git a/src/ol/pointer/TouchSource.js b/src/ol/pointer/TouchSource.js index 80f3bf7267..a92f26ee7e 100644 --- a/src/ol/pointer/TouchSource.js +++ b/src/ol/pointer/TouchSource.js @@ -33,7 +33,7 @@ import {inherits} from '../index.js'; import {remove} from '../array.js'; -import _ol_pointer_EventSource_ from '../pointer/EventSource.js'; +import EventSource from '../pointer/EventSource.js'; import _ol_pointer_MouseSource_ from '../pointer/MouseSource.js'; /** @@ -49,7 +49,7 @@ const _ol_pointer_TouchSource_ = function(dispatcher, mouseSource) { 'touchend': this.touchend, 'touchcancel': this.touchcancel }; - _ol_pointer_EventSource_.call(this, dispatcher, mapping); + EventSource.call(this, dispatcher, mapping); /** * @const @@ -82,7 +82,7 @@ const _ol_pointer_TouchSource_ = function(dispatcher, mouseSource) { this.resetId_ = undefined; }; -inherits(_ol_pointer_TouchSource_, _ol_pointer_EventSource_); +inherits(_ol_pointer_TouchSource_, EventSource); /**