From: Evert Timberg Date: Fri, 18 Sep 2015 23:22:54 +0000 (-0400) Subject: Only store the original device context ratio once X-Git-Tag: 2.0.0-alpha4~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1467%2Fhead;p=thirdparty%2FChart.js.git Only store the original device context ratio once --- diff --git a/src/core/core.helpers.js b/src/core/core.helpers.js index 8d6790bf9..02ee89aef 100644 --- a/src/core/core.helpers.js +++ b/src/core/core.helpers.js @@ -758,7 +758,7 @@ // 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 = window.devicePixelRatio; + chart.originalDevicePixelRatio = chart.originalDevicePixelRatio || window.devicePixelRatio; } }, //-- Canvas methods