Skip to content

feat(renderer): a canvas opens as Fit leaves it, with a margin the host sets - #106

Merged
LeslieOA merged 1 commit into
developfrom
feat/fit-margin
Nov 2, 2026
Merged

LeslieOA merged 1 commit into
developfrom
feat/fit-margin

Conversation

@LeslieOA

@LeslieOA LeslieOA commented Nov 2, 2026

Copy link
Copy Markdown
Member
  • Opening a canvas without a saved view and Fit now use the same fit (fitCamera): centred across what the left overlay leaves, and down the whole view. Opening counts as a fit, so a resize keeps it fitted.
  • fitMargin: space kept clear above and below fitted content, for a host whose bar sits over the canvas's top. Defaults to 0, so hosts that don't set it fit as before.
  • fitToViewport(leftOverlayWidth, {animated: false}) goes straight to the fit.

Tests: fitCamera (centring, left overlay, margin, empty canvas, scale limits).

🤖 Generated with Claude Code

…st sets

- Opening a canvas without a saved view and Fit use the same fit
  (fitCamera): centred across what the left overlay leaves, down the whole
  view. Opening counts as a fit, so a resize keeps it fitted.
- fitMargin: kept clear above and below fitted content, for a host whose
  bar sits over the canvas's top. Defaults to 0.
- fitToViewport takes {animated: false} to go straight there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LeslieOA
LeslieOA merged commit 01eab4c into develop Nov 2, 2026
1 check passed
@LeslieOA
LeslieOA deleted the feat/fit-margin branch November 2, 2026 06: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.

1 participant