Drag Multiple Vue Nodes (#5459)

* feat: enhance dragging functionality to support multiple selected nodes

* feat: enhance node selection handling to support drag state detection

* feat: enhance node selection handling to support drag state detection

* fix: update event trigger from pointer down to pointer up in LGraphNode tests
This commit is contained in:
Johnpaul Chiwetelu
2025-09-12 01:25:23 +01:00
committed by GitHub
parent 54cbf42a84
commit c051c3a507
5 changed files with 79 additions and 22 deletions

View File

@@ -103,13 +103,13 @@ describe('LGraphNode', () => {
expect(wrapper.classes()).toContain('animate-pulse')
})
it('should emit node-click event on pointer down', async () => {
it('should emit node-click event on pointer up', async () => {
const wrapper = mountLGraphNode({ nodeData: mockNodeData })
await wrapper.trigger('pointerdown')
await wrapper.trigger('pointerup')
expect(wrapper.emitted('node-click')).toHaveLength(1)
expect(wrapper.emitted('node-click')?.[0]).toHaveLength(2)
expect(wrapper.emitted('node-click')?.[0]).toHaveLength(3)
expect(wrapper.emitted('node-click')?.[0][1]).toEqual(mockNodeData)
})
})