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
@@ -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