mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 02:54:11 +08:00
fix(ios): do not convert tap event data to device pixels twice (#9935)
BREAKING CHANGE: tapData.getX() and tapData.getY() will now return correctly in DIP, so any extra conversions (like calling toDevicePixels) twice must be changed.
This commit is contained in:

committed by
Nathan Walker

parent
4a5e2e2ac0
commit
3681fd4384
@ -389,8 +389,8 @@ function _getTapData(args: GestureEventData): TapGestureEventData {
|
||||
eventName: args.eventName,
|
||||
object: args.object,
|
||||
getPointerCount: () => recognizer.numberOfTouches,
|
||||
getX: () => layout.toDeviceIndependentPixels(center.x),
|
||||
getY: () => layout.toDeviceIndependentPixels(center.y),
|
||||
getX: () => center.x,
|
||||
getY: () => center.y,
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user