File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/core/ui/gestures Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -601,10 +601,14 @@ class TouchGestureEventData implements TouchGestureEventData {
601
601
}
602
602
603
603
getX ( ) : number {
604
- return this . getMainPointer ( ) . locationInView ( this . view . nativeViewProtected ) . x ;
604
+ const offset = this . view . nativeViewProtected . contentOffset ;
605
+ const offsetX = offset ? offset . x : 0 ;
606
+ return this . getMainPointer ( ) . locationInView ( this . view . nativeViewProtected ) . x - offsetX ;
605
607
}
606
608
607
609
getY ( ) : number {
608
- return this . getMainPointer ( ) . locationInView ( this . view . nativeViewProtected ) . y ;
610
+ const offset = this . view . nativeViewProtected . contentOffset ;
611
+ const offsetY = offset ? offset . y : 0 ;
612
+ return this . getMainPointer ( ) . locationInView ( this . view . nativeViewProtected ) . y - offsetY ;
609
613
}
610
614
}
You can’t perform that action at this time.
0 commit comments