mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-15 07:42:23 +00:00
Line the side rails up and show coordinates once in Minimal HUD
- The right rail now starts level with the left one whether or not a panel is open on it. It used to rise to 4% of the screen when one was open, which in Tactical and Cyber a top-right readout pushed back down, but in Minimal (which has none) left it about 35 px above the left rail. - Minimal no longer shows its full-width coordinate strip above the corner coordinates block, which showed the same position twice; it keeps the corner block, where the other layouts have it. This changes upstream's Minimal layout. Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
1 parent
4debb49fe0
commit
8da632cc2d
2 files changed
+10
-7
No files matched your search
@@ -236,19 +236,20 @@ export function layoutRightPanelRail({
|
|||||||
// CCTV does the same, so its feed and controls have the room.
|
// CCTV does the same, so its feed and controls have the room.
|
||||||
const FULL_HEIGHT = new Set(['global-context-panel', 'cctv-panel']);
|
const FULL_HEIGHT = new Set(['global-context-panel', 'cctv-panel']);
|
||||||
const contextOpen = panels.some(
|
const contextOpen = panels.some(
|
||||||
(panel) => FULL_HEIGHT.has(panel.id) && !panel.classList.contains('collapsed'),
|
(panel) =>
|
||||||
|
FULL_HEIGHT.has(panel.id) && !panel.classList.contains('collapsed'),
|
||||||
);
|
);
|
||||||
// Any open panel starts from that same raised top, so switching between
|
// Every panel starts level with the left rail, open or not, so the two
|
||||||
// Context, CCTV and Street Level does not move the column. Only the two
|
// rails line up in every HUD layout (Minimal has no top-right readout to
|
||||||
// above also stretch to the bottom.
|
// push this column down) and switching between Context, CCTV and Street
|
||||||
const anyOpen = panels.some((panel) => !panel.classList.contains('collapsed'));
|
// Level does not move it. Only the two above also stretch to the bottom.
|
||||||
const layout = resolveHudRailLayout({
|
const layout = resolveHudRailLayout({
|
||||||
viewportHeight,
|
viewportHeight,
|
||||||
panelHeight: naturalHeight,
|
panelHeight: naturalHeight,
|
||||||
laneLeft: stackRect.left,
|
laneLeft: stackRect.left,
|
||||||
laneRight: stackRect.right,
|
laneRight: stackRect.right,
|
||||||
obstacles: obstacleRects,
|
obstacles: obstacleRects,
|
||||||
baseTop: anyOpen ? viewportHeight * 0.04 : alignedTop,
|
baseTop: alignedTop,
|
||||||
baseBottom: viewportHeight * 0.96,
|
baseBottom: viewportHeight * 0.96,
|
||||||
gap: safeGap,
|
gap: safeGap,
|
||||||
align: 'start',
|
align: 'start',
|
||||||
|
|||||||
@@ -310,8 +310,10 @@
|
|||||||
bottom: 12vh;
|
bottom: 12vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Minimal keeps its coordinates in the corner block, where the other layouts
|
||||||
|
have them; the full-width strip would only repeat the same position. */
|
||||||
#intel-hud[data-variant='minimal'] .hud-bottom-bar {
|
#intel-hud[data-variant='minimal'] .hud-bottom-bar {
|
||||||
display: flex;
|
display: none;
|
||||||
bottom: calc(12vh + 4rem);
|
bottom: calc(12vh + 4rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user