Relands #31 and #32 by huchenlei · Pull Request #39 · Comfy-Org/litegraph.js (original) (raw)

@webfiltered @huchenlei

Adds disconnect feature and very minor bug fixes (in separate commits):

6036: skip_action = true

Not sure why skip_action was set to true, here. It prevents disconnect and drag to a new output on the same click, so I've included it in the main commit. Ideally, this should be controlled by a consumer hook, e.g. onDisconnectInput.

@webfiltered @huchenlei

When an output connects to multiple inputs, and you'd like to move all of those links to another node, you are currently required to drag each new link one by one.

This commit adds the ability to move everything at once, using Shift + Click (and drag).

It -does not- currently work with the drop to blank space + search for new node. It will j ust rewire the first. This can probably be fixed easily enough.

It -does- function with reroute nodes, however it requires that they are dropped onto the new output directly, not just anywhere on the node. This is expected, really.

@huchenlei