Closed filR closed 8 years ago
As far as I can tell, something in 9842135 broke the touch/mouse position when the retina option is on. On a 2x hires retina display, the mouse position is only 50% from where it should be (i.e. 50px instead of 100px).
retina
50px
100px
Reproduce the problem here: http://codepen.io/anon/pen/meBKNL?editors=001 This codepen uses sketch.js from the master branch of this repository.
sketch.js
master
Test the fix here: http://codepen.io/anon/pen/pjWZvo?editors=001 This is the fixed sketch.js from the pull request.
Problem and fix tested on a Macbook Retina, Macbook non-Retina, and on Chrome with various "device pixel ratio" settings in the devtools.
Good spot, thanks! :)
Sure thing, glad I could help. Thanks for creating sketch.js!
As far as I can tell, something in 9842135 broke the touch/mouse position when the
retina
option is on. On a 2x hires retina display, the mouse position is only 50% from where it should be (i.e.50px
instead of100px
).Reproduce the problem here: http://codepen.io/anon/pen/meBKNL?editors=001 This codepen uses
sketch.js
from themaster
branch of this repository.Test the fix here: http://codepen.io/anon/pen/pjWZvo?editors=001 This is the fixed
sketch.js
from the pull request.Problem and fix tested on a Macbook Retina, Macbook non-Retina, and on Chrome with various "device pixel ratio" settings in the devtools.