Skip to content

Draw a mate's dots clear of both cards - #11

Merged
XDGFX merged 1 commit into
mainfrom
fix-mate-dots
Oct 18, 2026
Merged

XDGFX merged 1 commit into
mainfrom
fix-mate-dots

Conversation

@XDGFX

@XDGFX XDGFX commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Summary

A mate used to be one dashed path (stroke-dasharray="0 8", round caps) from one card's edge to the other's. Its end dots sat on the card borders and clipped into them. If the span was an exact multiple of the period, the last dot was dropped and the row sat off centre.

mateDots in src/render.ts now works out each dot's position along the route. Dots are one period (8) apart, centred in the gap, and at least one period clear of each card. A gap too short for two clear dots gets one dot at its middle. Each dot is drawn as a circle of radius 2.5 in --muted, the same size, spacing and colour as before.

The portfolio pack's path.mate post-processing in focus.mjs no longer matches anything and can be removed.

Evidence

  • Hailey HEATING_SYSTEMS_CONN / HEATING_SYSTEMS_CONN_B: the old path M1722,545 L1770,545 becomes dots at x = 1730, 1738, 1746, 1754, 1762. That is the same row the portfolio workaround produced.
  • The shower, lighting, truck and water looms render five centred dots for each of their mates.
  • New tests in test/render.test.ts cover dot positions on a straight gap, an off-grid gap and an L-shaped route, the single-dot narrow case, and a check that the rendered pair draws those dots.
  • npm run typecheck, npm test (95/95) and npm run build pass.

🤖 Generated with Claude Code

The mate was a dashed path running card edge to card edge, so its end
dots sat on the card borders, and a span that was an exact multiple of
the dash period dropped its last dot. Each dot is now a circle placed
along the route: one period apart, centred in the gap, at least one
period clear of each card, and one dot at the middle when the gap is
too short for more. Size, spacing and colour are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@XDGFX
XDGFX marked this pull request as ready for review October 18, 2026 12:41
@XDGFX
XDGFX merged commit 4441b12 into main Oct 18, 2026
1 check passed
@XDGFX
XDGFX deleted the fix-mate-dots branch October 18, 2026 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant