Rename _ol_pointer_NativeSource_ to NativeSource
This commit is contained in:
@@ -39,7 +39,7 @@ import EventSource from '../pointer/EventSource.js';
|
|||||||
* @constructor
|
* @constructor
|
||||||
* @extends {ol.pointer.EventSource}
|
* @extends {ol.pointer.EventSource}
|
||||||
*/
|
*/
|
||||||
const _ol_pointer_NativeSource_ = function(dispatcher) {
|
const NativeSource = function(dispatcher) {
|
||||||
const mapping = {
|
const mapping = {
|
||||||
'pointerdown': this.pointerDown,
|
'pointerdown': this.pointerDown,
|
||||||
'pointermove': this.pointerMove,
|
'pointermove': this.pointerMove,
|
||||||
@@ -53,7 +53,7 @@ const _ol_pointer_NativeSource_ = function(dispatcher) {
|
|||||||
EventSource.call(this, dispatcher, mapping);
|
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.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.pointerDown = function(inEvent) {
|
NativeSource.prototype.pointerDown = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ _ol_pointer_NativeSource_.prototype.pointerDown = function(inEvent) {
|
|||||||
*
|
*
|
||||||
* @param {Event} inEvent The in event.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.pointerMove = function(inEvent) {
|
NativeSource.prototype.pointerMove = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ _ol_pointer_NativeSource_.prototype.pointerMove = function(inEvent) {
|
|||||||
*
|
*
|
||||||
* @param {Event} inEvent The in event.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.pointerUp = function(inEvent) {
|
NativeSource.prototype.pointerUp = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ _ol_pointer_NativeSource_.prototype.pointerUp = function(inEvent) {
|
|||||||
*
|
*
|
||||||
* @param {Event} inEvent The in event.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.pointerOut = function(inEvent) {
|
NativeSource.prototype.pointerOut = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ _ol_pointer_NativeSource_.prototype.pointerOut = function(inEvent) {
|
|||||||
*
|
*
|
||||||
* @param {Event} inEvent The in event.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.pointerOver = function(inEvent) {
|
NativeSource.prototype.pointerOver = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ _ol_pointer_NativeSource_.prototype.pointerOver = function(inEvent) {
|
|||||||
*
|
*
|
||||||
* @param {Event} inEvent The in event.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.pointerCancel = function(inEvent) {
|
NativeSource.prototype.pointerCancel = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -121,7 +121,7 @@ _ol_pointer_NativeSource_.prototype.pointerCancel = function(inEvent) {
|
|||||||
*
|
*
|
||||||
* @param {Event} inEvent The in event.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.lostPointerCapture = function(inEvent) {
|
NativeSource.prototype.lostPointerCapture = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@ _ol_pointer_NativeSource_.prototype.lostPointerCapture = function(inEvent) {
|
|||||||
*
|
*
|
||||||
* @param {Event} inEvent The in event.
|
* @param {Event} inEvent The in event.
|
||||||
*/
|
*/
|
||||||
_ol_pointer_NativeSource_.prototype.gotPointerCapture = function(inEvent) {
|
NativeSource.prototype.gotPointerCapture = function(inEvent) {
|
||||||
this.dispatcher.fireNativeEvent(inEvent);
|
this.dispatcher.fireNativeEvent(inEvent);
|
||||||
};
|
};
|
||||||
export default _ol_pointer_NativeSource_;
|
export default NativeSource;
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import _ol_has_ from '../has.js';
|
|||||||
import PointerEventType from '../pointer/EventType.js';
|
import PointerEventType from '../pointer/EventType.js';
|
||||||
import MouseSource from '../pointer/MouseSource.js';
|
import MouseSource from '../pointer/MouseSource.js';
|
||||||
import _ol_pointer_MsSource_ from '../pointer/MsSource.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 PointerEvent from '../pointer/PointerEvent.js';
|
||||||
import TouchSource from '../pointer/TouchSource.js';
|
import TouchSource from '../pointer/TouchSource.js';
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ inherits(PointerEventHandler, EventTarget);
|
|||||||
*/
|
*/
|
||||||
PointerEventHandler.prototype.registerSources = function() {
|
PointerEventHandler.prototype.registerSources = function() {
|
||||||
if (_ol_has_.POINTER) {
|
if (_ol_has_.POINTER) {
|
||||||
this.registerSource('native', new _ol_pointer_NativeSource_(this));
|
this.registerSource('native', new NativeSource(this));
|
||||||
} else if (_ol_has_.MSPOINTER) {
|
} else if (_ol_has_.MSPOINTER) {
|
||||||
this.registerSource('ms', new _ol_pointer_MsSource_(this));
|
this.registerSource('ms', new _ol_pointer_MsSource_(this));
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user