abstract parameter as event

This commit is contained in:
王劲鹏
2021-09-23 15:42:06 +08:00
committed by osborn
parent 6e8c5cc8ea
commit d85f77402c
3 changed files with 36 additions and 12 deletions

View File

@@ -66,7 +66,7 @@ export class GestureContainer extends Stack {
* @param y: the value of event occurs on the y-axis
*/
@Property
onTouchDown?: (x: number, y: number) => void
onTouchDown?: (event: { x: number, y: number }) => void
/**
* Called when the finger moving on the screen
@@ -74,7 +74,7 @@ export class GestureContainer extends Stack {
* @param y: the value of event occurs on the y-axis
*/
@Property
onTouchMove?: (x: number, y: number) => void
onTouchMove?: (event: { x: number, y: number }) => void
/**
* Called when the finger touch up off from the screen
@@ -82,7 +82,7 @@ export class GestureContainer extends Stack {
* @param y: the value of event occurs on the y-axis
*/
@Property
onTouchUp?: (x: number, y: number) => void
onTouchUp?: (event: { x: number, y: number }) => void
/**
* Called when the finger leave from screen
@@ -90,7 +90,7 @@ export class GestureContainer extends Stack {
* @param y: the value of event occurs on the y-axis
*/
@Property
onTouchCancel?: (x: number, y: number) => void
onTouchCancel?: (event: { x: number, y: number }) => void
}
export function gestureContainer(views: View | View[], config?: Partial<GestureContainer>) {