From: Tanner Linsley Date: Sun, 12 Apr 2015 00:42:11 +0000 (-0600) Subject: Always execute last frame X-Git-Tag: v2.0-alpha~37^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70b8bf106c873a7ecb84c1773a141cb5f1a75703;p=thirdparty%2FChart.js.git Always execute last frame --- diff --git a/src/Chart.Core.js b/src/Chart.Core.js index 2c1229d15..e3a83ecab 100755 --- a/src/Chart.Core.js +++ b/src/Chart.Core.js @@ -2132,6 +2132,9 @@ currentAnimation.animationObject.currentStep = 0; } else { currentAnimation.animationObject.currentStep += 1 + framesToDrop; + if(currentAnimation.animationObject.currentStep > currentAnimation.animationObject.numSteps){ + currentAnimation.animationObject.currentStep = currentAnimation.animationObject.numSteps; + } } currentAnimation.animationObject.render(currentAnimation.chartInstance, currentAnimation.animationObject);