|
@@ -3,7 +3,9 @@
|
|
|
v-for="point in (fixPoints as FixPoint[])"
|
|
|
:key="point.id"
|
|
|
:data="point"
|
|
|
- :active="point === customMap.activeFixPoint && !selectMeasure"
|
|
|
+ :active="
|
|
|
+ point === customMap.activeFixPoint && selectMeasure !== customMap.activeFixPoint
|
|
|
+ "
|
|
|
@change-pos="(pos) => changePos(point, pos)"
|
|
|
@focus="(isRaw) => select(point, false, isRaw)"
|
|
|
@blur="(isRaw) => unSelect(point, false, isRaw)"
|
|
@@ -51,7 +53,7 @@ import { fixPoints, FixPoint } from "@/store/fixPoint";
|
|
|
import FixPointPanel from "./fixPoint.vue";
|
|
|
import Confirm from "../../graphic/confirm.vue";
|
|
|
import { computed, ref, toRaw, watch, watchEffect } from "vue";
|
|
|
-import { customMap } from "@/hook";
|
|
|
+import { activeFixPointStack, customMap } from "@/hook";
|
|
|
import ActionMenus from "@/components/group-button/index.vue";
|
|
|
import EditFixPoint from "@/components/edit-fix-point/index.vue";
|
|
|
import {
|
|
@@ -71,10 +73,17 @@ watchEffect(() => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
-const selectMeasure = ref(false);
|
|
|
+const selectPoint = ref<FixPoint>();
|
|
|
+const selectMeasure = ref<FixPoint>();
|
|
|
+activeFixPointStack.push(computed(() => selectMeasure.value || selectPoint.value));
|
|
|
+
|
|
|
const select = (point: FixPoint, onMeasure: boolean = false, onRaw: boolean = false) => {
|
|
|
- selectMeasure.value = onMeasure;
|
|
|
- customMap.activeFixPoint = point;
|
|
|
+ if (onMeasure) {
|
|
|
+ selectMeasure.value = point;
|
|
|
+ } else {
|
|
|
+ selectPoint.value = point;
|
|
|
+ }
|
|
|
+
|
|
|
if (!onRaw) {
|
|
|
fixPoints.value.forEach((item) => {
|
|
|
selectFix3d(item, toRaw(item) === toRaw(point));
|
|
@@ -86,9 +95,11 @@ const unSelect = (
|
|
|
onMeasure: boolean = false,
|
|
|
onRaw: boolean = false
|
|
|
) => {
|
|
|
- selectMeasure.value = onMeasure;
|
|
|
- customMap.activeFixPoint =
|
|
|
- customMap.activeFixPoint === point ? null : customMap.activeFixPoint;
|
|
|
+ if (onMeasure) {
|
|
|
+ selectMeasure.value = selectMeasure.value === point ? null : selectMeasure.value;
|
|
|
+ } else {
|
|
|
+ selectPoint.value = selectPoint.value === point ? null : selectPoint.value;
|
|
|
+ }
|
|
|
|
|
|
if (!onRaw) {
|
|
|
selectFix3d(point, false);
|