import Collidable from '@shopify/draggable/src/Plugins/Collidable/Collidable.js'Collidable
Extends:
Collidable plugin which detects colliding elements while dragging
Constructor Summary
| Public Constructor | ||
| public |
constructor(draggable: Draggable) Collidable constructor. |
|
Member Summary
| Public Members | ||
| public |
Animation frame for finding colliding elements |
|
| public |
currentlyCollidingElement: HTMLElement | null Keeps track of currently colliding elements |
|
| public |
lastCollidingElement: HTMLElement | null Keeps track of currently colliding elements |
|
Method Summary
| Public Methods | ||
| public |
attach() Attaches plugins event listeners |
|
| public |
detach() Detaches plugins event listeners |
|
| public |
getCollidables(): HTMLElement[] Returns current collidables based on |
|
| Private Methods | ||
| private |
[onDragMove](event: DragMoveEvent) Drag move handler |
|
| private |
[onDragStop](event: DragStopEvent) Drag stop handler |
|
| private |
[onRequestAnimationFrame](target: HTMLElement): Function Animation frame function |
|
Public Constructors
Public Members
Public Methods
public getCollidables(): HTMLElement[] source
Returns current collidables based on collidables option
Return:
| HTMLElement[] |
Private Methods
private [onDragMove](event: DragMoveEvent) source
Drag move handler
Params:
| Name | Type | Attribute | Description |
| event | DragMoveEvent | Drag move event |
private [onDragStop](event: DragStopEvent) source
Drag stop handler
Params:
| Name | Type | Attribute | Description |
| event | DragStopEvent | Drag stop event |
