@@ -2,7 +2,7 @@ import { computed, markRaw, nextTick, reactive, ref, watch } from 'vue'
2
2
import type { Brush , Options as DrauuOptions , DrawingMode } from 'drauu'
3
3
import { createDrauu } from 'drauu'
4
4
import { createSharedComposable , toReactive , useLocalStorage } from '@vueuse/core'
5
- import { drawingState , onPatch , patch } from '../state/drawings'
5
+ import { drawingState , onPatchDrawingState , patchDrawingState } from '../state/drawings'
6
6
import { configs } from '../env'
7
7
import { isInputting } from '../state'
8
8
import { useNav } from './useNav'
@@ -67,7 +67,7 @@ export const useDrawings = createSharedComposable(() => {
67
67
function clearDrauu ( ) {
68
68
drauu . clear ( )
69
69
if ( syncUp . value )
70
- patch ( currentSlideNo . value , '' )
70
+ patchDrawingState ( currentSlideNo . value , '' )
71
71
}
72
72
73
73
function updateState ( ) {
@@ -93,11 +93,11 @@ export const useDrawings = createSharedComposable(() => {
93
93
const dump = drauu . dump ( )
94
94
const key = currentSlideNo . value
95
95
if ( ( drawingState [ key ] || '' ) !== dump && syncUp . value )
96
- patch ( key , drauu . dump ( ) )
96
+ patchDrawingState ( key , drauu . dump ( ) )
97
97
}
98
98
} )
99
99
100
- onPatch ( ( state ) => {
100
+ onPatchDrawingState ( ( state ) => {
101
101
disableDump = true
102
102
if ( state [ currentSlideNo . value ] != null )
103
103
drauu . load ( state [ currentSlideNo . value ] || '' )
0 commit comments