mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 16:10:09 +00:00
[backport cloud/1.35] Fix: the wrong selection under the hand mode (#7716)
## Summary Backport of #7541 to cloud/1.35. Fixed an inconsistency where nodes were resizable in Hand mode. Resizing is now restricted to Selection mode only to match standard LiteGraph behavior (Hand mode should only be for panning). ## Changes - Added guard clause to prevent resize in Hand mode (`shouldHandleNodePointerEvents` check) - Added `event.button !== 0` check for non-primary mouse buttons ## Original PR https://github.com/Comfy-Org/ComfyUI_frontend/pull/7541 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7716-backport-cloud-1-35-Fix-the-wrong-selection-under-the-hand-mode-2d16d73d365081c7b558f652952bb590) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -327,6 +327,8 @@ const { startResize } = useNodeResize((result, element) => {
|
||||
})
|
||||
|
||||
const handleResizePointerDown = (event: PointerEvent) => {
|
||||
if (event.button !== 0) return
|
||||
if (!shouldHandleNodePointerEvents.value) return
|
||||
if (nodeData.flags?.pinned) return
|
||||
startResize(event)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user