mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
Only store the original device context ratio once
This commit is contained in:
parent
8d47693448
commit
97cec8604a
@ -758,7 +758,7 @@
|
|||||||
// Store the device pixel ratio so that we can go backwards in `destroy`.
|
// 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
|
// The devicePixelRatio changes with zoom, so there are no guarantees that it is the same
|
||||||
// when destroy is called
|
// when destroy is called
|
||||||
chart.originalDevicePixelRatio = window.devicePixelRatio;
|
chart.originalDevicePixelRatio = chart.originalDevicePixelRatio || window.devicePixelRatio;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//-- Canvas methods
|
//-- Canvas methods
|
||||||
|
Loading…
Reference in New Issue
Block a user