Repository navigation
fix(zoom): a deep zoom is sharp to the edges of the view, and first under the pointer (ZOOM-EDGES) - #340
Merged
Conversation
…nder the pointer (ZOOM-EDGES) An estimator on a trackpad: the change DEEP-ZOOM made showed with the cursor at the middle of the screen and not toward its edges. The zoom itself was right; the sharpening after it lagged. Measured on the restaurant sheet at about 3000%, Retina density: the centre was sharp 0.7 s after the zoom, a pointer at a corner 1.6 to 2.9 s, and on a 1728 x 1117 window without navigator.deviceMemory one corner never stayed sharp while the grid rastered for good. pdf-tile-cache.js: - the tile grid's cells fill outward from the pointer (ctx.getFocusPoint, state.mousePos), the view's centre when the pointer is off it - a landed cell asks for the next at once, not after the 200 ms settle - a cell on screen is never evicted; the budget bounds what is kept off screen - rebaseCropTile: where the new base is clamped soft, the commit's sharp window is kept, its box re-authored, until the grid behind it can replace all of it After: sharp everywhere about 0.3 s after the zoom on every window tried. New zoom-edges.spec.js (both tests fail on the code before). Also the docs pass since ec29abc: manage-user's set_flags verb and the roster's two new flags (#339) are written down, and ARCHITECTURE.md's pdf-tile-cache.js row no longer says the tile grid lives in app.js. Co-Authored-By: Claude Fable 5.2 <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.
The report
An estimator, on a trackpad: "the change when the cursor is in the center of the screen is noticable, but not towards the edges of the screen." The change is DEEP-ZOOM's (zoom past 1200%).
What was wrong
The zoom itself holds the point under the pointer at every position. What lagged was the sharpening after it: past the canvas budget the full-page base is soft and
pdf-tile-cache.jslays sharp 512 px cells over the view. Measured on the real app (restaurant sheet, about 3000%, Retina density):navigator.deviceMemory(Safari, Firefox)The fix (pdf-tile-cache.js)
ctx.getFocusPoint,state.mousePos), the view's centre when the pointer is off it.rebaseCropTile: where the new base is clamped soft, the commit's sharp window is kept, its box re-authored in the new base's units, until the grid behind it can replace all of it. A sharp base still retires the tile.After, same measurement: sharp everywhere about 0.3 s after the zoom on every window tried (1512 x 982 to 2560 x 1300), and no raster once the view is whole.
Tests
zoom-edges.spec.js, two tests; both fail on the code before this change.npm run check: 14 of 14.render-pixels.spec.jsis one pixel off the local macOS baseline with or without it (CI reads the linux baseline), andtag-reader.spec.js:73timed out once under load and passes alone.Not measured
The estimator's own machine and browser. PUNCHLIST DEEP-ZOOM-CONFIRM already asks for her Save Status export.
Also in this PR
The docs pass since ec29abc:
manage-user'sset_flagsverb and the roster's two new flags (#339) are written down in CHANGELOG.md and AGENTS.md, and ARCHITECTURE.md's pdf-tile-cache.js row no longer says the tile grid lives in app.js.🤖 Generated with Claude Code