bill 1 år sedan
förälder
incheckning
19ebd20352

+ 3 - 0
src/components/fill-slide/index.vue

@@ -158,4 +158,7 @@ watch(
     margin-left: 32px;
   }
 }
+.PhotoView__Photo {
+  background: #fff;
+}
 </style>

+ 1 - 0
src/components/photos/index.vue

@@ -117,6 +117,7 @@ const changeSelects = (item: Item, selected: boolean) => {
   height: 100%;
   object-fit: contain;
   border-radius: 4px;
+  background: #fff;
 }
 
 .occupying {

+ 17 - 5
src/graphic/Renderer/Draw.js

@@ -424,6 +424,14 @@ export const help = {
         ctx.fill();
         ctx.stroke();
         ctx.restore();
+        // line.forEach((point) => {
+        //   ctx.beginPath();
+        //   ctx.fillStyle = "#000";
+        //   ctx.arc(point.x, point.y, 10, 0, 2 * Math.PI);
+        //   ctx.fill();
+        //   ctx.closePath();
+        //   console.log(point);
+        // });
 
         const width = mathUtil.getDistance(line[0], line[3]);
         const c1 = mathUtil.translate(line[0], line[3], line[0], width / 2);
@@ -684,10 +692,16 @@ export default class Draw {
             vector.roadWidthTipsPos[0].start,
             vector.roadWidthTipsPos[0].end,
           ];
+
+          const join = mathUtil.getIntersectionPoint(
+            mathUtil.createLine1(checkLine[0], checkLine[1]),
+            mathUtil.createLine1(targetLine[0], targetLine[1])
+          );
           const isStartMax =
             mathUtil.getDisForLineCoord(checkLine, targetLine[0]) >
             mathUtil.getDisForLineCoord(checkLine, targetLine[1]);
 
+          // this.drawPoint(join);
           if (!isStartMax) {
             const temp = targetLine[0];
             targetLine[0] = targetLine[1];
@@ -697,13 +711,13 @@ export default class Draw {
           const tstart = mathUtil.translate(
             targetLine[0],
             targetLine[1],
-            targetLine[1],
+            join,
             help.getScreenDistance(edgeVector.roadSide.width * 1000)
           );
           const tend = mathUtil.translate(
             targetLine[0],
             targetLine[1],
-            targetLine[1],
+            join,
             help.getScreenDistance(edgeVector.roadSide.width * 1000) + 4
           );
 
@@ -713,7 +727,7 @@ export default class Draw {
             ctx,
             coordinate.getScreenXY(tstart),
             coordinate.getScreenXY(tend),
-            edgeVector.roadSide.width * 10,
+            Math.round(edgeVector.roadSide.width * 1000),
             {
               padding: 6,
               fontSize: 12,
@@ -1203,7 +1217,6 @@ export default class Draw {
         return;
       }
 
-      console.log(line);
       if (line.category !== "ZebraCrossing") {
         const [stylea, attr] = help.getVectorStyle(line, line.category);
         style = {
@@ -1605,7 +1618,6 @@ export default class Draw {
       case VectorCategory.Line.FreeMeasureLine:
       case VectorCategory.Line.MeasureLine:
       case VectorCategory.Line.PositionLine:
-        console.log(vector);
         this.drawLineText(vector, style.text);
 
         if (

+ 2 - 0
src/hook/useGraphic.ts

@@ -64,6 +64,8 @@ export const loadData = genUseLoading(
         backImage: data.photoUrl,
       });
       bus.emit("graphicLoader");
+      graphicState.value.canRecovery = false;
+      graphicState.value.canRevoke = false;
     } else {
       drawRef.value.load.clear();
     }