Skip to content

Commit

Permalink
Use ol.easing instead of goog.fx.easing
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Mar 9, 2013
1 parent e12458b commit 77bd279
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions src/ol/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

goog.provide('ol.animation');

goog.require('goog.fx.easing');
goog.require('ol.PreRenderFunction');
goog.require('ol.ViewHint');
goog.require('ol.easing');
Expand Down Expand Up @@ -48,7 +47,7 @@ ol.animation.pan = function(options) {
var sourceY = source.y;
var duration = goog.isDef(options.duration) ? options.duration : 1000;
var easing = goog.isDef(options.easing) ?
options.easing : goog.fx.easing.inAndOut;
options.easing : ol.easing.inAndOut;
return function(map, frameState) {
if (frameState.time < start) {
frameState.animate = true;
Expand Down Expand Up @@ -79,7 +78,7 @@ ol.animation.rotate = function(options) {
var start = goog.isDef(options.start) ? options.start : goog.now();
var duration = goog.isDef(options.duration) ? options.duration : 1000;
var easing = goog.isDef(options.easing) ?
options.easing : goog.fx.easing.inAndOut;
options.easing : ol.easing.inAndOut;

return function(map, frameState) {
if (frameState.time < start) {
Expand Down
4 changes: 2 additions & 2 deletions src/ol/easing.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ ol.easing.linear = function(t) {
*/
ol.easing.upAndDown = function(t) {
if (t < 0.5) {
return goog.fx.easing.inAndOut(2 * t);
return ol.easing.inAndOut(2 * t);
} else {
return 1 - goog.fx.easing.inAndOut(2 * (t - 0.5));
return 1 - ol.easing.inAndOut(2 * (t - 0.5));
}
};

Expand Down
9 changes: 4 additions & 5 deletions src/ol/view2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
goog.provide('ol.View2D');
goog.provide('ol.View2DProperty');

goog.require('goog.fx.easing');
goog.require('ol.Constraints');
goog.require('ol.Coordinate');
goog.require('ol.Extent');
Expand Down Expand Up @@ -308,13 +307,13 @@ ol.View2D.prototype.rotateWithoutConstraints =
map.addPreRenderFunction(ol.animation.rotate({
rotation: currentRotation,
duration: opt_duration,
easing: goog.fx.easing.easeOut
easing: ol.easing.easeOut
}));
if (goog.isDef(opt_anchor)) {
map.addPreRenderFunction(ol.animation.pan({
source: currentCenter,
duration: opt_duration,
easing: goog.fx.easing.easeOut
easing: ol.easing.easeOut
}));
}
}
Expand Down Expand Up @@ -382,13 +381,13 @@ ol.View2D.prototype.zoomWithoutConstraints =
map.addPreRenderFunction(ol.animation.zoom({
resolution: currentResolution,
duration: opt_duration,
easing: goog.fx.easing.easeOut
easing: ol.easing.easeOut
}));
if (goog.isDef(opt_anchor)) {
map.addPreRenderFunction(ol.animation.pan({
source: currentCenter,
duration: opt_duration,
easing: goog.fx.easing.easeOut
easing: ol.easing.easeOut
}));
}
}
Expand Down

0 comments on commit 77bd279

Please sign in to comment.