UNPKG

dnd-core

Version:

Drag and drop sans the GUI

13 lines (11 loc) 387 B
import type { DragDropManager, SentinelAction } from '../../interfaces.js' import { PUBLISH_DRAG_SOURCE } from './types.js' export function createPublishDragSource(manager: DragDropManager) { return function publishDragSource(): SentinelAction | undefined { const monitor = manager.getMonitor() if (monitor.isDragging()) { return { type: PUBLISH_DRAG_SOURCE } } return } }