Repository navigation
Structure tab: align the full-page screenshot with the wireframe - #65
Merged
Merged
Conversation
The screenshot is only as wide as the viewport, but the wireframe canvas is as wide as the document, which on mobile often overflows the viewport. Stretching the image over the whole canvas skewed it against the structure lines. Draw it viewport-wide with its own aspect ratio at the wireframe's scale instead, for both the first-screen and full-page shots. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…crop The stitch asked the GPU for an image of shot-width x page-height, which on a long page exceeds the texture limit. The engine then cropped the result to the top-left corner instead of scaling it, so the screenshot looked zoomed (~1.7x) against the structure wireframe. Scale the whole image down to at most 8192 px on its longest side. Also derive how much page one shot covers from the shot's own aspect ratio: the snapshot is the web view's bounds, which can be shorter than window.innerHeight, so stepping by innerHeight skipped content and stretched each slice. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On phones (and in a small macOS window) the full-page screenshot in the Structure tab was zoomed about 1.7x and did not line up with the wireframe blocks.
Causes
window.innerHeight(421 vs 515 CSS px in the macOS repro). Stepping byinnerHeightskipped content and stretched each slice. The step and slot height now come from the first shot's aspect ratio.Testing
🤖 Generated with Claude Code