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

Feature request: dynamic edge/wire #14

Open
hyumo opened this issue Mar 31, 2024 · 5 comments
Open

Feature request: dynamic edge/wire #14

hyumo opened this issue Mar 31, 2024 · 5 comments

Comments

@hyumo
Copy link

hyumo commented Mar 31, 2024

Thanks a lot for this great node editor lib, I have been exploring it for a few days and trying to create my own tool based on it.

A feature request: I am not sure if it is possible to add a Dynamic Edge feature (see the snapshot below I took from Svelvet), it would be great if there's an interface to update the style and also add text (or widget) overlays onto the connection wires.

image

@zakarumych
Copy link
Owner

Hi!

It should be straightforward to add widget overlays for wires.

However I'm not sure what dynamic edge is. It's not obvious from screenshot

@hyumo
Copy link
Author

hyumo commented Mar 31, 2024

Hi,

Thanks for the quick reply, adding widget overlays is basically what I want.

I am not an active user of Svelvet, this is just the example I found. I think the dynamic edge in Svelvet means the edge/wire style changes based on node values, for example, if you take a closer look, the color of the Dynamic Edge wire is actually from the color picker node. I have seen some other applications that can do dashed lines etc. Style change is not important for me tho, might be good to have for others if it is simple enough and is not taking too much of your valueable time.

@zakarumych
Copy link
Owner

I see.

If you want, you may add a method to SnarlViewer to draw widgets on top of wires.

Lib should provide this method with correctly positioned and clipped Ui

@zakarumych
Copy link
Owner

What you can do already is control color of the pin and wire (wire color is mix of connected pin colors).
Node can output any pin color it wants and the other end can look into connected pin to chose same color to have wire of the same color.

@hyumo
Copy link
Author

hyumo commented Apr 13, 2024

Thanks for your reply, yes I can give it a go. Feel free to close the issue if you think this is already doable, I'm just trying to avoid hand-rolling anything on my own. Looking forward to the next release!

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

No branches or pull requests

2 participants