Skip to content

Commit

Permalink
Merge branch 'fix-delay-for-custom-render-time' into recent-mrs
Browse files Browse the repository at this point in the history
  • Loading branch information
WofWca committed Oct 17, 2021
2 parents 8180e1e + bc27bb2 commit ccc831d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smoothie.js
Expand Up @@ -99,6 +99,7 @@
* Fix a memory leak appearing when some `timeSeries.disabled === true`, by @WofWca (#132)
* Fix: make all lines sharp, by @WofWca (#134)
* Improve performance, by @WofWca (#135)
* Fix `this.delay` not being respected with `nonRealtimeData: true`, by @WofWca (#137)
*/

;(function(exports) {
Expand Down Expand Up @@ -821,7 +822,7 @@
if (this.options.limitFPS > 0 && nowMillis - this.lastRenderTimeMillis < (1000/this.options.limitFPS))
return;

time = time || nowMillis - (this.delay || 0);
time = (time || nowMillis) - (this.delay || 0);

// Round time down to pixel granularity, so motion appears smoother.
time -= time % this.options.millisPerPixel;
Expand Down

0 comments on commit ccc831d

Please sign in to comment.