Rename _ol_RotationConstraint_ to RotationConstraint
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @module ol/interaction/DragRotate
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_RotationConstraint_ from '../RotationConstraint.js';
|
||||
import RotationConstraint from '../RotationConstraint.js';
|
||||
import _ol_ViewHint_ from '../ViewHint.js';
|
||||
import _ol_events_condition_ from '../events/condition.js';
|
||||
import {FALSE} from '../functions.js';
|
||||
@@ -67,7 +67,7 @@ DragRotate.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
|
||||
var map = mapBrowserEvent.map;
|
||||
var view = map.getView();
|
||||
if (view.getConstraints().rotation === _ol_RotationConstraint_.disable) {
|
||||
if (view.getConstraints().rotation === RotationConstraint.disable) {
|
||||
return;
|
||||
}
|
||||
var size = map.getSize();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @module ol/interaction/DragRotateAndZoom
|
||||
*/
|
||||
import {inherits} from '../index.js';
|
||||
import _ol_RotationConstraint_ from '../RotationConstraint.js';
|
||||
import RotationConstraint from '../RotationConstraint.js';
|
||||
import _ol_ViewHint_ from '../ViewHint.js';
|
||||
import _ol_events_condition_ from '../events/condition.js';
|
||||
import Interaction from '../interaction/Interaction.js';
|
||||
@@ -87,7 +87,7 @@ DragRotateAndZoom.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
var theta = Math.atan2(deltaY, deltaX);
|
||||
var magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
||||
var view = map.getView();
|
||||
if (view.getConstraints().rotation !== _ol_RotationConstraint_.disable && this.lastAngle_ !== undefined) {
|
||||
if (view.getConstraints().rotation !== RotationConstraint.disable && this.lastAngle_ !== undefined) {
|
||||
var angleDelta = theta - this.lastAngle_;
|
||||
Interaction.rotateWithoutConstraints(
|
||||
view, view.getRotation() - angleDelta);
|
||||
|
||||
@@ -6,7 +6,7 @@ import _ol_ViewHint_ from '../ViewHint.js';
|
||||
import {FALSE} from '../functions.js';
|
||||
import Interaction from '../interaction/Interaction.js';
|
||||
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
|
||||
import _ol_RotationConstraint_ from '../RotationConstraint.js';
|
||||
import RotationConstraint from '../RotationConstraint.js';
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
@@ -98,7 +98,7 @@ _ol_interaction_PinchRotate_.handleDragEvent_ = function(mapBrowserEvent) {
|
||||
|
||||
var map = mapBrowserEvent.map;
|
||||
var view = map.getView();
|
||||
if (view.getConstraints().rotation === _ol_RotationConstraint_.disable) {
|
||||
if (view.getConstraints().rotation === RotationConstraint.disable) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user