Skip to content
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

Painting Over Links #40

Closed
GeoffGodwin opened this issue Sep 18, 2018 · 5 comments
Closed

Painting Over Links #40

GeoffGodwin opened this issue Sep 18, 2018 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@GeoffGodwin
Copy link

nodeCanvasObject is excellent for allowing custom painting code over nodes on the graph. Is it possible to also expose a similar method to draw over links?

@GeoffGodwin
Copy link
Author

For instance, it would be nice to have a weighted graph where the weights in-between are always floating and visible, not simply when it's hovered over. If there was a paint function for the links this could be possible.

@vasturiano vasturiano self-assigned this Oct 31, 2018
@vasturiano
Copy link
Owner

@GeoffGodwin I think that would be a good feature addition. It's slightly more complicated because the method would have to read the source/target coordinates and draw it in the correct location, so it puts more burden on the client implementation.
But I still think it would be useful. I'll leave the issue open until there's a bit of time to implement it. Or I'll accept a PR too if you have something working. :)

@vasturiano vasturiano added the enhancement New feature or request label Oct 31, 2018
@GeoffGodwin
Copy link
Author

Yeah I may have to give that a try. I figure getting the midpoint between source and destination is easy enough for straight links. Slightly more work to calculate the curved links but not terrible in terms of the price of the calculations. If I get a chance I'll open a PR with whatever I come up with. Thanks!

@varqasim
Copy link

@GeoffGodwin Have you got the chance to try it out? I currently have a use case where I would like to paint the links of the selected node.

@vasturiano
Copy link
Owner

@GeoffGodwin @qasimalbaqali this is now already supported, using linkThreeObject and linkPositionUpdate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants