|
|
@@ -163,8 +163,10 @@ type ShapeIconArgs = Partial<
|
|
|
>;
|
|
|
export const useShapesIcon = (
|
|
|
shapes: Ref<EntityShape[] | undefined>,
|
|
|
- args: ShapeIconArgs = {}
|
|
|
+ args: ShapeIconArgs = {},
|
|
|
+ disableIds?: string[]
|
|
|
) => {
|
|
|
+ const store = useStore()
|
|
|
const mParts = useMountParts();
|
|
|
const { on } = useOnComponentBoundChange();
|
|
|
const iconProps = {
|
|
|
@@ -197,6 +199,10 @@ export const useShapesIcon = (
|
|
|
}
|
|
|
const { added, deleted } = diffArrayChange(shapes || [], oldShapes || []);
|
|
|
for (const addShape of added) {
|
|
|
+ if (disableIds?.includes(addShape.attrs.id)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ // addShape.attrs.id
|
|
|
const mat = ref(getShapeMat(addShape));
|
|
|
const data = reactive({ ...iconProps, mat: mat });
|
|
|
const update = frameEebounce(() => {
|
|
|
@@ -285,6 +291,15 @@ export const useGetShapeSelectionManage = installGlobalVar(() => {
|
|
|
});
|
|
|
|
|
|
export const useSelectionRevise = installGlobalVar(() => {
|
|
|
+ const groupConfig = {
|
|
|
+ id: onlyId(),
|
|
|
+ createTime: Date.now(),
|
|
|
+ lock: false,
|
|
|
+ opacity: 1,
|
|
|
+ ref: false,
|
|
|
+ listening: false,
|
|
|
+ stroke: themeColor,
|
|
|
+ };
|
|
|
const getShapeSelectionManage = useGetShapeSelectionManage();
|
|
|
const mParts = useMountParts();
|
|
|
const status = useMouseShapesStatus();
|
|
|
@@ -310,7 +325,7 @@ export const useSelectionRevise = installGlobalVar(() => {
|
|
|
}
|
|
|
}
|
|
|
);
|
|
|
- useShapesIcon(computed(() => status.selects));
|
|
|
+ useShapesIcon(computed(() => status.selects), undefined, [groupConfig.id]);
|
|
|
|
|
|
const filterSelect = debounce(() => {
|
|
|
const selects = new Set<EntityShape>();
|
|
|
@@ -338,15 +353,6 @@ export const useSelectionRevise = installGlobalVar(() => {
|
|
|
const ids = computed(() => [
|
|
|
...new Set(status.selects.map((item) => item.id())),
|
|
|
]);
|
|
|
- const groupConfig = {
|
|
|
- id: onlyId(),
|
|
|
- createTime: Date.now(),
|
|
|
- lock: false,
|
|
|
- opacity: 1,
|
|
|
- ref: false,
|
|
|
- listening: false,
|
|
|
- stroke: themeColor,
|
|
|
- };
|
|
|
const operMode = useOperMode();
|
|
|
const layer = useFormalLayer();
|
|
|
watch(
|