fix(ui): Downtown-Bezugspunkt statt Downtown-Kern, leere Standortanzeige ausblenden
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
61ef30f081
commit
3b09482e6a
4 files changed
+9
-4
No files matched your search
+1
-1
@@ -27,7 +27,7 @@ const STYLE = `
|
||||
.leonida-map-note { top: 16px; left: 50%; transform: translateX(-50%); }
|
||||
.leonida-map-here { top: 16px; left: 16px; }
|
||||
.leonida-map-readout { bottom: 16px; right: 16px; font-variant-numeric: tabular-nums; }
|
||||
.leonida-map-note:empty, .leonida-map-readout:empty { display: none; }
|
||||
.leonida-map-note:empty, .leonida-map-readout:empty, .leonida-map-here:empty { display: none; }
|
||||
`;
|
||||
|
||||
const NOTE_MISSING = "Kartenbild fehlt — cd tools/extract && uv run python overview.py ausführen";
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ export function chunkNameAtMap(info, px, py) {
|
||||
return chunkName(i, j);
|
||||
}
|
||||
|
||||
/** Anzeige für die Stelle unter dem Mauszeiger, etwa "C10 · x 412 / y 1830". */
|
||||
/** Anzeige für die Stelle unter dem Mauszeiger, etwa "F3 · x 412 / y 1830". */
|
||||
export function hoverLabel(info, px, py) {
|
||||
const name = chunkNameAtMap(info, px, py);
|
||||
if (!name) return null;
|
||||
|
||||
@@ -61,9 +61,13 @@ describe("Chunk-Namen", () => {
|
||||
}
|
||||
});
|
||||
|
||||
it("verbindet den Namen mit der Lage: der Downtown-Kern liegt in B9", () => {
|
||||
it("verbindet den Namen mit der Lage: Downtown-Bezugspunkt in B9, höchster Turm in C12", () => {
|
||||
// (−511, 254) ist der Bezugspunkt "Downtown" aus tools/extract/data/districts.json, der Mittelpunkt
|
||||
// der westlichen Hochhäuser. Die Türme selbst stehen nördlich und südlich davon.
|
||||
const { i, j } = chunkForWorld(-511, 254);
|
||||
expect({ i, j }).toEqual({ i: 1, j: 8 });
|
||||
expect(chunkName(i, j)).toBe("B9");
|
||||
const tower = chunkForWorld(-461.31, -460.1); // Southeast Financial Center, 248 m
|
||||
expect(chunkName(tower.i, tower.j)).toBe("C12");
|
||||
});
|
||||
});
|
||||
@@ -114,8 +114,9 @@ describe("Landeplatz", () => {
|
||||
});
|
||||
|
||||
describe("Chunk-Namen und Anzeige", () => {
|
||||
it("nennt am Kartenpunkt des Downtown-Kerns B9", () => {
|
||||
it("nennt am Downtown-Bezugspunkt B9 und am Southeast Financial Center C12", () => {
|
||||
expect(chunkNameAtMap(INFO, 489, 2246)).toBe("B9");
|
||||
expect(chunkNameAtMap(INFO, 538.69, 2960.1)).toBe("C12");
|
||||
});
|
||||
|
||||
it("liefert am östlichen Kartenrand keinen Namen mehr", () => {
|
||||
|
||||
Reference in new issue
Block a user