-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support rendering layers of measurable SVG nodes in plexus #422
Support rendering layers of measurable SVG nodes in plexus #422
Conversation
- Add the prop to override how nodes are measured - Add a demo graph that uses measurable SVG nodes and overrides how they're measured - Rename the nodeRender prop to renderNode Signed-off-by: Joe Farro <joef@uber.com>
Codecov Report
@@ Coverage Diff @@
## master #422 +/- ##
==========================================
+ Coverage 91.62% 91.67% +0.04%
==========================================
Files 176 176
Lines 4010 4010
Branches 928 928
==========================================
+ Hits 3674 3676 +2
+ Misses 298 296 -2
Partials 38 38
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. One minor, possibly-TS question.
...current.measure(), | ||
vertex: vertices[i], | ||
vertex, | ||
...(measureNode && utils ? measureNode(vertex, utils) : current.measure()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the measureNode && utils
to satisfy TypeScript? It seems like Boolean(measureNode)
and Boolean(utils)
must always be the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for TypeScript.
…cing#422) Support rendering layers of measurable SVG nodes in plexus Signed-off-by: vvvprabhakar <vvvprabhakar@gmail.com>
Which problem is this PR solving?
Adds the ability to render a SVG layer of measurable nodes.
Short description of the changes
Adds support for rendering measurable SVG nodes in plexus.
Additional changes:
Add the
measureNode
prop to override how nodes are measured. The use of this prop is shown in the demo.Add a demo graph that uses measurable SVG nodes and overrides how
they're measured
Rename the
nodeRender
prop torenderNode