From c5b61cfd8ef632fc76e60306c06d9ca769fcd8f0 Mon Sep 17 00:00:00 2001 From: HenryDu8133 <813367384@qq.com> Date: Sun, 5 Jul 2026 15:38:38 +0800 Subject: [PATCH] =?UTF-8?q?feat(ui):=20=E7=A7=BB=E9=99=A4=E7=AB=99?= =?UTF-8?q?=E7=82=B9Y=E8=BD=B4=E6=B3=A2=E6=B5=AA=E5=81=8F=E7=A7=BB?= =?UTF-8?q?=E5=B9=B6=E7=AE=80=E5=8C=96=E7=BA=BF=E8=B7=AF=E7=BB=98=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除波浪偏移计算逻辑,将贝塞尔曲线线路改为直线段连接,简化了绘图代码。 --- web/ticket-order.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/web/ticket-order.js b/web/ticket-order.js index e140f25..89e5d8f 100644 --- a/web/ticket-order.js +++ b/web/ticket-order.js @@ -190,13 +190,10 @@ } stationYByCanonical = {}; - let stationIndex = 0; for (const c of Object.keys(primaryLineByStation)) { const li = primaryLineByStation[c]; if (li == null) continue; - const waveOffset = (stationIndex % 2 === 0) ? -12 : 12; - stationYByCanonical[c] = baseY + li * lineGapY + waveOffset; - stationIndex++; + stationYByCanonical[c] = baseY + li * lineGapY; } const allStations = Object.keys(primaryLineByStation); @@ -232,10 +229,7 @@ let d = `M ${pts[0].x} ${pts[0].y}`; for (let i = 1; i < pts.length; i++) { - const prev = pts[i-1]; - const curr = pts[i]; - const midX = (prev.x + curr.x) / 2; - d += ` C ${midX} ${prev.y}, ${midX} ${curr.y}, ${curr.x} ${curr.y}`; + d += ` L ${pts[i].x} ${pts[i].y}`; } svgContent += ``; }