You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the README, there's a section about checking for new links where you instruct users to call imnodes::IsLinkCreated().
Is there an equivalent function for detecting that a link should be destroyed? In Blender, when you click and drag one of the endpoints of an existing link, it disconnects the two nodes and the link follows the mouse until you reconnect it somewhere or let go of the mouse button and it disappears. Is similar functionality possible with imnodes?
The text was updated successfully, but these errors were encountered:
Clicking and dragging an existing link to reconnect it is not currently possible with imnodes, but it is something I want to add (I'm a Blender user as well and really like the way nodes work there 😄 ).
The library follows the immediate-mode principle in that UI elements are added by simply calling Begin/End for that new element, and symmetrically they are "deleted" by just not calling Begin/End for that UI element. imnodes tries to be very stateless in this regard. So it is up to the user to decide how deleting a node or link works. You can e.g. just query the selected node and link ids and remove them from your own backing containers.
Clicking and dragging links is the one thing which doesn't sit very well with the immediate-mode principle since you have to track their state between frames. But I suppose disconnecting a link could be communicated to the user in much the same way that IsLinkCreated is done 🙂
In the README, there's a section about checking for new links where you instruct users to call
imnodes::IsLinkCreated()
.Is there an equivalent function for detecting that a link should be destroyed? In Blender, when you click and drag one of the endpoints of an existing link, it disconnects the two nodes and the link follows the mouse until you reconnect it somewhere or let go of the mouse button and it disappears. Is similar functionality possible with imnodes?
The text was updated successfully, but these errors were encountered: