Rename _ol_RotationConstraint_ to RotationConstraint

This commit is contained in:
Tim Schaub
2018-01-08 09:53:46 -07:00
parent 073e7dc829
commit 7fba608337
6 changed files with 20 additions and 20 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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;
}