|
@@ -13,9 +13,9 @@ import {
|
|
|
import { LineData, LineDataLine } from "../..";
|
|
import { LineData, LineDataLine } from "../..";
|
|
|
import { getJoinLine, getLinePoints } from "../../attach-server";
|
|
import { getJoinLine, getLinePoints } from "../../attach-server";
|
|
|
import { MathUtils } from "three";
|
|
import { MathUtils } from "three";
|
|
|
-import { diffArrayChange, round } from "@/utils/shared";
|
|
|
|
|
|
|
+import { copy, diffArrayChange, round } from "@/utils/shared";
|
|
|
import { useStore } from "@/core/store";
|
|
import { useStore } from "@/core/store";
|
|
|
-import { computed, nextTick, reactive, Ref, watch } from "vue";
|
|
|
|
|
|
|
+import { computed, nextTick, reactive, Ref, watch, watchEffect } from "vue";
|
|
|
import { getLineIconEndpoints } from "../../../line-icon";
|
|
import { getLineIconEndpoints } from "../../../line-icon";
|
|
|
import { useDrawIngData } from "@/core/hook/use-draw";
|
|
import { useDrawIngData } from "@/core/hook/use-draw";
|
|
|
import { polygonDifference, polygonDifferenceOnly } from "@/utils/math-clip";
|
|
import { polygonDifference, polygonDifferenceOnly } from "@/utils/math-clip";
|
|
@@ -361,7 +361,7 @@ export const useGetDiffLineIconPolygons = (
|
|
|
|
|
|
|
|
const scale = useFixedScale();
|
|
const scale = useFixedScale();
|
|
|
const width = computed(() =>
|
|
const width = computed(() =>
|
|
|
- line.fixed ? line.strokeWidth * scale.value : line.strokeWidth
|
|
|
|
|
|
|
+ (line.fixed ? line.strokeWidth * scale.value : line.strokeWidth) + 10
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
const interPolygons = computed(() => {
|
|
const interPolygons = computed(() => {
|
|
@@ -380,6 +380,7 @@ export const useGetDiffLineIconPolygons = (
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
diff: (polygon: Pos[]) => {
|
|
diff: (polygon: Pos[]) => {
|
|
|
|
|
+ // console.log('diff', copy(polygon), copy(interPolygons.value))
|
|
|
const result = interPolygons.value.length
|
|
const result = interPolygons.value.length
|
|
|
? polygonDifference(polygon, interPolygons.value)
|
|
? polygonDifference(polygon, interPolygons.value)
|
|
|
: [polygon];
|
|
: [polygon];
|