diff --git a/src/assets/themes/editor-dark.json b/src/assets/themes/editor-dark.json index 22a78ee..bda327b 100644 --- a/src/assets/themes/editor-dark.json +++ b/src/assets/themes/editor-dark.json @@ -14,9 +14,10 @@ "strokeActive": "#FCC947" }, "route": { + "strokeActive": "#FCC947", "stroke-0": "#8C8C8C", "stroke-1": "#49AA19", - "stroke-2": "#D89614", + "stroke-2": "#1982F3", "stroke-10": "#E63A3A" }, "area": { diff --git a/src/assets/themes/editor-light.json b/src/assets/themes/editor-light.json index 01d1f5c..edf2180 100644 --- a/src/assets/themes/editor-light.json +++ b/src/assets/themes/editor-light.json @@ -14,9 +14,10 @@ "strokeActive": "#EBB214" }, "route": { + "strokeActive": "#EBB214", "stroke-0": "#8C8C8C", "stroke-1": "#52C41A", - "stroke-2": "#FAAD14", + "stroke-2": "#1982F3", "stroke-10": "#E63A3A" }, "area": { diff --git a/src/services/editor.service.ts b/src/services/editor.service.ts index e2ca562..d7817e8 100644 --- a/src/services/editor.service.ts +++ b/src/services/editor.service.ts @@ -789,7 +789,7 @@ function anchorPoint(pen: MapPen): void { function drawLine(ctx: CanvasRenderingContext2D, pen: MapPen): void { const theme = sTheme.editor; - const { iconSize: s = 10 } = pen.calculative ?? {}; + const { active, lineWidth: w = 2, iconSize: s = 10 } = pen.calculative ?? {}; const [p1, p2] = pen.calculative?.worldAnchors ?? []; const { x: x1 = 0, y: y1 = 0 } = p1 ?? {}; const { x: x2 = 0, y: y2 = 0 } = p2 ?? {}; @@ -799,7 +799,8 @@ function drawLine(ctx: CanvasRenderingContext2D, pen: MapPen): void { ctx.save(); ctx.beginPath(); - ctx.strokeStyle = get(theme, `route.stroke-${pass}`) ?? ''; + ctx.strokeStyle = get(theme, active ? 'route.strokeActive' : `route.stroke-${pass}`) ?? ''; + ctx.lineWidth = active ? 1.5 * w : w; ctx.moveTo(x1, y1); switch (type) { case MapRouteType.直线: