feat: enhance WorkflowEditor by adding drag-and-drop functionality to the workflow canvas
This commit is contained in:
@@ -314,7 +314,12 @@ export function WorkflowEditor({
|
|||||||
</ResizablePanel>
|
</ResizablePanel>
|
||||||
<ResizableHandle withHandle />
|
<ResizableHandle withHandle />
|
||||||
<ResizablePanel defaultSize="56%" minSize="30%" className="min-h-0">
|
<ResizablePanel defaultSize="56%" minSize="30%" className="min-h-0">
|
||||||
<section className="relative h-full min-h-0">
|
<section
|
||||||
|
data-workflow-canvas
|
||||||
|
className="relative h-full min-h-0"
|
||||||
|
onDragOver={onCanvasDragOver}
|
||||||
|
onDrop={onCanvasDrop}
|
||||||
|
>
|
||||||
<ReactFlow
|
<ReactFlow
|
||||||
nodes={renderedNodes}
|
nodes={renderedNodes}
|
||||||
edges={edges}
|
edges={edges}
|
||||||
@@ -327,8 +332,6 @@ export function WorkflowEditor({
|
|||||||
onEdgesChange={onEdgesChange}
|
onEdgesChange={onEdgesChange}
|
||||||
onConnect={onConnect}
|
onConnect={onConnect}
|
||||||
onInit={setFlowInstance}
|
onInit={setFlowInstance}
|
||||||
onDragOver={onCanvasDragOver}
|
|
||||||
onDrop={onCanvasDrop}
|
|
||||||
onNodeClick={(_, node) => setSelectedNodeId(node.id)}
|
onNodeClick={(_, node) => setSelectedNodeId(node.id)}
|
||||||
fitView
|
fitView
|
||||||
fitViewOptions={fitViewOptions}
|
fitViewOptions={fitViewOptions}
|
||||||
|
|||||||
Reference in New Issue
Block a user