From 8252fd6ba90978442fa6be570d9c5dae39430d10 Mon Sep 17 00:00:00 2001 From: Pyro Nicampt <81565698+PyroNicampt@users.noreply.github.com> Date: Mon, 10 Aug 2026 01:19:24 -0500 Subject: [PATCH] Actually fix path drawing order --- index.js | 5 ++--- js/directions.js | 4 ++-- js/mapdata.js | 5 ++++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 477df68..43c2b53 100644 --- a/index.js +++ b/index.js @@ -313,7 +313,6 @@ function redrawMap(){ mapctx.stroke(); } } - Directions.drawPolyline(mapctx, trackWidth); let curSprite; let spriteSize; let textMeasure; @@ -322,10 +321,10 @@ function redrawMap(){ for(const marker of MapData.markers){ curSprite = null; marker.visible = false; - if(marker.hidden || (marker.minZoom && MapData.view.scale < marker.minZoom) || (marker.maxZoom && MapData.view.scale > marker.maxZoom)) continue; + if(!marker.ignoreCulling && (marker.hidden || (marker.minZoom && MapData.view.scale < marker.minZoom) || (marker.maxZoom && MapData.view.scale > marker.maxZoom))) continue; let markerX = MapData.view.convertX(marker.position.x); let markerY = MapData.view.convertY(marker.position.z); - if(markerX > mapCanvas.width + Config.viewCullMargin || markerX < -Config.viewCullMargin || markerY > mapCanvas.height + Config.viewCullMargin || markerY < -Config.viewCullMargin) continue; // View Culling + if(!marker.ignoreCulling && (markerX > mapCanvas.width + Config.viewCullMargin || markerX < -Config.viewCullMargin || markerY > mapCanvas.height + Config.viewCullMargin || markerY < -Config.viewCullMargin)) continue; // View Culling switch(marker.type){ case 'dummy_polyline': Directions.drawPolyline(mapctx, trackWidth); diff --git a/js/directions.js b/js/directions.js index 2b92259..3143fcb 100644 --- a/js/directions.js +++ b/js/directions.js @@ -221,11 +221,11 @@ export function drawPolyline(ctx, trackWidth){ if(i === 0) ctx.moveTo(x, y); else ctx.lineTo(x, y); } - ctx.strokeStyle = '#0b1220cc'; + ctx.strokeStyle = '#0b122088'; ctx.lineWidth = outline; ctx.stroke(); - ctx.strokeStyle = '#4fa3ff'; + ctx.strokeStyle = '#4fa3ffdd'; ctx.lineWidth = width; ctx.stroke(); ctx.restore(); diff --git a/js/mapdata.js b/js/mapdata.js index 8ef3ea0..558ac3d 100644 --- a/js/mapdata.js +++ b/js/mapdata.js @@ -308,7 +308,10 @@ export function addPoi(poiData, level = 0){ newPoi.radius = poiData.radius; break; default: - if(poiData.type.startsWith('dummy_')) break; + if(poiData.type.startsWith('dummy_')){ + newPoi.ignoreCulling = true; + break; + } newPoi.tooltip = `