MCPcopy Create free account
hub / github.com/editablejs/editable / DragStore

Interface DragStore

packages/editor/src/plugin/drag.ts:5–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3import { Editable } from './editable'
4
5export interface DragStore {
6 drag: {
7 type: 'block' | 'text'
8 /**
9 * 拖拽的开始位置
10 */
11 from: Range | Path
12 /**
13 * 拖拽到目标位置
14 */
15 to: Selection | Path
16 /**
17 * 拖拽的数据
18 */
19 data: DataTransfer
20 /**
21 * 当前鼠标位置
22 */
23 position: Record<'x' | 'y', number>
24 } | null
25}
26
27const EDITOR_TO_DRAG_STORE = new WeakMap<Editor, UseBoundStore<StoreApi<DragStore>>>()
28

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…