Merge branch 'main' into denis/cockpit-subject-providers

This commit is contained in:
Denis Groshev committed 2026-11-13 16:38:13 +01:00
commit 546ac22708
217 files changed
+8983 -2470

No files matched your search

+7 -2
View File
@@ -19,10 +19,15 @@ import { t } from '../../i18n/index.js';
export function createSelection({ state, services, parts }) {
const { governorRequestRender } = services.render;
/** The card's anchor: the marker's current position, read on every paint. */
/**
* The card's anchor: the marker's current position, read on every paint,
* whether the train is drawn as its marker or as its 3D model.
*/
function anchorFor(entry) {
return () => {
const p = entry.marker?.show !== false ? entry.marker?.position : null;
const drawn =
entry.marker?.show !== false || entry.modelOwnsVisual === true;
const p = drawn ? entry.marker?.position : null;
return p && Number.isFinite(p.x) && Number.isFinite(p.y) ? p : null;
};
}