fix(network): surface connect tool and middle-pan

This commit is contained in:
chihlasm
2026-04-14 03:41:21 +00:00
parent c063952f12
commit cf9c258f9e
2 changed files with 17 additions and 5 deletions

View File

@@ -17,6 +17,7 @@ import { edgeTypes } from './edges/edgeTypes'
import { getDeviceRenderConfig } from './nodes/deviceRegistry'
import type { DeviceNodeData } from './nodes/DeviceNode'
import type { InteractionMode } from './DiagramHeader'
import { cn } from '@/lib/utils'
interface NetworkCanvasProps {
nodes: Node[]
@@ -81,7 +82,15 @@ export function NetworkCanvas({
}, [])
return (
<div className="relative h-full w-full" onDragLeave={onDragLeave}>
<div
className="relative h-full w-full"
onDragLeave={onDragLeave}
onMouseDownCapture={(event) => {
if (event.button === 1) {
event.preventDefault()
}
}}
>
<ReactFlow
nodes={nodes}
edges={edges}