]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fixes resize() function 1911/head
authorMathias Küsel <mathiask@hotmail.de>
Mon, 18 Jan 2016 16:46:11 +0000 (17:46 +0100)
committerMathias Küsel <mathiask@hotmail.de>
Mon, 18 Jan 2016 16:46:11 +0000 (17:46 +0100)
src/core/core.controller.js

index e4da7af74b01cdaabd0cc894df6fd005bf2e5016..654964c0b05924840aa951db586358bd2a4649a2 100644 (file)
 
                        var sizeChanged = this.chart.width !== newWidth || this.chart.height !== newHeight;
 
+                       if (!sizeChanged)
+                               return this;
+
                        canvas.width = this.chart.width = newWidth;
                        canvas.height = this.chart.height = newHeight;
 
                        helpers.retinaScale(this.chart);
 
-                       if (!silent && sizeChanged) {
+                       if (!silent) {
                                this.stop();
                                this.update(this.options.responsiveAnimationDuration);
                        }