From 8cc5be1212483e3e92543c9fcbfe34abc95eb08d Mon Sep 17 00:00:00 2001 From: Tanner Linsley Date: Thu, 16 Apr 2015 13:57:27 -0600 Subject: [PATCH] Revert changes to build --- Chart.js | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/Chart.js b/Chart.js index f9b30f0a7..c264262ba 100644 --- a/Chart.js +++ b/Chart.js @@ -1984,58 +1984,6 @@ } }); - Chart.animationService = { - animations: [], - addAnimation: function(chart, animationObject) { - for (var index = 0; index < this.animations.length; ++ index){ - if (this.animations[index].chart === chart){ - // replacing an in progress animation - this.animations[index].lastTimeRun = null; - this.animations[index].animationObject = animationObject; - return; - } - } - - this.animations.push({ - chart: chart, - animationObject: animationObject, - lastTimeRun: null - }); - - // If there are no animations queued, manually kickstart a digest, for lack of a better word - if(!this.animations.length){ - helpers.requestAnimFrame(this.startDigest); - } - }, - startDigest: function() { - - for (var i = 0; i < this.animations.length; i++) { - - var currentAnimation = this.animations[i]; - - if (currentAnimation.animationObject.currentStep === null){ - currentAnimation.animationObject.currentStep = 0; - } else { - currentAnimation.animationObject.currentStep++; - } - - currentAnimation.animationObject.render(currentAnimation.animationObject); - - if (currentAnimation.animationObject.currentStep == currentAnimation.animationObject.numSteps){ - // executed the last frame. Remove the animation. - this.animations.splice(i, 1); - // Keep the index in place to offset the splice - i--; - } - } - - // Do we have more stuff to animate? - if (this.animations.length > 0){ - requestAnimationFrame(this.startDigest); - } - } - }; - // Attach global event to resize each chart instance when the browser resizes helpers.addEvent(window, "resize", (function(){ // Basic debounce of resize function so it doesn't hurt performance when resizing browser. -- 2.47.2