|
|
@@ -3,12 +3,12 @@
|
|
|
v-for="point in (fixPoints as FixPoint[])"
|
|
|
:key="point.id"
|
|
|
:data="point"
|
|
|
- :active="point === customMap.activeFixPoint"
|
|
|
+ :active="point === customMap.activeFixPoint && !selectMeasure"
|
|
|
@change-pos="(pos) => changePos(point, pos)"
|
|
|
- @focus="select(point, false)"
|
|
|
- @blur="unSelect(point, false)"
|
|
|
- @focus-measure="select(point, true)"
|
|
|
- @blur-measure="unSelect(point, true)"
|
|
|
+ @focus="(isRaw) => select(point, false, isRaw)"
|
|
|
+ @blur="(isRaw) => unSelect(point, false, isRaw)"
|
|
|
+ @focus-measure="select(point, true, true)"
|
|
|
+ @blur-measure="unSelect(point, true, true)"
|
|
|
/>
|
|
|
|
|
|
<div ref="menu" @touchstart.stop class="action-menus">
|
|
|
@@ -49,7 +49,7 @@
|
|
|
import { fixPoints, FixPoint } from "@/store/fixPoint";
|
|
|
import FixPointPanel from "./fixPoint.vue";
|
|
|
import Confirm from "../../graphic/confirm.vue";
|
|
|
-import { computed, ref, watch, watchEffect } from "vue";
|
|
|
+import { computed, ref, toRaw, watch, watchEffect } from "vue";
|
|
|
import { customMap } from "@/hook";
|
|
|
import ActionMenus from "@/components/group-button/index.vue";
|
|
|
import EditFixPoint from "@/components/edit-fix-point/index.vue";
|
|
|
@@ -60,6 +60,7 @@ import {
|
|
|
drawstatus,
|
|
|
DrawStatus,
|
|
|
drawingFix3d,
|
|
|
+ selectFix3d,
|
|
|
} from "../fixManage";
|
|
|
|
|
|
const edit = ref<FixPoint>();
|
|
|
@@ -70,15 +71,29 @@ watchEffect(() => {
|
|
|
});
|
|
|
|
|
|
const selectMeasure = ref(false);
|
|
|
-const select = (point: FixPoint, onMeasure: boolean = false) => {
|
|
|
- console.error(onMeasure);
|
|
|
+const select = (point: FixPoint, onMeasure: boolean = false, onRaw: boolean = false) => {
|
|
|
selectMeasure.value = onMeasure;
|
|
|
customMap.activeFixPoint = point;
|
|
|
+
|
|
|
+ if (!onRaw) {
|
|
|
+ fixPoints.value.forEach((item) => {
|
|
|
+ console.log("select", toRaw(item) === toRaw(point));
|
|
|
+ selectFix3d(point, toRaw(item) === toRaw(point));
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
-const unSelect = (point: FixPoint, onMeasure: boolean = false) => {
|
|
|
+const unSelect = (
|
|
|
+ point: FixPoint,
|
|
|
+ onMeasure: boolean = false,
|
|
|
+ onRaw: boolean = false
|
|
|
+) => {
|
|
|
selectMeasure.value = onMeasure;
|
|
|
customMap.activeFixPoint =
|
|
|
customMap.activeFixPoint === point ? null : customMap.activeFixPoint;
|
|
|
+
|
|
|
+ if (!onRaw) {
|
|
|
+ selectFix3d(point, false);
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
const activeActionMenus = computed(() =>
|