Manual class transform

This commit is contained in:
Tim Schaub
2018-07-16 17:09:50 -06:00
parent 7b4a73f3b9
commit f78d0d4cfa
96 changed files with 8112 additions and 7964 deletions

View File

@@ -28,45 +28,48 @@ import PointerInteraction, {centroid as centroidFromPointers} from '../interacti
* @param {module:ol/interaction/DragPan~Options=} opt_options Options.
* @api
*/
const DragPan = function(opt_options) {
class DragPan {
constructor(opt_options) {
PointerInteraction.call(this, {
handleDownEvent: handleDownEvent,
handleDragEvent: handleDragEvent,
handleUpEvent: handleUpEvent
});
PointerInteraction.call(this, {
handleDownEvent: handleDownEvent,
handleDragEvent: handleDragEvent,
handleUpEvent: handleUpEvent
});
const options = opt_options ? opt_options : {};
const options = opt_options ? opt_options : {};
/**
* @private
* @type {module:ol/Kinetic|undefined}
*/
this.kinetic_ = options.kinetic;
/**
* @private
* @type {module:ol/Kinetic|undefined}
*/
this.kinetic_ = options.kinetic;
/**
* @type {module:ol~Pixel}
*/
this.lastCentroid = null;
/**
* @type {module:ol~Pixel}
*/
this.lastCentroid = null;
/**
* @type {number}
*/
this.lastPointersCount_;
/**
* @type {number}
*/
this.lastPointersCount_;
/**
* @private
* @type {module:ol/events/condition~Condition}
*/
this.condition_ = options.condition ? options.condition : noModifierKeys;
/**
* @private
* @type {module:ol/events/condition~Condition}
*/
this.condition_ = options.condition ? options.condition : noModifierKeys;
/**
* @private
* @type {boolean}
*/
this.noKinetic_ = false;
/**
* @private
* @type {boolean}
*/
this.noKinetic_ = false;
};
}
}
inherits(DragPan, PointerInteraction);