jagenjo / litegraph.js

A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side using Node. It allows to export graphs as JSONs to be included in applications independently.
MIT License
5.33k stars 602 forks source link

Please fix overlapping group box behavior #428

Open CHollman82 opened 6 months ago

CHollman82 commented 6 months ago

If you drag one group box over another such that nodes from each are inside the overlapping region and let go of it (release mouse button) the next time you go to move either of the two overlapping boxes they will "steal" nodes from the other box... Group boxes need an actual z-order that is maintained and when interacted with that z-order determines which nodes get dragged along with it. When you click on a group it should be "brought to front", or in other words it's z-order should be set to 0.

When adding a node to a group box and you drag it into the region of two or more group boxes the one with the lowest z-order gets the nodes and then they become children of that group box and their z-order is modified to match it at all times.

Also, it would be awesome to be able to nest group boxes... even if only 2 levels of this.

Also, it would be awesome to be able to collapse group boxes like you can collapse nodes.

atlasan commented 4 months ago

I would change "Please fix" to something more gentle. This is more a feature request than a bug fix. "Help needed", "Could somebody", "Nice to have", .. I would love too to have some node-group improvements.