DearPyGui icon indicating copy to clipboard operation
DearPyGui copied to clipboard

Custom node pin location

Open uxy-byte opened this issue 1 year ago • 2 comments

Hi,

When creating new nodes in a node_editor, would it be possible to allow the location of the pins (input and output) to be user-defined such that they can be located anywhere along the edges of a node? I ran into an issue in my project, where the node hierarchy/network would be more user friendly if the connections would run top-bottom, rather than left-right.

Currently I don't see any workaround for customizing the locations of the input and output pins for a node widget, other than being on the left or right side.

Thank you!

uxy-byte avatar Dec 04 '24 03:12 uxy-byte

Unfortunately ImNodes, the backbone of DPG node editor, does not support pins on top/bottom edges. Even at the left/right side, it takes quite an effort to place pins at specific locations/offsets.

v-ein avatar Dec 05 '24 21:12 v-ein

Just FYI, here's an example of how one can place dots on the left and right side at the same level: https://github.com/my1e5/dpg-examples/blob/main/misc/multiple_node_attributes_one_line.py

Not sure how much effort it would be to support this inside of DPG.

v-ein avatar Dec 05 '24 21:12 v-ein