Skip to content

Anchor control panel and track list panel to visible bounds - #67

Merged
veillette merged 2 commits into
mainfrom
claude/fix-panel-screen-positioning-ndnop
Feb 28, 2026
Merged

Anchor control panel and track list panel to visible bounds#67
veillette merged 2 commits into
mainfrom
claude/fix-panel-screen-positioning-ndnop

Conversation

@veillette

Copy link
Copy Markdown
Collaborator

Previously, ControlPanel and TrackListPanel were positioned using the
static layoutBounds, so they would not follow the visible screen edge
when the browser window was larger than the default layout size.

Move controlPanel positioning into the visibleBoundsProperty.link()
callback alongside all other edge-anchored elements, using
visibleBounds.minX and visibleBounds.minY. Because TrackListPanel
already re-positions itself reactively via controlPanel.boundsProperty,
it inherits the correct position automatically.

Also fix the initialPanelPos computation: since controlPanel.left is
now set inside the deferred link callback, reading controlPanel.right
before that fires would yield a stale value, so compute the x offset
directly from layoutBounds + CONTROL_PANEL_LEFT_MARGIN + controlPanel.width.

https://claude.ai/code/session_01Uvtq2RdaEMJbfUV3ER2GMh

Previously, ControlPanel and TrackListPanel were positioned using the
static layoutBounds, so they would not follow the visible screen edge
when the browser window was larger than the default layout size.

Move controlPanel positioning into the visibleBoundsProperty.link()
callback alongside all other edge-anchored elements, using
visibleBounds.minX and visibleBounds.minY. Because TrackListPanel
already re-positions itself reactively via controlPanel.boundsProperty,
it inherits the correct position automatically.

Also fix the initialPanelPos computation: since controlPanel.left is
now set inside the deferred link callback, reading controlPanel.right
before that fires would yield a stale value, so compute the x offset
directly from layoutBounds + CONTROL_PANEL_LEFT_MARGIN + controlPanel.width.

https://claude.ai/code/session_01Uvtq2RdaEMJbfUV3ER2GMh
The video player node's vertical position is now driven by
visibleBoundsProperty.link() (using visibleBounds.minY + SCREEN_TOP_MARGIN),
matching the strategy already used for the control panel and track list
panel. This ensures the video always hugs the visible top edge when the
browser window is taller than the default layout bounds.

The panelPositionProperty link now only sets the horizontal (left) position,
since the top is fully managed by the visible-bounds listener.

https://claude.ai/code/session_01Uvtq2RdaEMJbfUV3ER2GMh
@veillette
veillette merged commit 2a3b7be into main Feb 28, 2026
1 check passed
@veillette
veillette deleted the claude/fix-panel-screen-positioning-ndnop branch March 1, 2026 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants