Skip to content

Latest commit

 

History

History
73 lines (49 loc) · 2.3 KB

File metadata and controls

73 lines (49 loc) · 2.3 KB

import CodeBlock from '@theme/CodeBlock';

onBegin

{ {onBegin: (event: ${props.gesture}HandlerData) => void} }

Set the callback that is being called when given gesture handler starts receiving touches. At the moment of this callback the handler is not yet in an active state and we don't know yet if it will recognize the gesture at all.

onActivate

{ {onActivate: (event: ${props.gesture}HandlerData) => void} }

Set the callback that is being called when the gesture is recognized by the handler and it transitions to the active state.

onDeactivate

{ {onDeactivate: (event: ${props.gesture}HandlerData & { canceled: boolean }) => void} }

Set the callback that is being called when the gesture that was recognized by the handler finishes. It will be called only if the handler was previously in the active state. The event object contains a canceled property — if the gesture was interrupted, canceled is set to true. Otherwise it is set to false.

onFinalize

{ {onFinalize: (event: ${props.gesture}HandlerData & { canceled: boolean }) => void} }

Set the callback that is being called when the handler finalizes handling gesture - the gesture was recognized and has finished or it failed to recognize. The event object contains a canceled property — if the gesture failed to activate or was interrupted, canceled is set to true. Otherwise it is set to false.

onTouchesDown

onTouchesDown: (event: GestureTouchEvent) => void

Set the onTouchesDown callback which is called every time a finger is placed on the screen.

onTouchesMove

onTouchesMove: (event: GestureTouchEvent) => void

Set the onTouchesMove callback which is called every time a finger is moved on the screen.

onTouchesUp

onTouchesUp: (event: GestureTouchEvent) => void

Set the onTouchesUp callback which is called every time a finger is lifted from the screen.

onTouchesCancel

onTouchesCancel: (event: GestureTouchEvent) => void

Set the onTouchesCancel callback which is called every time a finger stops being tracked, for example when the gesture finishes.