mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 19:04:02 +00:00
fix(mobile): keep number-card evidence visible and cap globe label length
The number card dimmed its composite to 20% grey, so the GNSS card read as black; it now keeps colour and fades under the number. Globe labels are cut at 26 characters so long launch names stay on screen. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VVYRAqiQj9Y1V9ZfG1RcDH
This commit is contained in:
11 files changed
+76
-46
No files matched your search
@@ -210,10 +210,13 @@ export function createGlobeChrome({
|
||||
const W = chrome.clientWidth;
|
||||
const html = list
|
||||
.map((l) => {
|
||||
const flip = l.x > W - 9 * Math.min(24, l.title.length) - 40;
|
||||
// Launch names run to 60 characters; a label names, the pick card explains.
|
||||
const title =
|
||||
l.title.length > 26 ? `${l.title.slice(0, 25).trimEnd()}…` : l.title;
|
||||
const flip = l.x > W - 9 * title.length - 40;
|
||||
const tf = `translate(${Math.round(l.x)}px,${Math.round(l.y)}px)${flip ? ' translateX(calc(-100% - 16px))' : ''}`;
|
||||
const pin = l.layer === 'pins';
|
||||
return `<span ${pin ? `class="lb-pin" data-band="${KIND_FAM_L[l.kind] || 'inside'}"` : ''} data-family="${KIND_FAM_L[l.kind] || 'infra'}" style="transform:${tf}"><i></i>${esc(l.title)}</span>`;
|
||||
return `<span ${pin ? `class="lb-pin" data-band="${KIND_FAM_L[l.kind] || 'inside'}"` : ''} data-family="${KIND_FAM_L[l.kind] || 'infra'}" style="transform:${tf}"><i></i>${esc(title)}</span>`;
|
||||
})
|
||||
.join('');
|
||||
if (labelLayer.innerHTML !== html) labelLayer.innerHTML = html;
|
||||
|
||||
Reference in new issue
Block a user