Repository navigation
Show the backdrop only where the buffer does not reach (#131, #130) - #132
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK
|
Owner
Author
|
Review, round 1.
|
Back in CSS pixels the viewport rect came out a hair short of the view at some pixel ratios (999.9999999999999 for 1000 px at 1.1). The view then never counted as covered while pieces were pending, and the old backdrop showed after a toggle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK
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.
Fixes #131. Fixes #130.
The buffer is see-through outside the board outline. The backdrop under it showed there all the time once it had been drawn:
The backdrop is now displayed only when the drawn part of the buffer does not cover the whole view. It is the same transform
updateCSSTransform()uses.bufferCoversView()inrender.js. While overscan pieces are still to come, only the viewport rect of the render counts as drawn. When all pieces are in, the whole buffer counts.updateBackdropTransform()setsdisplayfrom that. It already runs on every pan, zoom and blit.blitPiece()calls it when the last piece is in.blitBackdrop()sets_backdropReadyinstead ofdisplay: block.hideBackdrop()clears it.This differs from the fix in #131, which waits for all overscan pieces before it hides the backdrop. Counting the viewport rect hides it at the first blit after a toggle, and that is what fixes #130. Hiding the backdrop on every key change, as #130 suggests, was not needed.
Tests
display === 'block'to mean "a backdrop for this view is drawn" now check_backdropReady. The resize test recordshideBackdrop()calls, sincedisplaymay already benone.an inner layer checkbox changes both sides). That test passes when run alone; it is the known flaky one.npm run test:apipasses.🤖 Generated with Claude Code
https://claude.ai/code/session_01UCbPYsA5LYNX8HZaGGZCpK