Async animate callback
This commit is contained in:
parent
3063393a92
commit
cbffa458b9
@ -133,8 +133,14 @@ control.prototype.setRequestAnimationFrame = function () {
|
|||||||
var obj = core.status.animateObjs[i];
|
var obj = core.status.animateObjs[i];
|
||||||
if (obj.index == obj.animate.frames.length) {
|
if (obj.index == obj.animate.frames.length) {
|
||||||
// 绘制完毕
|
// 绘制完毕
|
||||||
if (core.isset(obj.callback)) obj.callback();
|
|
||||||
delete core.animateFrame.asyncId[obj.id];
|
delete core.animateFrame.asyncId[obj.id];
|
||||||
|
// 异步执行回调...
|
||||||
|
(function(callback) {
|
||||||
|
setTimeout(function() {
|
||||||
|
if (core.isset(callback))
|
||||||
|
callback();
|
||||||
|
});
|
||||||
|
})(obj.callback);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.maps.drawAnimateFrame(obj.animate, obj.centerX, obj.centerY, obj.index++);
|
core.maps.drawAnimateFrame(obj.animate, obj.centerX, obj.centerY, obj.index++);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user