bill 2 роки тому
батько
коміт
cef5d1e2db

+ 7 - 0
src/graphic/CanvasStyle/focus.js

@@ -7,6 +7,12 @@ const Road = {
   strokeStyle: "#3290FF",
 };
 
+const Circle = {
+  strokeStyle: "red",
+  fillStyle: "rgba(0,0,0,0)",
+  lineWidth: 2 * coordinate.ratio,
+  radius: 30 * coordinate.ratio,
+};
 const MeasureLine = {
   strokeStyle: "red",
   lineWidth: 4 * coordinate.ratio,
@@ -116,6 +122,7 @@ export default {
   CurveRoad,
   MeasureLine,
   TestPoint,
+  Circle,
   RoadEdge,
   Magnifier,
   BaseLine,

+ 7 - 0
src/graphic/CanvasStyle/select.js

@@ -7,6 +7,12 @@ const Road = {
   strokeStyle: "#3290FF",
 };
 
+const Circle = {
+  strokeStyle: "red",
+  fillStyle: "rgba(0,0,0,0)",
+  lineWidth: 2 * coordinate.ratio,
+  radius: 30 * coordinate.ratio,
+};
 const MeasureLine = {
   strokeStyle: "red",
   lineWidth: 4 * coordinate.ratio,
@@ -114,6 +120,7 @@ export default {
   MeasureLine,
   BasePoint,
   BaseLine,
+  Circle,
   RoadEdge,
   NormalLine,
   CurveRoadEdge,

+ 4 - 1
src/graphic/Renderer/Draw.js

@@ -611,6 +611,7 @@ export default class Draw {
   }
 
   drawCircle(element) {
+    const [_, label] = help.getVectorStyle(element)
     this.drawPoint({
       ...element,
       radius: help.getReal(element.radius),
@@ -618,7 +619,9 @@ export default class Draw {
       ...element.center,
     });
 
-    element.points.forEach((point) => this.drawPoint(point));
+
+    console.log(label)
+    label && element.points.forEach((point) => this.drawPoint(point));
   }
 
   drawPoint(vector) {

+ 4 - 12
src/views/graphic/confirm.vue

@@ -1,18 +1,10 @@
 <template>
   <div class="confirm">
-    <GraphicAction class="confirm-action">
-      <ui-icon
-          type="checkbox1"
-          ctrl
-          @click="() => drawRef.uiControl.confirmEntry()"
-      />
+    <GraphicAction class="confirm-action" @click="() => drawRef.uiControl.confirmEntry()">
+      <ui-icon type="affirm" ctrl />
     </GraphicAction>
-    <GraphicAction class="confirm-action">
-      <ui-icon
-          type="close"
-          ctrl
-          @click="() => drawRef.uiControl.confirmCancel()"
-      />
+    <GraphicAction class="confirm-action" @click="() => drawRef.uiControl.confirmCancel()">
+      <ui-icon type="close" ctrl />
     </GraphicAction>
   </div>
 </template>

+ 5 - 5
src/views/scene/menus/menus.ts

@@ -1,5 +1,5 @@
 import {findMenuByAttr, generateMixMenus as generateMixMenusRaw} from '@/utils/menus'
-import {computed, Ref, ref} from "vue";
+import {computed, nextTick, Ref, ref} from "vue";
 import {useSDK} from "@/hook";
 import {laserModeStack, modeDisabled} from '@/hook/custom/index'
 import {Mode} from "@/sdk";
@@ -82,17 +82,17 @@ export const menus: MenuRaw[] = [
       const sdk = useSDK()
       const doms = document.querySelectorAll("#navCube, #home") as NodeListOf<HTMLElement>;
       laserModeStack.push(ref(Mode.cloud))
-      console.log("push")
       modeDisabled.push(ref(true))
       doms.forEach(dom => dom.style.display = "none");
-      sdk.enterTopView()
+      nextTick(() => sdk.enterTopView())
+
 
       return () => {
         doms.forEach(dom => dom.style.display = "block");
+        sdk.leaveTopView()
+        modeDisabled.pop()
         laserModeStack.pop()
         console.log("pop")
-        modeDisabled.pop()
-        sdk.leaveTopView()
       }
     },
     children: [