Remove private static members from PinchRotate interaction
This commit is contained in:
@@ -21,9 +21,9 @@ import RotationConstraint from '../RotationConstraint.js';
|
|||||||
const PinchRotate = function(opt_options) {
|
const PinchRotate = function(opt_options) {
|
||||||
|
|
||||||
PointerInteraction.call(this, {
|
PointerInteraction.call(this, {
|
||||||
handleDownEvent: PinchRotate.handleDownEvent_,
|
handleDownEvent: handleDownEvent,
|
||||||
handleDragEvent: PinchRotate.handleDragEvent_,
|
handleDragEvent: handleDragEvent,
|
||||||
handleUpEvent: PinchRotate.handleUpEvent_
|
handleUpEvent: handleUpEvent
|
||||||
});
|
});
|
||||||
|
|
||||||
const options = opt_options || {};
|
const options = opt_options || {};
|
||||||
@@ -72,9 +72,8 @@ inherits(PinchRotate, PointerInteraction);
|
|||||||
/**
|
/**
|
||||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
||||||
* @this {ol.interaction.PinchRotate}
|
* @this {ol.interaction.PinchRotate}
|
||||||
* @private
|
|
||||||
*/
|
*/
|
||||||
PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
|
function handleDragEvent(mapBrowserEvent) {
|
||||||
let rotationDelta = 0.0;
|
let rotationDelta = 0.0;
|
||||||
|
|
||||||
const touch0 = this.targetPointers[0];
|
const touch0 = this.targetPointers[0];
|
||||||
@@ -118,16 +117,15 @@ PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
|
|||||||
Interaction.rotateWithoutConstraints(view,
|
Interaction.rotateWithoutConstraints(view,
|
||||||
rotation + rotationDelta, this.anchor_);
|
rotation + rotationDelta, this.anchor_);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
||||||
* @return {boolean} Stop drag sequence?
|
* @return {boolean} Stop drag sequence?
|
||||||
* @this {ol.interaction.PinchRotate}
|
* @this {ol.interaction.PinchRotate}
|
||||||
* @private
|
|
||||||
*/
|
*/
|
||||||
PinchRotate.handleUpEvent_ = function(mapBrowserEvent) {
|
function handleUpEvent(mapBrowserEvent) {
|
||||||
if (this.targetPointers.length < 2) {
|
if (this.targetPointers.length < 2) {
|
||||||
const map = mapBrowserEvent.map;
|
const map = mapBrowserEvent.map;
|
||||||
const view = map.getView();
|
const view = map.getView();
|
||||||
@@ -141,16 +139,15 @@ PinchRotate.handleUpEvent_ = function(mapBrowserEvent) {
|
|||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
* @param {ol.MapBrowserPointerEvent} mapBrowserEvent Event.
|
||||||
* @return {boolean} Start drag sequence?
|
* @return {boolean} Start drag sequence?
|
||||||
* @this {ol.interaction.PinchRotate}
|
* @this {ol.interaction.PinchRotate}
|
||||||
* @private
|
|
||||||
*/
|
*/
|
||||||
PinchRotate.handleDownEvent_ = function(mapBrowserEvent) {
|
function handleDownEvent(mapBrowserEvent) {
|
||||||
if (this.targetPointers.length >= 2) {
|
if (this.targetPointers.length >= 2) {
|
||||||
const map = mapBrowserEvent.map;
|
const map = mapBrowserEvent.map;
|
||||||
this.anchor_ = null;
|
this.anchor_ = null;
|
||||||
@@ -164,11 +161,12 @@ PinchRotate.handleDownEvent_ = function(mapBrowserEvent) {
|
|||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
PinchRotate.prototype.shouldStopEvent = FALSE;
|
PinchRotate.prototype.shouldStopEvent = FALSE;
|
||||||
|
|
||||||
export default PinchRotate;
|
export default PinchRotate;
|
||||||
|
|||||||
Reference in New Issue
Block a user