Compare commits

...

2 Commits

Author SHA1 Message Date
cjdenio e9ec54f059 default bearing to 0 2026-07-02 12:47:17 -06:00
cjdenio a07eeed787 fix headsign issue 2026-07-02 08:54:59 -06:00
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -273,6 +273,6 @@
</div>
</div>
<script type="module" src="/js/main.js?v=1"></script>
<script type="module" src="/js/main.js?v=3"></script>
</body>
</html>
+2 -2
View File
@@ -142,7 +142,7 @@ function renderVehicleIcon(vehicle) {
}" style="--color: #${vehicle.route.color};">
<div style="position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;">
<svg style="transform: rotate(${
vehicle.bearing
vehicle.bearing ?? 0
}deg) translateY(-12px); width: 18px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M300.3 199.2C312.9 188.9 331.4 189.7 343.1 201.4L471.1 329.4C480.3 338.6 483 352.3 478 364.3C473 376.3 461.4 384 448.5 384L192.5 384C179.6 384 167.9 376.2 162.9 364.2C157.9 352.2 160.7 338.5 169.9 329.4L297.9 201.4L300.3 199.2z"/></svg>
</div>
${
@@ -168,7 +168,7 @@ function renderVehicle(vehicle) {
icon: renderVehicleIcon(vehicle),
})
.bindPopup(
`<b>${routeDesignator(vehicle.route)}</b> to <b>${vehicle.headsign.replace(
`<b>${routeDesignator(vehicle.route)}</b> to <b>${vehicle.headsign?.replace(
/^to /i,
""
)}</b>${vehicle.nearest_station ? `<br />@ ${vehicle.nearest_station?.name}` : ""}<br /><br /><small>vehicle #: ${vehicle.id}</small>`