(editor: Editor)
| 27 | const EDITOR_TO_DRAG_STORE = new WeakMap<Editor, UseBoundStore<StoreApi<DragStore>>>() |
| 28 | |
| 29 | const getDragStore = (editor: Editor) => { |
| 30 | let store = EDITOR_TO_DRAG_STORE.get(editor) |
| 31 | if (!store) { |
| 32 | store = create<DragStore>(() => ({ |
| 33 | drag: null, |
| 34 | })) |
| 35 | EDITOR_TO_DRAG_STORE.set(editor, store) |
| 36 | } |
| 37 | return store |
| 38 | } |
| 39 | |
| 40 | /** |
| 41 | * 拖拽相关状态操作 |