object 수정 시 uuid 변경
This commit is contained in:
parent
0de81807bd
commit
a95b7ebe4c
@ -1,5 +1,6 @@
|
||||
import { useState } from 'react'
|
||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||
import { v4 as uuidv4 } from 'uuid'
|
||||
import { canvasSizeState, canvasState, canvasZoomState, currentObjectState, fontFamilyState, fontSizeState } from '@/store/canvasAtom'
|
||||
import { QPolygon } from '@/components/fabric/QPolygon'
|
||||
|
||||
@ -32,7 +33,9 @@ export function useCanvasEvent() {
|
||||
const objectEvent = {
|
||||
onChange: (e) => {
|
||||
const target = e.target
|
||||
|
||||
if (target) {
|
||||
target.uuid = uuidv4()
|
||||
// settleDown(target)
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user