fix(bug): 1/2/3

This commit is contained in:
zhangheng
2026-04-03 19:29:30 +08:00
parent 7c700bf952
commit b1dca7f2a8
4 changed files with 144 additions and 41 deletions

View File

@@ -1425,27 +1425,17 @@ export const usePaperStore = create<PaperState>((set) => ({
})
// 标识位为true时选中路径隐藏tags; 没选中显示tags
const configs = useTopToolsStore.getState().showTagsConfigs
if (useTopToolsStore.getState().showTags)
if (panMode) {
lastTags.forEach((tag) => {
if (tag.data.tag_category === "mask")
tag.visible = configs.includes("外框")
else if (tag.data.tag_category === "point_text")
tag.visible = configs.includes("点ID")
else tag.visible = true
})
tags.forEach((tag) => {
tag.visible = false
})
} else {
tags.forEach((tag) => {
if (tag.data.tag_category === "mask")
tag.visible = configs.includes("外框")
else if (tag.data.tag_category === "point_text")
tag.visible = configs.includes("点ID")
else tag.visible = true
})
if (useTopToolsStore.getState().showTags) {
const setTagVisibleByConfig = (tag: any) => {
if (tag.data.tag_category === "mask")
tag.visible = configs.includes("外框")
else if (tag.data.tag_category === "point_text")
tag.visible = configs.includes("点ID")
else tag.visible = true
}
lastTags.forEach(setTagVisibleByConfig)
tags.forEach(setTagVisibleByConfig)
}
console.log("鼠标按下 选中路径", activePath, "当前模式", panMode)
@@ -5332,6 +5322,14 @@ export const usePaperStore = create<PaperState>((set) => ({
circles.forEach((circle) => {
circle.scale(1 / newScale)
})
const tagItems = usePaperStore.getState().group!.getItems({
data: { type: "tag" },
}) as paper.Item[]
tagItems.forEach((item) => {
if (item.data?.tag_category === "mask") return
item.scale(1 / newScale)
})
}
},
getAll: () => {