Merge pull request #69 from CartoDB/68-fix_extra_frame
check loop condition before render
This commit is contained in:
commit
d25011681a
@ -116,7 +116,6 @@ var cancelAnimationFrame = global.cancelAnimationFrame
|
|||||||
delta = Math.min(this.options.maxDelta, delta);
|
delta = Math.min(this.options.maxDelta, delta);
|
||||||
this._t0 = t1;
|
this._t0 = t1;
|
||||||
this._time += delta;
|
this._time += delta;
|
||||||
this.time(this._time);
|
|
||||||
if(this.step() >= this.options.steps) {
|
if(this.step() >= this.options.steps) {
|
||||||
this._time = 0;
|
this._time = 0;
|
||||||
if(!this.options.loop){
|
if(!this.options.loop){
|
||||||
@ -124,6 +123,7 @@ var cancelAnimationFrame = global.cancelAnimationFrame
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.running) {
|
if(this.running) {
|
||||||
|
this.time(this._time);
|
||||||
requestAnimationFrame(this._tick);
|
requestAnimationFrame(this._tick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user