Rename _ol_pointer_EventSource_ to EventSource
This commit is contained in:
@@ -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.<string>} 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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user