From 04f1e5745988742368131922663b21a229a27ef3 Mon Sep 17 00:00:00 2001 From: Evert Timberg Date: Tue, 15 Mar 2016 20:03:28 -0400 Subject: [PATCH] Fix zoom reset --- src/core/core.helpers.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/core.helpers.js b/src/core/core.helpers.js index 37355f00a..a57cb71af 100644 --- a/src/core/core.helpers.js +++ b/src/core/core.helpers.js @@ -780,14 +780,14 @@ module.exports = function(Chart) { ctx.canvas.width = width * pixelRatio; ctx.scale(pixelRatio, pixelRatio); - ctx.canvas.style.width = width + 'px'; - ctx.canvas.style.height = height + 'px'; - // Store the device pixel ratio so that we can go backwards in `destroy`. // The devicePixelRatio changes with zoom, so there are no guarantees that it is the same // when destroy is called chart.originalDevicePixelRatio = chart.originalDevicePixelRatio || pixelRatio; } + + ctx.canvas.style.width = width + 'px'; + ctx.canvas.style.height = height + 'px'; }; //-- Canvas methods helpers.clear = function(chart) { -- 2.47.2