chore(memory): capitalize PDF bugfix — BLK-004, LRN-006, LRN-007
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
bc9a51784a
commit
3bb229331e
3 files changed
+25
No files matched your search
@@ -27,3 +27,12 @@ Friction: clicks on head detail SVG zones did nothing.
|
||||
Root: EditorRoute.onZoneClick looked up id in main-SVG bones map only → detail ids (point-*) undefined → early return.
|
||||
Fix: parse detail SVG on detail open, store detailBones, fallback lookup `bones.get(id) ?? detailBones.get(id)`.
|
||||
Status: resolved.
|
||||
|
||||
---
|
||||
|
||||
## BLK-004 | 2026-05-19 | PDF text loop assumed one line per array entry
|
||||
|
||||
Friction: long zone string collided with following lines (pathologies, sévérité, commentaire).
|
||||
Root: pdf-lib maxWidth wraps glyph drawing but caller advanced cursor by `i * 14` based on block index — wrapped lines invisible to layout.
|
||||
Fix: explicit wrapLines + per-line cursor advance + per-block gap.
|
||||
Status: resolved.
|
||||
@@ -22,3 +22,4 @@ Parser reads data-anno-special; convention doc updated.
|
||||
- BLK-003 resolved. LRN-004, LRN-005 captured. 91 tests green, lint clean, build OK.
|
||||
- VertebraPicker preselects region tab inferred from zone label (b3bd75d). +5 tests.
|
||||
- Hotfix: detailBones now accumulate across popup opens; merged allBones passed to ObservationList so detail-popup zone labels survive after modal close.
|
||||
- PDF rendering bugfix: titles cleared the header rule, zone-line wrap respects following blocks, non-selected zones hidden + data-anno-* stripped before raster, main SVG skipped when every zone lives in details. BLK-004, LRN-006, LRN-007 captured.
|
||||
@@ -42,3 +42,18 @@ Apply: any SVG-driven UI where authors add new annotation types regularly — us
|
||||
When a popup loads a separate SVG, its annotation ids are not in the parent's bones map.
|
||||
Parse detail SVG on popup open and keep a `detailBones` map; fall back lookup `bones.get(id) ?? detailBones.get(id)` in shared click handler.
|
||||
Apply: any nested/zoom-popup pattern where the child SVG has independent ids.
|
||||
|
||||
---
|
||||
|
||||
## LRN-006 | 2026-05-19 | Strip authoring annotations before rasterizing for print
|
||||
|
||||
Source SVGs carry interaction-only artifacts (data-anno-*, transparent hitboxes, faint default fills) that are invisible in-app via CSS but leak into PDF rasterization.
|
||||
Before raster: walk `[data-anno-id]`, hide non-selected via display="none", strip data-anno-* attributes, recolor selected.
|
||||
Apply: any "screen → print" pipeline where the screen SVG has interaction layers.
|
||||
|
||||
---
|
||||
|
||||
## LRN-007 | 2026-05-19 | pdf-lib maxWidth wraps glyphs, not your cursor
|
||||
|
||||
pdf-lib's drawText({ maxWidth }) wraps the visible glyph run but the returned y is unchanged — caller must measure with widthOfTextAtSize and advance the cursor per wrapped line. Otherwise subsequent text blocks overlap the wrapped tail.
|
||||
Apply: any pdf-lib layout with variable-length user text. Always wrap explicitly + advance per line.
|
||||
Reference in new issue
Block a user