Closed soulfresh closed 4 years ago
For anyone interested, I've created an API compatible package that resolves this issue and issues #11 and #18:
@soulfresh that's pretty cool. Sorry for holding that on. I can't work on that for the meantime, would you like to take handle of that?
Were you hoping for PRs on the issues I mentioned or were you thinking of merging my package into yours? My package has one change that may pose problems for current users; I removed the requestAnimationFrame
usage so that library users have control over that. Otherwise, it's API compatible.
Ok, I see, it is more elaborate than I initially thought. I've added your package to the readme.
What does this PR do?
Resolves an issue where x/y values are inaccurate if the dimensions of the target element have changed between
change
events. This occurs if the user of this library updates the scale of the target element (or its content) in response todz
changes. The fix is achieved by tracking touch events against the window and then translating those screen coordinates into coordinates relative to the target element.I'm not sure if this will pose issues for any consumers of this library who may be depending on the current functionality.
Fixes #11