bill 2 月之前
父节点
当前提交
8ee8a198bc
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/core/hook/use-selection.ts

+ 5 - 3
src/core/hook/use-selection.ts

@@ -202,6 +202,7 @@ export const useSelectionShowIcons = installGlobalVar(() => {
   };
   const invConfig = useViewerInvertTransformConfig()
   const status = useMouseShapesStatus();
+  const getChildren = useGetFormalChildren()
 
   const store = useStore();
   const invMat = useViewerInvertTransform();
@@ -213,9 +214,10 @@ export const useSelectionShowIcons = installGlobalVar(() => {
     });
     return [1, 0, 0, 1, center.x, center.y];
   };
-  const shapes = computed(() =>
-    status.selects.filter((shape) => store.getType(shape.id()) !== "group")
-  );
+  const shapes = computed(() => {
+    const child = getChildren()
+    return status.selects.filter((shape) => store.getType(shape.id()) !== "group" && child.includes(shape))
+  });
   const unMountMap = new WeakMap<EntityShape, () => void>();
   watch(shapes, (shapes, oldShapes) => {
     const { added, deleted } = diffArrayChange(shapes, oldShapes);