diff --git a/web/ticket-order.js b/web/ticket-order.js
index e2d740a..4e12a29 100644
--- a/web/ticket-order.js
+++ b/web/ticket-order.js
@@ -92,44 +92,44 @@
let markerSvg = '';
if (isTransfer) {
- markerSvg += ``;
- markerSvg += pieSvg(x, y, 11.5, uniqueColors);
- markerSvg += ``;
+ markerSvg += ``;
+ markerSvg += pieSvg(x, y, 9, uniqueColors);
+ markerSvg += ``;
} else {
const color = forceColor || uniqueColors[0] || '#93a2b7';
- markerSvg += ``;
- markerSvg += ``;
+ markerSvg += ``;
+ markerSvg += ``;
}
const preferTop = i % 2 === 0;
let labelSvg = '';
- const codeFontSize = 9;
- const nameFontSize = 13;
- const enFontSize = 8.5;
- const codeW = primaryCode.length * 6 + 10;
+ const codeFontSize = 8;
+ const nameFontSize = 11.5;
+ const enFontSize = 7.5;
+ const codeW = primaryCode.length * 5.5 + 8;
let textContent = '';
if (preferTop) {
- const bottomY = y - 22;
+ const bottomY = y - 18;
const enY = bottomY;
- const nameY = showEn ? bottomY - 12 : bottomY;
- const codeY = nameY - 18;
- textContent += ``;
- textContent += `${primaryCode}`;
- textContent += `${name}`;
+ const nameY = showEn ? bottomY - 10 : bottomY;
+ const codeY = nameY - 13;
+ textContent += ``;
+ textContent += `${primaryCode}`;
+ textContent += `${name}`;
if (showEn) {
- textContent += `${enName}`;
+ textContent += `${enName}`;
}
} else {
- const topY = y + 34;
+ const topY = y + 26;
const codeY = topY;
- const nameY = topY + 18;
- const enY = nameY + 12;
- textContent += ``;
- textContent += `${primaryCode}`;
- textContent += `${name}`;
+ const nameY = topY + 13;
+ const enY = nameY + 10;
+ textContent += ``;
+ textContent += `${primaryCode}`;
+ textContent += `${name}`;
if (showEn) {
- textContent += `${enName}`;
+ textContent += `${enName}`;
}
}
labelSvg += textContent;
@@ -143,7 +143,7 @@
return `
-
+
${markerSvg}
${labelSvg}
`;
@@ -159,7 +159,7 @@
const bg = isActive ? li.color : '#f8fafc';
const fg = isActive ? getContrastColor(li.color) : '#334155';
const border = isActive ? li.color : '#cbd5e1';
- html += ``;
+ html += ``;
}
container.innerHTML = html;
}
@@ -179,9 +179,9 @@
return;
}
- const startX = 80;
- const gapX = 90;
- const y = 80;
+ const startX = 40;
+ const gapX = 65;
+ const y = 60;
const pts = [];
for (let i = 0; i < li.stops.length; i++) {
@@ -201,16 +201,17 @@
if (pts.length >= 2) {
let d = `M ${pts[0].x} ${y}`;
for(let i=1; i`;
+ svgContent += ``;
}
for (let i = 0; i < pts.length; i++) {
svgContent += renderStationNode(pts[i].x, pts[i].y, pts[i].code, i, li.color);
}
- const width = startX + pts.length * gapX + 80;
- const height = 160;
- container.innerHTML = ``;
+ const width = startX + pts.length * gapX + 40;
+ const height = 120;
+ // 添加 tvm-animate 类实现动画过渡
+ container.innerHTML = ``;
}
function renderTvmRoute() {
@@ -236,9 +237,9 @@
container.style.display = 'flex';
if (title) title.style.display = 'block';
- const startX = 80;
- const gapX = 90;
- const y = 80;
+ const startX = 40;
+ const gapX = 65;
+ const y = 60;
let svgContent = '';
@@ -265,7 +266,7 @@
}
for (const seg of segments) {
- svgContent += ``;
+ svgContent += ``;
}
const pathD = `M ${startX} ${y} L ${startX + (routeCodes.length - 1) * gapX} ${y}`;
@@ -277,7 +278,7 @@
for (let i = 0; i < numArrows; i++) {
svgContent += `
-
+
`;
@@ -287,9 +288,9 @@
svgContent += renderStationNode(startX + i * gapX, y, routeCodes[i], i);
}
- const width = startX + routeCodes.length * gapX + 80;
- const height = 160;
- container.innerHTML = ``;
+ const width = startX + routeCodes.length * gapX + 40;
+ const height = 120;
+ container.innerHTML = ``;
}
async function renderSystemMap() {
@@ -383,12 +384,25 @@
if (uniq.length >= 2) stationTransfer.add(c);
}
+ const fadeStyle = ``;
+
mapContainer.innerHTML = `
-
-
-
-
已选路径
-
+ ${fadeStyle}
+
`;