From 33303d8d8addd8adae94c13840a0957494b25ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=BCsel?= Date: Mon, 18 Jan 2016 17:46:11 +0100 Subject: [PATCH] Fixes resize() function --- src/core/core.controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/core.controller.js b/src/core/core.controller.js index e4da7af74..654964c0b 100644 --- a/src/core/core.controller.js +++ b/src/core/core.controller.js @@ -90,12 +90,15 @@ 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); }