From: Evert Timberg Date: Sat, 5 Dec 2015 14:39:25 +0000 (-0500) Subject: Make sure we always have a valid end angle when reseting the model. Previously this... X-Git-Tag: 2.0.0-beta2~34^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f1006c6dedeed8dcd6fc25ba099cc3932329d64;p=thirdparty%2FChart.js.git Make sure we always have a valid end angle when reseting the model. Previously this was undefined and interpreted as 0 in the animation code. --- diff --git a/src/controllers/controller.doughnut.js b/src/controllers/controller.doughnut.js index e6992814d..9a7cea9af 100644 --- a/src/controllers/controller.doughnut.js +++ b/src/controllers/controller.doughnut.js @@ -150,10 +150,11 @@ var resetModel = { x: this.chart.chart.width / 2, y: this.chart.chart.height / 2, - startAngle: Math.PI * -0.5, // use - PI / 2 instead of 3PI / 2 to make animations better. It means that we never deal with overflow during the transition function + startAngle: Math.PI * -0.5, // use - PI / 2 instead of 3PI / 2 to make animations better. It means that we never deal with overflow during the transition function, + endAngle: Math.PI * -0.5, circumference: (this.chart.options.animation.animateRotate) ? 0 : this.calculateCircumference(this.getDataset().data[index]), outerRadius: (this.chart.options.animation.animateScale) ? 0 : this.outerRadius, - innerRadius: (this.chart.options.animation.animateScale) ? 0 : this.innerRadius, + innerRadius: (this.chart.options.animation.animateScale) ? 0 : this.innerRadius }; helpers.extend(arc, {