diff --git a/web/ticket-order.js b/web/ticket-order.js
index 4e12a29..fcc9b19 100644
--- a/web/ticket-order.js
+++ b/web/ticket-order.js
@@ -208,7 +208,7 @@
svgContent += renderStationNode(pts[i].x, pts[i].y, pts[i].code, i, li.color);
}
- const width = startX + pts.length * gapX + 40;
+ const width = Math.max(container.clientWidth || 800, startX + pts.length * gapX + 40);
const height = 120;
// 添加 tvm-animate 类实现动画过渡
container.innerHTML = ``;
@@ -288,7 +288,7 @@
svgContent += renderStationNode(startX + i * gapX, y, routeCodes[i], i);
}
- const width = startX + routeCodes.length * gapX + 40;
+ const width = Math.max(container.clientWidth || 800, startX + routeCodes.length * gapX + 40);
const height = 120;
container.innerHTML = ``;
}