mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +08:00
refact: locationX/locationY -> getX()/getY()
This commit is contained in:
@ -400,8 +400,8 @@ function _getDoubleTapArgs(view: View, e: android.view.MotionEvent): DoubleTapGe
|
|||||||
type: GestureTypes.doubleTap,
|
type: GestureTypes.doubleTap,
|
||||||
view: view,
|
view: view,
|
||||||
android: e,
|
android: e,
|
||||||
locationX: e.getX() / layout.getDisplayDensity(),
|
getX: () => e.getX() / layout.getDisplayDensity(),
|
||||||
locationY: e.getY() / layout.getDisplayDensity(),
|
getY: () => e.getY() / layout.getDisplayDensity(),
|
||||||
ios: undefined,
|
ios: undefined,
|
||||||
object: view,
|
object: view,
|
||||||
eventName: toString(GestureTypes.doubleTap),
|
eventName: toString(GestureTypes.doubleTap),
|
||||||
|
4
nativescript-core/ui/gestures/gestures.d.ts
vendored
4
nativescript-core/ui/gestures/gestures.d.ts
vendored
@ -216,8 +216,8 @@ export interface PinchGestureEventData extends GestureEventDataWithState {
|
|||||||
* Provides gesture event data for double tap gesture.
|
* Provides gesture event data for double tap gesture.
|
||||||
*/
|
*/
|
||||||
export interface DoubleTapGestureEventData extends GestureEventData {
|
export interface DoubleTapGestureEventData extends GestureEventData {
|
||||||
locationX: number;
|
getX(): number;
|
||||||
locationY: number;
|
getY(): number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -309,8 +309,8 @@ function _getDoubleTapData(args: GestureEventData): DoubleTapGestureEventData {
|
|||||||
view: args.view,
|
view: args.view,
|
||||||
ios: args.ios,
|
ios: args.ios,
|
||||||
android: undefined,
|
android: undefined,
|
||||||
locationX: location.x,
|
getX: () => location.x,
|
||||||
locationY: location.y,
|
getY: () => location.y,
|
||||||
object: args.view,
|
object: args.view,
|
||||||
eventName: toString(args.type)
|
eventName: toString(args.type)
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user