sbuffkin_hexmaker/dev
isaprettycoolguy@protonmail.com 5ce48af60d fix: grid expand/shrink preserves bg image alignment (1.4.1)
Adding or removing a row/column from the top or left of the grid used
to either visually bump the existing hexes (no compensation) or keep
the hexes in place but drift the background image away from them
(pan-only compensation). The fix pairs the pan shift with a matching
shift of the bg image's offsetX/Y in viewport coordinates, so the bg
and the hex grid both stay anchored in screen space after the click.

Also replaces the hex-height-based stride formula with a direct
measurement of the offsetTop/Left delta between two consecutive
rows/cols. The old formula `hex.offsetHeight * 0.75` ignored the
0.15em hex margin and drifted ~5 px per click; the new approach
captures everything that contributes to layout spacing.

Includes a sandbox + headless-Chromium test
(dev/bg-hex-alignment-sandbox.html + snapshot-bg-hex-alignment.mjs)
that verifies the originally-top hex AND a fixed bg-image feature
both stay within 0.6 px of their baseline screen position after one,
three, or repeated top-expand clicks.
2026-06-17 18:18:53 -04:00
..
.gitignore feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
bg-hex-alignment-sandbox.html fix: grid expand/shrink preserves bg image alignment (1.4.1) 2026-06-17 18:18:53 -04:00
calibration-outline-overlay-sandbox.html feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
hex-calibration-sandbox.html feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
screenshot-approaches.mjs feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00
snapshot-bg-hex-alignment.mjs fix: grid expand/shrink preserves bg image alignment (1.4.1) 2026-06-17 18:18:53 -04:00
snapshot-calibration-outline.mjs feat: background image + grid calibration mode (1.4.0) 2026-06-17 17:01:24 -04:00