Only store the original device context ratio once

This commit is contained in:
Evert Timberg 2015-09-18 19:22:54 -04:00
parent 8d47693448
commit 97cec8604a

View File

@ -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