]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Only store the original device context ratio once 1467/head
authorEvert Timberg <evert.timberg@gmail.com>
Fri, 18 Sep 2015 23:22:54 +0000 (19:22 -0400)
committerEvert Timberg <evert.timberg@gmail.com>
Fri, 18 Sep 2015 23:22:54 +0000 (19:22 -0400)
src/core/core.helpers.js

index 8d6790bf9ceecedf64c0c4713e4619e1469810ee..02ee89aef5aa37a5a825c618178d82c6d5eb8646 100644 (file)
                                // 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