Skip to content

Fix DevPanel alignment with centered game canvas #197

@kevinmaes

Description

@kevinmaes

Problem

The DevPanel is not properly aligned with the centered game canvas. The game was recently centered in a frame, but the DevPanel still uses absolute positioning with hardcoded dimensions.

Current Behavior

  • DevPanel uses position: absolute with fixed 1280x720px dimensions (DevPanel.css:2-6)
  • Game canvas is centered via flexbox layout
  • DevPanel appears misaligned relative to the centered game

Desired Behavior

  • DevPanel should align with the centered game canvas
  • Should maintain proper positioning when window is resized

Files to Modify

  • src/DevPanel/DevPanel.css - Fix positioning (lines 1-14)
  • src/App.tsx - DevPanel is rendered at line 87 inside .app-stage-wrapper
  • src/App.css - Parent layout uses flexbox with align-items: center (line 30)

Suggested Approach

  • Remove position: absolute from DevPanel
  • Let DevPanel flow naturally in the flexbox layout
  • Adjust width to match game canvas width or use relative sizing
  • Test that Cmd-D toggle still works correctly

Acceptance Criteria

  • DevPanel is visually aligned with the centered game canvas
  • Alignment is maintained on window resize
  • Cmd-D toggle behavior remains unchanged

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions