mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 13:41:59 +00:00
[fix] Prevent drag activation during Vue node resize (#7064)
## Summary - Add isResizingVueNodes flag to layoutStore - Set flag in useNodeResize during resize operation - Check flag in useNodePointerInteractions to skip drag activation Fixes a bug where resizing a Vue node after selecting it would incorrectly trigger drag logic, causing the node to teleport. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7064-fix-Prevent-drag-activation-during-Vue-node-resize-2bb6d73d365081a2ad0ad4c7be76afee) by [Unito](https://www.unito.io) --------- Co-authored-by: DrJKL <DrJKL0424@gmail.com>
This commit is contained in:
@@ -92,12 +92,14 @@ const mockData = vi.hoisted(() => {
|
||||
|
||||
vi.mock('@/renderer/core/layout/store/layoutStore', () => {
|
||||
const isDraggingVueNodes = ref(false)
|
||||
const isResizingVueNodes = ref(false)
|
||||
const fakeNodeLayoutRef = ref(mockData.fakeNodeLayout)
|
||||
const getNodeLayoutRef = vi.fn(() => fakeNodeLayoutRef)
|
||||
const setSource = vi.fn()
|
||||
return {
|
||||
layoutStore: {
|
||||
isDraggingVueNodes,
|
||||
isResizingVueNodes,
|
||||
getNodeLayoutRef,
|
||||
setSource
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user