Skip to content

Workspace.getDropDirection method

Workspace › getDropDirection

Unofficial

Get the direction where the leaf should be dropped on dragevent

Signature:

getDropDirection(e: DragEvent, rect: DOMRect, directions: ["left", "right"], leaf: WorkspaceLeaf): 'bottom' | 'center' | 'left' | 'right' | 'top'

Parameters:

Parameter Type Description
e DragEvent The drag event.
rect DOMRect The bounding rectangle of the drop target.
directions ["left", "right"] Allowed drop directions.
leaf WorkspaceLeaf The leaf being dropped.

Returns: 'bottom' | 'center' | 'left' | 'right' | 'top'The drop direction.