Automated class transform
npx lebab --replace src --transform class
This commit is contained in:
@@ -39,99 +39,95 @@ import EventSource from '../pointer/EventSource.js';
|
||||
* @constructor
|
||||
* @extends {module:ol/pointer/EventSource}
|
||||
*/
|
||||
const NativeSource = function(dispatcher) {
|
||||
const mapping = {
|
||||
'pointerdown': this.pointerDown,
|
||||
'pointermove': this.pointerMove,
|
||||
'pointerup': this.pointerUp,
|
||||
'pointerout': this.pointerOut,
|
||||
'pointerover': this.pointerOver,
|
||||
'pointercancel': this.pointerCancel,
|
||||
'gotpointercapture': this.gotPointerCapture,
|
||||
'lostpointercapture': this.lostPointerCapture
|
||||
};
|
||||
EventSource.call(this, dispatcher, mapping);
|
||||
};
|
||||
class NativeSource {
|
||||
constructor(dispatcher) {
|
||||
const mapping = {
|
||||
'pointerdown': this.pointerDown,
|
||||
'pointermove': this.pointerMove,
|
||||
'pointerup': this.pointerUp,
|
||||
'pointerout': this.pointerOut,
|
||||
'pointerover': this.pointerOver,
|
||||
'pointercancel': this.pointerCancel,
|
||||
'gotpointercapture': this.gotPointerCapture,
|
||||
'lostpointercapture': this.lostPointerCapture
|
||||
};
|
||||
EventSource.call(this, dispatcher, mapping);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `pointerdown`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
pointerDown(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `pointermove`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
pointerMove(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `pointerup`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
pointerUp(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `pointerout`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
pointerOut(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `pointerover`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
pointerOver(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `pointercancel`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
pointerCancel(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `lostpointercapture`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
lostPointerCapture(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handler for `gotpointercapture`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
gotPointerCapture(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
}
|
||||
}
|
||||
|
||||
inherits(NativeSource, EventSource);
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `pointerdown`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.pointerDown = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `pointermove`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.pointerMove = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `pointerup`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.pointerUp = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `pointerout`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.pointerOut = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `pointerover`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.pointerOver = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `pointercancel`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.pointerCancel = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `lostpointercapture`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.lostPointerCapture = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Handler for `gotpointercapture`.
|
||||
*
|
||||
* @param {Event} inEvent The in event.
|
||||
*/
|
||||
NativeSource.prototype.gotPointerCapture = function(inEvent) {
|
||||
this.dispatcher.fireNativeEvent(inEvent);
|
||||
};
|
||||
export default NativeSource;
|
||||
|
||||
Reference in New Issue
Block a user