bill пре 2 година
родитељ
комит
2370a44229

+ 1 - 1
src/main.ts

@@ -29,7 +29,7 @@ app.use(Components);
 app.mount("#app");
 
 // if (params.theme) {
-document.documentElement.classList.add(params.theme);
+document.documentElement.classList.add("light");
 // }
 
 export default app;

+ 2 - 1
src/views/scene/covers/basePoints.vue

@@ -14,7 +14,7 @@
   />
 
   <!--  <ActionsPanel :menus="activeActionMenus" v-if="active" />-->
-  <div ref="menu" @touchstart.stop class="action-menus">
+  <div ref="menu" @touchstart.stop class="action-menus" v-if="!trackBaseIng">
     <ActionMenus
       v-if="customMap.activeBasePoint"
       :menus="activeActionMenus"
@@ -32,6 +32,7 @@ import { FixPoint } from "@/store/fixPoint";
 import ActionsPanel from "@/views/scene/covers/actions.vue";
 import { customMap, useSDK } from "@/hook";
 import ActionMenus from "@/components/group-button/index.vue";
+import { trackBaseIng } from "../fixManage";
 
 const activeActionMenus = [
   {

+ 4 - 0
src/views/scene/fixManage.ts

@@ -80,6 +80,7 @@ export enum DrawStatus {
 }
 export const drawstatus = ref(DrawStatus.un);
 export const measureMode = ref(false);
+export const trackBaseIng = ref(false);
 const drawingFix3d = shallowRef<FixPoint3D[]>([]);
 
 watchEffect(() => {
@@ -151,6 +152,7 @@ export const getFix3d = (data: FixPoint) => {
     return;
   }
   if (args.measure) {
+    console.log("create", data, args);
     let basePoint: BasePoint;
     let baseId = data.baseId || basePointId;
     if (
@@ -159,9 +161,11 @@ export const getFix3d = (data: FixPoint) => {
     ) {
       return;
     }
+    data.baseId = baseId;
     args.basePoint = basePoint.pos;
   }
 
+  console.log("create", args);
   const fix3d = sdk.scene.createFixPoint(args);
   if (drawstatus.value === DrawStatus.ing) {
     drawingFix3d.value.push(fix3d);

+ 8 - 1
src/views/scene/menus/actions.ts

@@ -27,6 +27,7 @@ import {
   DrawStatus,
   getFix3d,
   measureMode,
+  trackBaseIng,
 } from "../fixManage";
 
 const trackPosMenuAction = (
@@ -139,6 +140,7 @@ const menuActions = {
         () => {
           hide && hide();
           onComplete();
+          trackBaseIng.value = false;
         },
         (pos) => {
           const len = fixPoints.value.push({
@@ -156,6 +158,7 @@ const menuActions = {
             hide();
             hide = null;
           }
+          trackBaseIng.value = false;
         },
         false
       );
@@ -172,16 +175,17 @@ const menuActions = {
         onComplete();
       }
     } else {
+      trackBaseIng.value = true;
       stop = result.stop;
       result.promise.then(() => {
         add();
       });
     }
     return () => {
-      console.log("?????");
       onDestroy && onDestroy();
       hide && hide();
       stop && stop();
+      trackBaseIng.value = false;
     };
   },
   [menuEnum.FIX_GRANH]: (_, onComplete) => {
@@ -198,6 +202,7 @@ const menuActions = {
       });
       drawstatus.value = DrawStatus.ing;
       getFix3d(data).bus.on("graphDrawComplete", (complete) => {
+        trackBaseIng.value = false;
         if (complete) {
           const len = fixPoints.value.push(data);
           activeFixPointStack.current.value.value = fixPoints.value[
@@ -221,6 +226,7 @@ const menuActions = {
         onComplete();
       }
     } else {
+      trackBaseIng.value = true;
       stop = result.stop;
       result.promise.then(() => {
         add();
@@ -228,6 +234,7 @@ const menuActions = {
     }
     return () => {
       drawstatus.value = DrawStatus.quit;
+      trackBaseIng.value = false;
       hide && hide();
       stop && stop();
     };