Skip to content

feat(dia.CellView): add computeNodeBoundingRect method#3284

Merged
Geliogabalus merged 1 commit into
clientIO:masterfrom
kumilingus:feat/compute-node-bounding-rect
Apr 20, 2026
Merged

feat(dia.CellView): add computeNodeBoundingRect method#3284
Geliogabalus merged 1 commit into
clientIO:masterfrom
kumilingus:feat/compute-node-bounding-rect

Conversation

@kumilingus

@kumilingus kumilingus commented Apr 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extract node measurement logic from getNodeBoundingRect into a public computeNodeBoundingRect() method on CellView
  • Unlike getNodeBoundingRect, the result is never cached and the paper's measureNode callback is not consulted
  • Adds checkVisibility() guard for SVG nodes (previously only checked for HTML nodes) — warns and returns a zero rect when the node is not in the render tree

Test plan

  • Added SVG invisible node test mirroring existing HTML invisible tests
  • All 452 cellView client tests pass
  • TypeScript type tests pass

🤖 Generated with Claude Code

Extract node bounding rect measurement into a public
`computeNodeBoundingRect()` method on CellView. The method computes
the pre-rotation bounding rectangle for both SVG and HTML nodes,
and warns when a node is not visible.

Also relaxes HighlighterView node validation from SVGElement to
Element to support HTML highlighters.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kumilingus kumilingus requested a review from Geliogabalus April 18, 2026 09:17
@Geliogabalus Geliogabalus merged commit 4b4bb52 into clientIO:master Apr 20, 2026
3 checks passed
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.

2 participants