Repository navigation
Stop the map's tiles showing dark lines while zooming - #113
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 8 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (5)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Mid-zoom the map is scaled past its resting size, so tile edges land between pixels; at rest a tile's size, which goes through CSS zoom, can end a hair short of one. Chrome lets about a quarter of such a pixel through, and the page showed as a grid of dark lines. Opaque tiles now reach one screen pixel under their right and bottom neighbours, two while the map is scaled, and the backdrop runs on 8 px under the sharp tiles. See-through rasters (the province modes) keep exact edges, since an overlap would show twice as deep. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
ryanbarlow97
force-pushed
the
map-zoom-seams
branch
from
October 7, 2026 22:01
a13a9c2 to
2f48568
Compare
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.
What
Follow-up to #111. Panning is clean since #111, but zooming (wheel, pinch, +/- keys) still showed a grid of dark lines along the tile edges.
Why
Mid-zoom the content is scaled past its resting zoom, so every tile edge lands between pixels. At rest a tile's size still goes through CSS
zoomand layout rounding, so an edge can end ~0.02 px short of the pixel. Chrome's edge antialiasing lets about a quarter of such a pixel through either way, and the page behind showed.Fix
scaleproperty and a--map-live-scalevariable thatuseMapViewportsets per frame (data-scaling), so the overlap stays the same size on screen through the gesture. Positions moved fromtransformto thetranslateproperty so the scale composes about the tile's own corner.seeThrough, the province modes such as prosperity, ~40 % partial alpha) keep exact edges: an overlap would show twice as deep.Checked
Chromium against live data, solid-black tiles on white, worst line darkness that is a tile seam (remaining peaks are map/panel edges):
tscclean; 1,434 map/viewport/admin/chronicle tests pass (new: opaque tiles overlap and inset the backdrop hole, see-through ones don't).🤖 Generated with Claude Code