rgthree-comfy icon indicating copy to clipboard operation
rgthree-comfy copied to clipboard

[BUG] Nodes don't seem to support the "Lock" feature

Open ghostsquad opened this issue 1 year ago • 3 comments

Comfy added the ability to "Lock" nodes (prevent them from moving). Nodes here don't show "lock" in the context menu.

ghostsquad avatar Jan 09 '24 04:01 ghostsquad

Update, not all nodes seem to support this. Context appears to show "lock". Fast Bypasser/Muter, Reroute, and Any Switch (there may be more) don't show "lock" in the context menu.

ghostsquad avatar Jan 09 '24 04:01 ghostsquad

Context Node, when locked, is still moveable.

ghostsquad avatar Jan 09 '24 04:01 ghostsquad

Saw this issue thread +1 feature request for lock ability for reroute nodes

aphaits avatar Apr 25 '24 00:04 aphaits

Agree. The image comparer doesn't lock. I accidentally click on it when trying to move the canvas around and move the control by mistake instead of the canvas since my compare image is large. (I know I can use space+mouse, but I don't always rember to use it). It shows the "lock" icon in the corner but can still be moved.

It would be nice if the controls respected the lock so that if you accidentally click and drag them, they don't go someplace wonky.

sfisher avatar Aug 03 '24 23:08 sfisher

Sorry, I looked into this months ago and forgot to reply, I guess.

First, "Lock" is not a base-install ComfyUI feature, though "Pin" is and does the same thing AFAICT (at least for locking the position). You don't get a fancy lock icon with "Pin" though.

The "Lock" feature comes from the ComfyUI-Custom-Scripts and, unfortunately, the way it has been implemented there is not compatible with the core GraphNode class in base LiteGraph library (which is the frontend JS library that does all the work for Comfy).

Note, a lot of other nodes use an overridden ComfyUI Node which is why other nodes seem to be working with the ComfyUI-Custom-Scripts (but not all, for instance the base "Note" node you cannot "Lock" butcan "Pin"). Nearly all the rgthree-comfy nodes uses the core LiteGraph GraphNode to do much cooler stuff and avoid the constant breakages and general inflexibility with the ComfyUI Node variant.

Unfortunately, I can't really fix it from rgthree-comfy code, since it's actually an incompatibility between LiteGraph and ComfyUI-Custom-Scripts. You could file a bug with the ComfyUI-Custom-Scripts nodes that Locking doesn't work with the core LiteGraph GraphNode (and, therefore, rgthree-comfy nodes), or use "Pin".

rgthree avatar Aug 04 '24 03:08 rgthree