Function
| Static Public Summary | ||
| public |
Get the closest parent element of a given element that matches the given selector string or matching function |
|
| public |
Returns the distance between two points |
|
| public |
requestNextAnimationFrame(callback: *): * |
|
| public |
touchCoords(event: TouchEvent): Touch Returns the first touch event found in touches or changedTouches of a touch events. |
|
Static Public
public closest(element: Element, selector: String | Function): Element | null source
import closest from '@shopify/draggable/src/shared/utils/closest/closest.js'Get the closest parent element of a given element that matches the given selector string or matching function
public distance(x1: Number, y1: Number, x2: Number, y2: Number): Number source
import distance from '@shopify/draggable/src/shared/utils/distance/distance.js'Returns the distance between two points
public requestNextAnimationFrame(callback: *): * source
import requestNextAnimationFrame from '@shopify/draggable/src/shared/utils/requestNextAnimationFrame/requestNextAnimationFrame.js'Params:
| Name | Type | Attribute | Description |
| callback | * |
Return:
| * |
public touchCoords(event: TouchEvent): Touch source
import touchCoords from '@shopify/draggable/src/shared/utils/touchCoords/touchCoords.js'Returns the first touch event found in touches or changedTouches of a touch events.
Params:
| Name | Type | Attribute | Description |
| event | TouchEvent | a touch event |
Return:
| Touch | a touch object |
