|
@@ -17,6 +17,16 @@
|
|
|
opacity: addMode ? 0.3 : data.opacity,
|
|
|
}"
|
|
|
/>
|
|
|
+ <v-circle
|
|
|
+ v-if="zeroEq(lineLen(data.points[0], data.points[1]))"
|
|
|
+ :config="{
|
|
|
+ ...data.points[0],
|
|
|
+ radius: data.strokeWidth * 2,
|
|
|
+ opacity: 0,
|
|
|
+ fill: 'red',
|
|
|
+ offset: { x: data.strokeWidth, y: 0 },
|
|
|
+ }"
|
|
|
+ />
|
|
|
|
|
|
<!-- <EditPolygon
|
|
|
:data="{ ...data, stroke: data.fill, strokeWidth: data.strokeWidth + 5 }"
|
|
@@ -68,7 +78,7 @@ import { DC } from "@/deconstruction.js";
|
|
|
import { computed, ref, watchEffect } from "vue";
|
|
|
import { flatPositions } from "@/utils/shared.ts";
|
|
|
import { Arrow } from "konva/lib/shapes/Arrow";
|
|
|
-import { Pos } from "@/utils/math.ts";
|
|
|
+import { lineLen, Pos, zeroEq } from "@/utils/math.ts";
|
|
|
import { LineConfig } from "konva/lib/shapes/Line";
|
|
|
import { Group } from "konva/lib/Group";
|
|
|
import { useConfig } from "@/core/hook/use-config.ts";
|