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
Link directional arrow placement incorrect with custom node sizes #385
Comments
I also meet the same problem.
|
@pury are you overriding the default node representation using It's also easier if you can provide an example on codesandbox. |
@vasturiano Yes, here is a simple example. https://codesandbox.io/s/forcegraph3d-demo2-d8msdt However, it may not be relevant to A pure example of using the default node representation. |
@pury thanks for creating those examples. There was an issue with the arrow positioning calculation, which was misbehaving when I just pushed a fix to three-forcegraph. Essentially it was interpreting the value of the node as the area instead of the volume of the node (square-root vs cubic-root). That was responsible for the offset that you described. This is now fixed and published so all you have to do is bump your inner dependency of Let me know if this fixes it for you. |
Thanks for your support @vasturiano, it fixed the problem! |
With Force3DGraph, when I set custom values to
nodeRelSize
andnodeVal
, the arrows on the links move along the length of the edge rather than staying attached to the target node even though II'm settinglinkDirectionalArrowRelPos=1
.My configs are set as follows:
The node
size
is calculated from a node property. Some of the nodes don't have thesize
property, so I set a default size in that case. When there is a difference in size between the source and target node, the link arrow is misplaced on the link. I've attached a screenshot to illustrate a few examples. As you can see, the blue node is smaller than the red ones around it, and the arrows on outgoing edges and pushed back toward the source, in some cases even going inside the source.The text was updated successfully, but these errors were encountered: