fix: 增强边缘线可见度——移除200条限制,提高不透明度(0.5-1.0),加粗(2-7px)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
TianXuan Developer
2026-07-25 09:11:02 +08:00
parent 613f7d2d50
commit 56007c2122
3 changed files with 5 additions and 4 deletions
@@ -81,6 +81,7 @@
.sa-map-row { display: flex; gap: 1rem; margin: 1rem 0; }
.sa-map-container { flex: 1; height: 550px; border-radius: 8px; overflow: hidden; border: 1px solid #e0e0e0; position: relative; }
#saMap { position: relative; }
#saTrafficCanvas { pointer-events: none !important; }
.sa-legend { width: 240px; max-height: 550px; overflow-y: auto; padding: 0.5rem; background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; }
.sa-legend-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0; cursor: pointer; font-size: 0.85rem; }
.sa-legend-item .color-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
@@ -2866,8 +2867,8 @@ function renderTrafficContinuous(totalSpan, minTs, maxTs) {
});
for (let i = toRemove.length - 1; i >= 0; i--) _trafficParticles.splice(toRemove[i], 1);
// Draw active edge traces (background lines)
activeEdges.slice(0, 200).forEach(e => {
// Draw active edge traces (background lines) — all edges, thick
activeEdges.forEach(e => {
const srcC = coords[e.source]; const dstC = coords[e.target];
if (!srcC || !dstC) return;
const p1 = getPixel(e.source, srcC[0], srcC[1]);
@@ -2875,8 +2876,8 @@ function renderTrafficContinuous(totalSpan, minTs, maxTs) {
if (!p1 || !p2) return;
const midX = (p1.x + p2.x) / 2;
const midY = (p1.y + p2.y) / 2 - Math.abs(p2.x - p1.x) * 0.12;
const alpha = 0.3 + 0.5 * (e.count / maxCount);
const width = 1.5 + 4 * (e.count / maxCount);
const alpha = 0.5 + 0.5 * (e.count / maxCount);
const width = 2 + 5 * (e.count / maxCount);
_trafficCanvasCtx.beginPath();
_trafficCanvasCtx.moveTo(p1.x, p1.y);
_trafficCanvasCtx.quadraticCurveTo(midX, midY, p2.x, p2.y);
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 750 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 721 KiB