Closed copacetic closed 10 years ago
@drewnoakes
Thanks for this! The code looks good. I've been waiting to get my hands on a retina screen to test this out, as last time I merged a PR related to enableDpiScaling
it introduced a bug. Have an iPad in front of me now and can see that the current code doesn't work very well if you change the chart size in the builder. Will test this now.
Tested and this fixes the bug. Thanks a lot!
Awesome!
@drewnoakes you can actually simulate this very well in chrome using device emulation in the developer's tools. Thanks for the speedy review!
Good idea. I'll check it out, thanks :)
This only runs for devices with a device pixel ratio greater than one and enableDpiScaling on. It checks for changes in the canvas's height or width. If there is a change, it resizes the canvas and adjusts for the device pixel ratio of the window.