-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Arrows? #57
Comments
Hello There is no implemented function as such. But you can refer to this example: #20 (comment) In the future I will add the function. You could also change the onput / input circles to triangles with css. |
Other solutions for arrows #163 (comment) |
I've created an alternative solution here which adds a separate SVG path for the arrow so it can be styled differently to the main path. |
Easy fix to update the transform on the CSS Before:
After:
|
Using this same approach, I added a class to the output/input that informs it's connected (@jerosoler something it would be nice to have intrinsically to the library). Then I added the css Jero suggested, only when connected. Looks cleaner... I used for input only though. CSS:
JS:
PS: I'm also restricting the inputs/outputs to one connection only. If allowing more connections per connection, a protection would be needed when removing the class ( |
@ArFe 's solution worked well for me; exactly what I wanted. However it assumes you are building the graph live & processing events. If you're loading a graph (e.g. via .import()), then add this immediately after the import:
And allNodes() (which would be a nice addition to the editor API):
|
Is it possible to add arrows to indicate direction between nodes?
The text was updated successfully, but these errors were encountered: