(editor: Editor)
| 8 | const EDITOR_TO_IMAGE_STORE = new WeakMap<Editor, UseBoundStore<StoreApi<ImageViewerStore>>>() |
| 9 | |
| 10 | export const getViewerStore = (editor: Editor) => { |
| 11 | let store = EDITOR_TO_IMAGE_STORE.get(editor) |
| 12 | if (!store) { |
| 13 | store = create<ImageViewerStore>(() => ({ |
| 14 | visible: false, |
| 15 | index: 0, |
| 16 | })) |
| 17 | EDITOR_TO_IMAGE_STORE.set(editor, store) |
| 18 | } |
| 19 | return store |
| 20 | } |
no test coverage detected
searching dependent graphs…