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:

ParameterTypeDescription
eDragEventThe drag event.
rectDOMRectThe bounding rectangle of the drop target.
directions["left", "right"]Allowed drop directions.
leafWorkspaceLeafThe leaf being dropped.

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