Moving animation methods out of Util.js.

Animation methods get their own module, giving methods more sensible names:

 * `OpenLayers.Animation.requestFrame` (was `OpenLayers.Util.requestAnimationFrame`)
 * `OpenLayers.Animation.start` (was `OpenLayers.Util.startAnimation`)
 * `OpenLayers.Animation.stop` (was `OpenLayers.Util.stopAnimation`)
This commit is contained in:
tschaub
2012-01-03 09:43:50 -07:00
parent 3f6e0141a4
commit 3556af9cb2
10 changed files with 197 additions and 154 deletions

View File

@@ -49,12 +49,12 @@
t.plan(2);
var tween = new OpenLayers.Tween();
tween.animationId = OpenLayers.Util.startAnimation(function() {});
tween.animationId = OpenLayers.Animation.start(function() {});
tween.playing = true;
tween.stop();
t.eq(tween.animationId, null, "tween correctly stopped");
tween.animationId = OpenLayers.Util.startAnimation(function() {});
tween.animationId = OpenLayers.Animation.start(function() {});
tween.playing = false;
tween.stop();
t.ok(tween.animationId != null, "stop method doesn't do anything if tween isn't running");