Rename _ol_ViewHint_ to ViewHint

This commit is contained in:
Tim Schaub
2018-01-08 09:55:22 -07:00
parent 7fba608337
commit 853cecd406
15 changed files with 55 additions and 55 deletions

View File

@@ -2,7 +2,7 @@
* @module ol/interaction/DragPan
*/
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import ViewHint from '../ViewHint.js';
import _ol_coordinate_ from '../coordinate.js';
import {easeOut} from '../easing.js';
import _ol_events_condition_ from '../events/condition.js';
@@ -123,7 +123,7 @@ DragPan.handleUpEvent_ = function(mapBrowserEvent) {
easing: easeOut
});
}
view.setHint(_ol_ViewHint_.INTERACTING, -1);
view.setHint(ViewHint.INTERACTING, -1);
return false;
} else {
if (this.kinetic_) {
@@ -149,7 +149,7 @@ DragPan.handleDownEvent_ = function(mapBrowserEvent) {
var view = map.getView();
this.lastCentroid = null;
if (!this.handlingDownUpSequence) {
view.setHint(_ol_ViewHint_.INTERACTING, 1);
view.setHint(ViewHint.INTERACTING, 1);
}
// stop any current animation
if (view.getAnimating()) {

View File

@@ -3,7 +3,7 @@
*/
import {inherits} from '../index.js';
import RotationConstraint from '../RotationConstraint.js';
import _ol_ViewHint_ from '../ViewHint.js';
import ViewHint from '../ViewHint.js';
import _ol_events_condition_ from '../events/condition.js';
import {FALSE} from '../functions.js';
import Interaction from '../interaction/Interaction.js';
@@ -97,7 +97,7 @@ DragRotate.handleUpEvent_ = function(mapBrowserEvent) {
var map = mapBrowserEvent.map;
var view = map.getView();
view.setHint(_ol_ViewHint_.INTERACTING, -1);
view.setHint(ViewHint.INTERACTING, -1);
var rotation = view.getRotation();
Interaction.rotate(view, rotation,
undefined, this.duration_);
@@ -119,7 +119,7 @@ DragRotate.handleDownEvent_ = function(mapBrowserEvent) {
if (_ol_events_condition_.mouseActionButton(mapBrowserEvent) &&
this.condition_(mapBrowserEvent)) {
var map = mapBrowserEvent.map;
map.getView().setHint(_ol_ViewHint_.INTERACTING, 1);
map.getView().setHint(ViewHint.INTERACTING, 1);
this.lastAngle_ = undefined;
return true;
} else {

View File

@@ -3,7 +3,7 @@
*/
import {inherits} from '../index.js';
import RotationConstraint from '../RotationConstraint.js';
import _ol_ViewHint_ from '../ViewHint.js';
import ViewHint from '../ViewHint.js';
import _ol_events_condition_ from '../events/condition.js';
import Interaction from '../interaction/Interaction.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
@@ -117,7 +117,7 @@ DragRotateAndZoom.handleUpEvent_ = function(mapBrowserEvent) {
var map = mapBrowserEvent.map;
var view = map.getView();
view.setHint(_ol_ViewHint_.INTERACTING, -1);
view.setHint(ViewHint.INTERACTING, -1);
var direction = this.lastScaleDelta_ - 1;
Interaction.rotate(view, view.getRotation());
Interaction.zoom(view, view.getResolution(),
@@ -139,7 +139,7 @@ DragRotateAndZoom.handleDownEvent_ = function(mapBrowserEvent) {
}
if (this.condition_(mapBrowserEvent)) {
mapBrowserEvent.map.getView().setHint(_ol_ViewHint_.INTERACTING, 1);
mapBrowserEvent.map.getView().setHint(ViewHint.INTERACTING, 1);
this.lastAngle_ = undefined;
this.lastMagnitude_ = undefined;
return true;

View File

@@ -2,7 +2,7 @@
* @module ol/interaction/MouseWheelZoom
*/
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import ViewHint from '../ViewHint.js';
import condition from '../events/condition.js';
import {easeOut} from '../easing.js';
import EventType from '../events/EventType.js';
@@ -191,7 +191,7 @@ MouseWheelZoom.handleEvent = function(mapBrowserEvent) {
if (this.trackpadTimeoutId_) {
clearTimeout(this.trackpadTimeoutId_);
} else {
view.setHint(_ol_ViewHint_.INTERACTING, 1);
view.setHint(ViewHint.INTERACTING, 1);
}
this.trackpadTimeoutId_ = setTimeout(this.decrementInteractingHint_.bind(this), this.trackpadEventGap_);
var resolution = view.getResolution() * Math.pow(2, delta / this.trackpadDeltaPerZoom_);
@@ -256,7 +256,7 @@ MouseWheelZoom.handleEvent = function(mapBrowserEvent) {
MouseWheelZoom.prototype.decrementInteractingHint_ = function() {
this.trackpadTimeoutId_ = undefined;
var view = this.getMap().getView();
view.setHint(_ol_ViewHint_.INTERACTING, -1);
view.setHint(ViewHint.INTERACTING, -1);
};

View File

@@ -2,7 +2,7 @@
* @module ol/interaction/PinchRotate
*/
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import ViewHint from '../ViewHint.js';
import {FALSE} from '../functions.js';
import Interaction from '../interaction/Interaction.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
@@ -131,7 +131,7 @@ _ol_interaction_PinchRotate_.handleUpEvent_ = function(mapBrowserEvent) {
if (this.targetPointers.length < 2) {
var map = mapBrowserEvent.map;
var view = map.getView();
view.setHint(_ol_ViewHint_.INTERACTING, -1);
view.setHint(ViewHint.INTERACTING, -1);
if (this.rotating_) {
var rotation = view.getRotation();
Interaction.rotate(
@@ -158,7 +158,7 @@ _ol_interaction_PinchRotate_.handleDownEvent_ = function(mapBrowserEvent) {
this.rotating_ = false;
this.rotationDelta_ = 0.0;
if (!this.handlingDownUpSequence) {
map.getView().setHint(_ol_ViewHint_.INTERACTING, 1);
map.getView().setHint(ViewHint.INTERACTING, 1);
}
return true;
} else {

View File

@@ -2,7 +2,7 @@
* @module ol/interaction/PinchZoom
*/
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import ViewHint from '../ViewHint.js';
import {FALSE} from '../functions.js';
import Interaction from '../interaction/Interaction.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
@@ -125,7 +125,7 @@ _ol_interaction_PinchZoom_.handleUpEvent_ = function(mapBrowserEvent) {
if (this.targetPointers.length < 2) {
var map = mapBrowserEvent.map;
var view = map.getView();
view.setHint(_ol_ViewHint_.INTERACTING, -1);
view.setHint(ViewHint.INTERACTING, -1);
var resolution = view.getResolution();
if (this.constrainResolution_ ||
resolution < view.getMinResolution() ||
@@ -157,7 +157,7 @@ _ol_interaction_PinchZoom_.handleDownEvent_ = function(mapBrowserEvent) {
this.lastDistance_ = undefined;
this.lastScaleDelta_ = 1;
if (!this.handlingDownUpSequence) {
map.getView().setHint(_ol_ViewHint_.INTERACTING, 1);
map.getView().setHint(ViewHint.INTERACTING, 1);
}
return true;
} else {