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:
+3
-3
@@ -19,8 +19,8 @@
|
||||
|
||||
var interval = 10; // arbitrary value for tests
|
||||
|
||||
var originalLoopAnimation = OpenLayers.Util.startAnimation;
|
||||
OpenLayers.Util.startAnimation = function(callback) {
|
||||
var originalLoopAnimation = OpenLayers.Animation.start;
|
||||
OpenLayers.Animation.start = function(callback) {
|
||||
while (!finish) {
|
||||
var time = new Date().getTime();
|
||||
Date.prototype.getTime = function() { return time+interval };
|
||||
@@ -51,7 +51,7 @@
|
||||
});
|
||||
|
||||
Date.prototype.getTime = originalGetTime;
|
||||
OpenLayers.Util.startAnimation = originalLoopAnimation;
|
||||
OpenLayers.Animation.start = originalLoopAnimation;
|
||||
}
|
||||
|
||||
function test_Angle (t) {
|
||||
|
||||
Reference in New Issue
Block a user