Orbital label clicks, the Sun's "Underneath", zh-Hant 天後側

- The Cockpit's orbital view counts a site's own label as its own, not
  another layer's card, so clicking it focuses the site again; the test
  now sets the overlay hit test the way the world overlay does.
- The ISS Sun position under the station is "Underneath", with its own
  translations; "Below" stays the ground under a satellite.
- OpenCC turns 问天后侧 into 問天后側 ("empress"); a correction makes it 後.
- The changelog says a label takes the click from a vehicle drawn under it.
This commit is contained in:
Denis Groshev committed 2026-11-19 17:07:49 +01:00
1 parent 0620d01140
commit dad59fabbf
18 files changed
+40 -9

No files matched your search

+3 -2
View File
@@ -300,8 +300,9 @@ export function routeSceneClick() {
}
return input.onClick((event) => {
// Another layer's card or label painted on top takes the click: the site
// under it does not focus, and the click does not end a held focus.
if (isUnderOtherCard(event)) return;
// under it does not focus, and the click does not end a held focus. A
// site's own label is not another layer's: it focuses that site.
if (isUnderOtherCard(event, [SITES_LAYER_ID])) return;
this.onOrbitalClick(event?.position);
});
}
+9
View File
@@ -1395,6 +1395,15 @@ test("a click on a site's label box focuses it, as one on its dot does", async (
// finds the site there, through the label box the overlay paints.
assert.equal(sites.findByPick(null), null, 'no draw item at the label');
assert.equal(sites.findAt(SITES.alpha.labelAt)?.id, SITES.alpha.id);
// The overlay reports the label box as the card on top there, as it does
// for an interactive entry: the site's own label is not another layer's.
const labels = [SITES.alpha.labelAt];
setClickCardHitTest((x, y) =>
labels.some((at) => at.x === x && at.y === y)
? { sourceId: 'military-installations', entryId: SITES.alpha.id }
: null,
);
t.after(() => setClickCardHitTest(null));
scene.click(SITES.alpha.labelAt);
assert.equal(cockpit.orbital.focus.key, SITES.alpha.id);
assert.equal(handler.stockClicks, 1, 'Cesium still gets the click');