mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
bezier
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
|||||||
useReactFlow,
|
useReactFlow,
|
||||||
BackgroundVariant,
|
BackgroundVariant,
|
||||||
SelectionMode,
|
SelectionMode,
|
||||||
|
MarkerType,
|
||||||
} from '@xyflow/react';
|
} from '@xyflow/react';
|
||||||
import type { Node, NodeTypes, OnSelectionChangeParams } from '@xyflow/react';
|
import type { Node, NodeTypes, OnSelectionChangeParams } from '@xyflow/react';
|
||||||
import '@xyflow/react/dist/style.css';
|
import '@xyflow/react/dist/style.css';
|
||||||
@@ -446,8 +447,14 @@ function WorkflowEditorInner() {
|
|||||||
panOnDrag={[1, 2]} // Middle click and right click to pan
|
panOnDrag={[1, 2]} // Middle click and right click to pan
|
||||||
selectNodesOnDrag={false}
|
selectNodesOnDrag={false}
|
||||||
defaultEdgeOptions={{
|
defaultEdgeOptions={{
|
||||||
type: 'smoothstep',
|
type: 'bezier',
|
||||||
animated: true,
|
animated: true,
|
||||||
|
markerEnd: {
|
||||||
|
type: MarkerType.ArrowClosed,
|
||||||
|
width: 20,
|
||||||
|
height: 20,
|
||||||
|
color: 'hsl(var(--muted-foreground))',
|
||||||
|
},
|
||||||
}}
|
}}
|
||||||
deleteKeyCode={null} // We handle delete manually
|
deleteKeyCode={null} // We handle delete manually
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ export const useWorkflowStore = create<WorkflowState>((set, get) => ({
|
|||||||
const newEdge: WorkflowEdge = {
|
const newEdge: WorkflowEdge = {
|
||||||
...connection,
|
...connection,
|
||||||
id: generateEdgeId(),
|
id: generateEdgeId(),
|
||||||
type: 'smoothstep',
|
type: 'bezier',
|
||||||
} as WorkflowEdge;
|
} as WorkflowEdge;
|
||||||
|
|
||||||
set((state) => ({
|
set((state) => ({
|
||||||
@@ -464,7 +464,7 @@ export const useWorkflowStore = create<WorkflowState>((set, get) => ({
|
|||||||
target: edge.target,
|
target: edge.target,
|
||||||
sourceHandle: edge.source_port,
|
sourceHandle: edge.source_port,
|
||||||
targetHandle: edge.target_port,
|
targetHandle: edge.target_port,
|
||||||
type: 'smoothstep',
|
type: 'bezier',
|
||||||
data: {
|
data: {
|
||||||
label: edge.label,
|
label: edge.label,
|
||||||
condition: edge.condition,
|
condition: edge.condition,
|
||||||
|
|||||||
Reference in New Issue
Block a user