joewalnes / smoothie

Smoothie Charts: smooooooth JavaScript charts for realtime streaming data
http://smoothiecharts.org
Other
2.25k stars 232 forks source link

Allow Smoothie to resize on high dpr screens #49

Closed copacetic closed 10 years ago

copacetic commented 10 years ago

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.

copacetic commented 10 years ago

@drewnoakes

drewnoakes commented 10 years ago

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.

drewnoakes commented 10 years ago

Tested and this fixes the bug. Thanks a lot!

copacetic commented 10 years ago

Awesome!

copacetic commented 10 years ago

@drewnoakes you can actually simulate this very well in chrome using device emulation in the developer's tools. Thanks for the speedy review!

drewnoakes commented 10 years ago

Good idea. I'll check it out, thanks :)