Named exports from ol/easing

This commit is contained in:
Frederic Junod
2017-12-14 08:42:36 +01:00
parent e2c9175f6d
commit 061e0b6618
12 changed files with 44 additions and 46 deletions

View File

@@ -4,7 +4,7 @@
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import _ol_coordinate_ from '../coordinate.js';
import _ol_easing_ from '../easing.js';
import {easeOut} from '../easing.js';
import _ol_events_condition_ from '../events/condition.js';
import _ol_functions_ from '../functions.js';
import _ol_interaction_Pointer_ from '../interaction/Pointer.js';
@@ -120,7 +120,7 @@ _ol_interaction_DragPan_.handleUpEvent_ = function(mapBrowserEvent) {
view.animate({
center: view.constrainCenter(dest),
duration: 500,
easing: _ol_easing_.easeOut
easing: easeOut
});
}
view.setHint(_ol_ViewHint_.INTERACTING, -1);

View File

@@ -2,7 +2,7 @@
* @module ol/interaction/DragZoom
*/
import {inherits} from '../index.js';
import _ol_easing_ from '../easing.js';
import {easeOut} from '../easing.js';
import _ol_events_condition_ from '../events/condition.js';
import {createOrUpdateFromCoordinates, getBottomLeft, getCenter, getTopRight, scaleFromCenter} from '../extent.js';
import _ol_interaction_DragBox_ from '../interaction/DragBox.js';
@@ -82,7 +82,7 @@ _ol_interaction_DragZoom_.prototype.onBoxEnd = function() {
resolution: resolution,
center: center,
duration: this.duration_,
easing: _ol_easing_.easeOut
easing: easeOut
});
};

View File

@@ -5,7 +5,7 @@
import {inherits} from '../index.js';
import _ol_Object_ from '../Object.js';
import _ol_easing_ from '../easing.js';
import {easeOut, linear} from '../easing.js';
import _ol_interaction_Property_ from '../interaction/Property.js';
import _ol_math_ from '../math.js';
@@ -106,7 +106,7 @@ _ol_interaction_Interaction_.pan = function(view, delta, opt_duration) {
if (opt_duration) {
view.animate({
duration: opt_duration,
easing: _ol_easing_.linear,
easing: linear,
center: center
});
} else {
@@ -144,7 +144,7 @@ _ol_interaction_Interaction_.rotateWithoutConstraints = function(view, rotation,
rotation: rotation,
anchor: opt_anchor,
duration: opt_duration,
easing: _ol_easing_.easeOut
easing: easeOut
});
} else {
view.rotate(rotation, opt_anchor);
@@ -229,7 +229,7 @@ _ol_interaction_Interaction_.zoomWithoutConstraints = function(view, resolution,
resolution: resolution,
anchor: opt_anchor,
duration: opt_duration,
easing: _ol_easing_.easeOut
easing: easeOut
});
} else {
if (opt_anchor) {

View File

@@ -3,7 +3,7 @@
*/
import {inherits} from '../index.js';
import _ol_ViewHint_ from '../ViewHint.js';
import _ol_easing_ from '../easing.js';
import {easeOut} from '../easing.js';
import _ol_events_EventType_ from '../events/EventType.js';
import _ol_has_ from '../has.js';
import _ol_interaction_Interaction_ from '../interaction/Interaction.js';
@@ -204,7 +204,7 @@ _ol_interaction_MouseWheelZoom_.handleEvent = function(mapBrowserEvent) {
if (rebound === 0 && this.constrainResolution_) {
view.animate({
resolution: view.constrainResolution(resolution, delta > 0 ? -1 : 1),
easing: _ol_easing_.easeOut,
easing: easeOut,
anchor: this.lastAnchor_,
duration: this.duration_
});
@@ -213,14 +213,14 @@ _ol_interaction_MouseWheelZoom_.handleEvent = function(mapBrowserEvent) {
if (rebound > 0) {
view.animate({
resolution: minResolution,
easing: _ol_easing_.easeOut,
easing: easeOut,
anchor: this.lastAnchor_,
duration: 500
});
} else if (rebound < 0) {
view.animate({
resolution: maxResolution,
easing: _ol_easing_.easeOut,
easing: easeOut,
anchor: this.lastAnchor_,
duration: 500
});