fix(tag): fix label tag
This commit is contained in:
@@ -5328,6 +5328,15 @@ export const usePaperStore = create<PaperState>((set) => ({
|
||||
}) as paper.Item[]
|
||||
tagItems.forEach((item) => {
|
||||
if (item.data?.tag_category === "mask") return
|
||||
const anchor = item.data?.tag_anchor
|
||||
if (Array.isArray(anchor) && anchor.length >= 2) {
|
||||
const anchorX = Number(anchor[0])
|
||||
const anchorY = Number(anchor[1])
|
||||
if (Number.isFinite(anchorX) && Number.isFinite(anchorY)) {
|
||||
item.scale(1 / newScale, new paper.Point(anchorX, anchorY))
|
||||
return
|
||||
}
|
||||
}
|
||||
item.scale(1 / newScale)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user