I realize a proper fix should probably do something like what #161 does, I’ll probably give it a try later as I noticed some HiDPI issues on my Windows.
But in the meanwhile this at least fixes MacOS (and doesn’t break on Windows as the scale is always 1):
On Mac the initial mouse down coordinates for demos don’t get recorded properly and result in a «jump» when rotating or spanning:
I noticed there is a PR that’s been open for quite a while about this: #109 but it changes code that’s not there anymore. I also noticed the scaling has been removed at other locations: https://github.com/g3n/engine/blob/master/window/canvas.go#L411 https://github.com/g3n/engine/blob/master/window/canvas.go#L423 and https://github.com/g3n/engine/blob/master/window/canvas.go#L434 therefore I mimicked these comments in the change in the PR.
I realize a proper fix should probably do something like what #161 does, I’ll probably give it a try later as I noticed some HiDPI issues on my Windows. But in the meanwhile this at least fixes MacOS (and doesn’t break on Windows as the scale is always 1):