Touch
Provides functionality to add handle touch events such as tap, double tap, and tap hold.
Properties
swipeSettings SwipeSettings
Specifies the settings for the swipe event.
Default:
{ swipeThresholdDistance: 50 }
tapHoldThreshold Number
Specifies the time in milliseconds to delay the tap hold event.
Default:
750
tapThreshold Number
Specifies the time in milliseconds to delay the tap event.
Default:
350
Methods
addEventListener
Attaches an event handler to a specified element. This method allows you to set up a function that will be called whenever the specified event is delivered to the target element.
Parameter | Type | Description |
---|---|---|
eventName | String | A string value that defines the name of the event. |
handler | Function | Defines the function to run when the event is triggered. |
Returns: Void
dataBind
Applies all pending property changes to the Button.
Returns: Void
destroy
Destroys the Aware instance, detaches all related events, removes attributes, css classes and restores the root element.
Returns: Void
removeEventListener
Removes the attached event handler for the specified event listener.
Parameter | Type | Description |
---|---|---|
eventName | String | A string value that defines the name of the event to be removed. |
handler | Function | Defines the function to be removed. |
Returns: Void
Events
scroll EmitType<ScrollEventArgs>
Specifies the callback function for the scroll event.
swipe EmitType<SwipeEventArgs>
Specifies the callback function for the swipe event.
tap EmitType<TapEventArgs>
Specifies the callback function for the tap event.
tapHold EmitType<TapEventArgs>
Specifies the callback function for the tapHold event.