(editor: Editor)
| 46 | >() |
| 47 | |
| 48 | const getStore = (editor: Editor) => { |
| 49 | let store = EDITOR_TO_SELECTION_DRAWING_STORE.get(editor) |
| 50 | if (!store) { |
| 51 | store = create<SelectionDrawingStore>(() => ({ |
| 52 | style: { |
| 53 | focusColor: 'rgba(0,127,255,0.3)', |
| 54 | |
| 55 | blurColor: 'rgba(136, 136, 136, 0.3)', |
| 56 | |
| 57 | caretColor: '#000', |
| 58 | |
| 59 | caretWidth: 1, |
| 60 | |
| 61 | dragColor: 'rgb(37, 99, 235)', |
| 62 | |
| 63 | touchWidth: 2, |
| 64 | |
| 65 | touchColor: 'rgb(37, 99, 235)', |
| 66 | }, |
| 67 | selection: null, |
| 68 | rects: null, |
| 69 | enabled: true, |
| 70 | })) |
| 71 | EDITOR_TO_SELECTION_DRAWING_STORE.set(editor, store) |
| 72 | } |
| 73 | return store |
| 74 | } |
| 75 | |
| 76 | export const SelectionDrawing = { |
| 77 | getStore, |
no test coverage detected