Rename _ol_interaction_PinchRotate_ to PinchRotate
This commit is contained in:
@@ -10,7 +10,7 @@ import DragZoom from './interaction/DragZoom.js';
|
|||||||
import _ol_interaction_KeyboardPan_ from './interaction/KeyboardPan.js';
|
import _ol_interaction_KeyboardPan_ from './interaction/KeyboardPan.js';
|
||||||
import _ol_interaction_KeyboardZoom_ from './interaction/KeyboardZoom.js';
|
import _ol_interaction_KeyboardZoom_ from './interaction/KeyboardZoom.js';
|
||||||
import MouseWheelZoom from './interaction/MouseWheelZoom.js';
|
import MouseWheelZoom from './interaction/MouseWheelZoom.js';
|
||||||
import _ol_interaction_PinchRotate_ from './interaction/PinchRotate.js';
|
import PinchRotate from './interaction/PinchRotate.js';
|
||||||
import PinchZoom from './interaction/PinchZoom.js';
|
import PinchZoom from './interaction/PinchZoom.js';
|
||||||
|
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ export function defaults(opt_options) {
|
|||||||
var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :
|
var pinchRotate = options.pinchRotate !== undefined ? options.pinchRotate :
|
||||||
true;
|
true;
|
||||||
if (pinchRotate) {
|
if (pinchRotate) {
|
||||||
interactions.push(new _ol_interaction_PinchRotate_());
|
interactions.push(new PinchRotate());
|
||||||
}
|
}
|
||||||
|
|
||||||
var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;
|
var pinchZoom = options.pinchZoom !== undefined ? options.pinchZoom : true;
|
||||||
|
|||||||
@@ -18,12 +18,12 @@ import RotationConstraint from '../RotationConstraint.js';
|
|||||||
* @param {olx.interaction.PinchRotateOptions=} opt_options Options.
|
* @param {olx.interaction.PinchRotateOptions=} opt_options Options.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
var _ol_interaction_PinchRotate_ = function(opt_options) {
|
var PinchRotate = function(opt_options) {
|
||||||
|
|
||||||
_ol_interaction_Pointer_.call(this, {
|
_ol_interaction_Pointer_.call(this, {
|
||||||
handleDownEvent: _ol_interaction_PinchRotate_.handleDownEvent_,
|
handleDownEvent: PinchRotate.handleDownEvent_,
|
||||||
handleDragEvent: _ol_interaction_PinchRotate_.handleDragEvent_,
|
handleDragEvent: PinchRotate.handleDragEvent_,
|
||||||
handleUpEvent: _ol_interaction_PinchRotate_.handleUpEvent_
|
handleUpEvent: PinchRotate.handleUpEvent_
|
||||||
});
|
});
|
||||||
|
|
||||||
var options = opt_options || {};
|
var options = opt_options || {};
|
||||||
@@ -66,7 +66,7 @@ var _ol_interaction_PinchRotate_ = function(opt_options) {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherits(_ol_interaction_PinchRotate_, _ol_interaction_Pointer_);
|
inherits(PinchRotate, _ol_interaction_Pointer_);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,7 +74,7 @@ inherits(_ol_interaction_PinchRotate_, _ol_interaction_Pointer_);
|
|||||||
* @this {ol.interaction.PinchRotate}
|
* @this {ol.interaction.PinchRotate}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_ol_interaction_PinchRotate_.handleDragEvent_ = function(mapBrowserEvent) {
|
PinchRotate.handleDragEvent_ = function(mapBrowserEvent) {
|
||||||
var rotationDelta = 0.0;
|
var rotationDelta = 0.0;
|
||||||
|
|
||||||
var touch0 = this.targetPointers[0];
|
var touch0 = this.targetPointers[0];
|
||||||
@@ -127,7 +127,7 @@ _ol_interaction_PinchRotate_.handleDragEvent_ = function(mapBrowserEvent) {
|
|||||||
* @this {ol.interaction.PinchRotate}
|
* @this {ol.interaction.PinchRotate}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_ol_interaction_PinchRotate_.handleUpEvent_ = function(mapBrowserEvent) {
|
PinchRotate.handleUpEvent_ = function(mapBrowserEvent) {
|
||||||
if (this.targetPointers.length < 2) {
|
if (this.targetPointers.length < 2) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
var view = map.getView();
|
var view = map.getView();
|
||||||
@@ -150,7 +150,7 @@ _ol_interaction_PinchRotate_.handleUpEvent_ = function(mapBrowserEvent) {
|
|||||||
* @this {ol.interaction.PinchRotate}
|
* @this {ol.interaction.PinchRotate}
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_ol_interaction_PinchRotate_.handleDownEvent_ = function(mapBrowserEvent) {
|
PinchRotate.handleDownEvent_ = function(mapBrowserEvent) {
|
||||||
if (this.targetPointers.length >= 2) {
|
if (this.targetPointers.length >= 2) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
this.anchor_ = null;
|
this.anchor_ = null;
|
||||||
@@ -170,5 +170,5 @@ _ol_interaction_PinchRotate_.handleDownEvent_ = function(mapBrowserEvent) {
|
|||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
_ol_interaction_PinchRotate_.prototype.shouldStopEvent = FALSE;
|
PinchRotate.prototype.shouldStopEvent = FALSE;
|
||||||
export default _ol_interaction_PinchRotate_;
|
export default PinchRotate;
|
||||||
|
|||||||
Reference in New Issue
Block a user