station data saving, fixes

This commit is contained in:
Mark
2025-08-21 23:49:56 +02:00
parent bb0ddb40f1
commit eb59bd978c
8 changed files with 160 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
<!--
IDEAS:
- Achievements (i.e. "take a train which is delayed by at least 60 minutes" xd)
- Bonus bei Verspätung, Gesamtverspätung sammeln
- Show a map in the end (no need for world map, just use coordinates on flat black rectangle)
-->
<head>
@@ -22,7 +23,12 @@ body {
background: light-dark(#ECE, #000);
}
.DraggingTop {
z-index: 15;
}
#Header {
z-index: 5;
position: sticky;
top: 0px;
display: flex;
@@ -271,6 +277,7 @@ function draggingOnDown(x, y, e) {
if (isInGame) return;
if (draggingElement !== null) return;
draggingElement = e;
draggingElement.classList.add("DraggingTop");
draggingStartPos = [x, y];
}
function draggingOnMove(x, y) {
@@ -283,6 +290,7 @@ function draggingOnMove(x, y) {
}
function draggingOnUp(x, y) {
if (draggingElement === null) return;
draggingElement.classList.remove("DraggingTop");
if (!isInGame) {
if (draggingEndCallback) draggingEndCallback(x, y);
}
@@ -558,7 +566,6 @@ async function reloadDepartures() {
if (evaNumber === stopEvaNumber) foundCurrent = false;
}
for (const [stop, evaNumber] of result[0]) {
console.log(stop, ": ", evaNumber);
let stopElem = document.createElement("li");
stopElem.innerText = stop;
stopElem.style.wordWrap = "nowrap";