mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
Keep the panel rails still when a tall panel opens
A tall panel moves its stack to the focus or tail layout, and the rail inside the stack went with it, so the Data Layers and Authoring buttons jumped up and the right rail followed. Each layout pass now offsets the rail back to the resting top, with the same transition as the stack, and the right rail lines up with the left rail's buttons. Cyber pins the left stack's top, so it flags that and the rail takes no offset.
This commit is contained in:
1 parent
b20c80e590
commit
06994e0d0e
5 files changed
+48
-3
No files matched your search
@@ -126,8 +126,11 @@ export function layoutRightPanelRail({
|
||||
viewportHeight,
|
||||
getComputedStyle,
|
||||
);
|
||||
// Align with the left rail's buttons, which hold still while its stack moves.
|
||||
const leftRailOffset =
|
||||
parseFloat(leftStack?.style.getPropertyValue('--panel-rail-offset')) || 0;
|
||||
const alignedTop = Number.isFinite(leftStackTop)
|
||||
? leftStackTop
|
||||
? leftStackTop + leftRailOffset
|
||||
: viewportHeight * 0.26;
|
||||
const obstacleRects = [];
|
||||
|
||||
|
||||
Reference in new issue
Block a user