fix(bug): 1/2/3
This commit is contained in:
@@ -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: () => {
|
||||
|
||||
Reference in New Issue
Block a user