Commit aeadd63
committed
Polish marginalia diagrams: meticulous edge alignment
A polish pass after applying the impeccable/polish protocol. Key issue:
edges between nodes were hand-coordinated, so the operators tree's lines
visibly missed the circles. The fix lifts the geometry into the grammar.
- src/marginalia_grammar.py adds Canvas.connect(ax, ay, ar, bx, by, br),
which computes line endpoints from the line of centers and terminates
exactly at each circle's boundary plus an optional offset. Misalignment
becomes structurally impossible: cards no longer hand-pick line
coordinates.
- scripts/build_marginalia.py replaces hand-coded strokes in e_operators
(tree edges) and e_iterators (state-machine arrows with offset=2) with
connect() calls.
- e_inheritance ghost diamond endpoints corrected to A's bottom-center
(160, 28) instead of (150, 28) and (170, 28).
- e_values third box repositioned to honour the 16px gap (192 not 196).
- e_dataclasses, e_recursion, e_unpacking: stacked-cell row strides now
match cell heights (no more random 2px gaps between adjacent cells).
- e_break_continue: continue arrow changed from a diagonal off-frame line
to a clean vertical "back to top" arrow; break arrow caption tightened.
https://claude.ai/code/session_01MazwoRWAihW6dwso3fMCHE1 parent 05e1ec5 commit aeadd63
3 files changed
Lines changed: 63 additions & 33 deletions
0 commit comments