Add data-span-index attribute to span rectangles for click navigation between SVG canvas and JSON-tree panel. Updated render_spans() to use enumerate() for tracking indices. Added unit tests for index assignment. Created demo HTML file demonstrating the full click navigation feature: - Click span rect -> scroll JSON tree to matching entry - Highlight target node with yellow background for 2 seconds - Auto-open ancestor <details> elements - Smooth scrollIntoView with center alignment Acceptance criteria: - PASS: data-span-index attribute added to all spans - PASS: Click handler scrolls tree to matching node - PASS: .highlighted class applied for 2 seconds - PASS: Ancestor details auto-opened before scroll - PASS: 9 unit tests pass including new span_index test Closes: pdftract-saddv Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| pdftract-cer-diff | ||
| pdftract-cli | ||
| pdftract-core | ||
| pdftract-libpdftract | ||
| pdftract-py | ||