-
-
Notifications
You must be signed in to change notification settings - Fork 980
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Web] Fix anchor
and focal
points.
#2932
base: main
Are you sure you want to change the base?
Conversation
const firstPointerCoords = | ||
tracker.getLastViewRelativeCoords(firstPointerID); | ||
const secondPointerCoords = | ||
tracker.getLastViewRelativeCoords(secondPointerID); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, does this actually work? In my head, when you try to calculate rotation based on points in the view coordinate space you would get jitter.
When you have two pointers on a view and you rotate them by some angle and then use that angle to rotate the view, that should cancel out. Essentially, the points would be constant in the coordinates of a view, even though they are different in the coordinates of the parent.
Or does transform
simply not apply to the pointer/touch events sent by the browser?
Description
On
web
,anchor
andfocal
points are calculated with respect towindow
, not the actual handlers'view
. This PR changes this behavior so that both of these points are calculated correctly.Fixes #2929.
Test plan
Tested on example app and example from #2929
Test code