PixelsCommander / Propeller

JavaScript library to rotate elements with mouse or touch gestures. Supports inertia and stepwise rotation. Optimized for better performance.
http://pixelscommander.com/polygon/propeller/
409 stars 58 forks source link

Touch event position choice #19

Closed realzzz closed 6 years ago

realzzz commented 8 years ago

Short explain: clientX clientY is not influenced by the screen scroll thus it shall have a higher priority in usage.

Long explain: I'm building a new html editor and integrated Propeller into project. I met the problem that rotation is not working properly when the editor canvas scrolled up. After I traced the code, I found pageY is increased when scrolling the window, this caused offsetY's range changed from (-n, n) to (n1, n2), which result in partial circle of rotate. So I suggested use clientX&clientY first since they are consistent during the scroll of window.