feat(canvas): edge endpoint reconnect + proxmox container snap points
- Selected edge shows interactive dots at both endpoints; drag onto any handle (different snap point or different node) to reconnect. Edge follows the cursor live during drag; drop on empty space leaves edge unchanged. - Endpoint dots render in EdgeLabelRenderer above the node layer and walk the elementsFromPoint stack so the underlying handle wins over the dragged dot itself. - ProxmoxGroupNode in container mode now renders bottom_handles snap points (was always single 'bottom' handle), matching BaseNode. - New canvasStore.reconnectEdge action: swaps source/target/handles via normalizeHandle, snapshots history, marks dirty.
This commit is contained in:
@@ -102,6 +102,18 @@ describe('ProxmoxGroupNode', () => {
|
||||
expect(container.querySelector('.rounded-xl.border-2')).not.toBeNull()
|
||||
})
|
||||
|
||||
it('container mode renders bottom_handles snap points', () => {
|
||||
const { container } = renderNode({ bottom_handles: 4 })
|
||||
const sourceHandles = container.querySelectorAll('.react-flow__handle-bottom.source')
|
||||
expect(sourceHandles.length).toBe(4)
|
||||
})
|
||||
|
||||
it('container mode default has single bottom handle', () => {
|
||||
const { container } = renderNode({})
|
||||
const sourceHandles = container.querySelectorAll('.react-flow__handle-bottom.source')
|
||||
expect(sourceHandles.length).toBe(1)
|
||||
})
|
||||
|
||||
it('renders cluster handles in both modes', () => {
|
||||
const { container: groupC } = renderNode({})
|
||||
expect(groupC.querySelectorAll('[title="Same cluster"]').length).toBeGreaterThanOrEqual(2)
|
||||
|
||||
Reference in New Issue
Block a user