Browse Source

Merge branch 'master' of http://192.168.0.115:3000/bill/traffic-laser

# Conflicts:
#	src/graphic/Setting.js
xushiting 2 years ago
parent
commit
f4e4cac5b8
2 changed files with 6 additions and 5 deletions
  1. 5 4
      src/graphic/Renderer/Draw.js
  2. 1 1
      src/graphic/Setting.js

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

@@ -145,7 +145,7 @@ export default class Draw {
       ? vector.end
       : dataService.getRoadPoint(vector.endId);
 
-    if (vector?.midDivide?.display) {
+    if (vector?.midDivide?.display && vector?.midDivideWidth) {
       const ctx = this.context;
       const startScreen = coordinate.getScreenXY(startReal);
       const endScreen = coordinate.getScreenXY(endReal);
@@ -158,9 +158,10 @@ export default class Draw {
 
       ctx.save();
       const vectorStyle = help.setVectorStyle(ctx, vector);
+      ctx.lineWidth = vector.midDivideWidth
       draw()
       ctx.strokeStyle = Style.bgColor
-      ctx.lineWidth = vectorStyle.lineWidth - vectorStyle.realLineWidth
+      ctx.lineWidth = vector.midDivideWidth - vectorStyle.realLineWidth
       draw()
       ctx.restore();
     }
@@ -298,8 +299,8 @@ export default class Draw {
     ctx.save();
     const vectorStyle = help.setVectorStyle(ctx, vector);
     help.drawCoves(ctx, coves);
-
-    ctx.lineWidth = vectorStyle.lineWidth - vectorStyle.realLineWidth
+    ctx.lineWidth = vector?.midDivideWidth || vectorStyle.lineWidth
+    ctx.lineWidth = ctx.lineWidth - vectorStyle.realLineWidth
     ctx.strokeStyle = Style.bgColor
     help.drawCoves(ctx, coves);
     ctx.restore();

+ 1 - 1
src/graphic/Setting.js

@@ -7,7 +7,7 @@ const Setting = {
   rightRoadWidth: 50,
   leftCurveRoadWidth: 50,
   rightCurveRoadWidth: 50,
-  roadMidDivideWidth: 20,
+  roadMidDivideWidth: 40,
   curveRoadMidDivideWidth: 4,
 };
 export default Setting;