|
@@ -31,7 +31,7 @@
|
|
|
:data="data"
|
|
|
:line="line"
|
|
|
:showLabel="
|
|
|
- status.active ||
|
|
|
+ active ||
|
|
|
config.showComponentSize ||
|
|
|
isDrawIng ||
|
|
|
dragPointIds?.includes(line.a) ||
|
|
@@ -93,6 +93,7 @@ import { useConfig } from "@/core/hook/use-config.ts";
|
|
|
import { PropertyUpdate, Operate } from "../../html-mount/propertys/index.ts";
|
|
|
import {
|
|
|
useAnimationMouseStyle,
|
|
|
+ useMouseShapesStatus,
|
|
|
useMouseShapeStatus,
|
|
|
} from "@/core/hook/use-mouse-status.ts";
|
|
|
import { themeColor } from "@/constant";
|
|
@@ -104,6 +105,7 @@ import {
|
|
|
} from "./attach-server.ts";
|
|
|
import { useStore } from "@/core/store/index.ts";
|
|
|
import { useHistory } from "@/core/hook/use-history.ts";
|
|
|
+import { useTransformIngShapes } from "@/core/hook/use-global-vars.ts";
|
|
|
|
|
|
const props = defineProps<{
|
|
|
line: LineDataLine;
|
|
@@ -170,7 +172,19 @@ const menus = [
|
|
|
{ label: "删除", handler: delHandler },
|
|
|
];
|
|
|
|
|
|
-const status = useMouseShapeStatus(shape);
|
|
|
+const mStatus = useMouseShapesStatus();
|
|
|
+const joinIds = computed(() => [
|
|
|
+ ...store
|
|
|
+ .getTypeItems("lineIcon")
|
|
|
+ .filter((item) => item.lineId === props.line.id)
|
|
|
+ .map((item) => item.id),
|
|
|
+ props.line.id,
|
|
|
+]);
|
|
|
+const tfShapes = useTransformIngShapes();
|
|
|
+const active = computed(() => {
|
|
|
+ const operShapes = [...tfShapes.value, ...mStatus.actives];
|
|
|
+ return operShapes.some((item) => joinIds.value.includes(item.id()));
|
|
|
+});
|
|
|
const [style] = useAnimationMouseStyle({
|
|
|
shape,
|
|
|
getMouseStyle,
|