You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change offsetX and offsetY calculations in PointerEventManager (#2938)
## Description
While working on `PointerTracker` refactor and adding `relativeCoords` to it, I've noticed that `offsetX`/`offsetY` in `PointerEventManager` use `PointerEvent.offsetX` (and `offsetY` respectively) while `TouchEventManager` calculates this property by calculating the difference between `clientX` and bounding box (`event.clientX - rect.left`). I've decided to unify this behavior so that `offset` is now calculated in `PointerEventManager` the same way as in `TouchEventManager`.
As. you can see in the videos below, those 2 values may have different results - that is the main reason behind unifying them. `offset` property is used only in `relativeCoords` which have been recently introduced, so it won't be a breaking change.
## Test plan
Tested by adding `console.table` in `onPointerMove` inside `PanGestureHandler`
0 commit comments