mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-04 21:22:07 +00:00
allow Vue nodes to be resized from all 4 corners (#6187)
## Summary Enables Vue nodes to resize from all four corners and consolidated the interaction pipeline. ## Changes - **What**: Added four-corner handles to `LGraphNode`, wired them through the refactored `useNodeResize` composable, and centralized the math/preset helpers under `interactions/resize/` with cleaner pure functions and lint-compliant markup. ## Review Focus Corner-to-corner resizing accuracy (position + size), pinned-node guard preventing resize start, and snap-to-grid behavior at varied zoom levels. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6187-allow-Vue-nodes-to-be-resized-from-all-4-corners-2936d73d365081c8bf14e944ab24c27f) by [Unito](https://www.unito.io) --------- Co-authored-by: DrJKL <DrJKL@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
@@ -253,7 +253,7 @@ export function useNodeLayout(nodeIdMaybe: MaybeRefOrGetter<string>) {
|
||||
/**
|
||||
* Update node position directly (without drag)
|
||||
*/
|
||||
function moveTo(position: Point) {
|
||||
function moveNodeTo(position: Point) {
|
||||
mutations.setSource(LayoutSource.Vue)
|
||||
mutations.moveNode(nodeId, position)
|
||||
}
|
||||
@@ -269,7 +269,7 @@ export function useNodeLayout(nodeIdMaybe: MaybeRefOrGetter<string>) {
|
||||
isDragging,
|
||||
|
||||
// Mutations
|
||||
moveTo,
|
||||
moveNodeTo,
|
||||
|
||||
// Drag handlers
|
||||
startDrag,
|
||||
|
||||
Reference in New Issue
Block a user