diff --git a/src/VisualProgrammingUI/VisProgUI.tsx b/src/VisualProgrammingUI/VisProgUI.tsx index 40e858d..0df6a4c 100644 --- a/src/VisualProgrammingUI/VisProgUI.tsx +++ b/src/VisualProgrammingUI/VisProgUI.tsx @@ -11,16 +11,28 @@ import { useNodesState, useEdgesState, reconnectEdge, - addEdge, type Edge, type Connection, + addEdge, + MarkerType, + type Edge, + type Connection, } from '@xyflow/react'; import '@xyflow/react/dist/style.css'; + const initialNodes = [ - {id: 'n1', position: {x: 0, y: 0}, data: {label: 'Node 1'}}, - {id: 'n2', position: {x: 0, y: 100}, data: {label: 'Node 2'}}, + {id: 'n1', position: {x: 0, y: 0}, data: {label: 'Start'}}, + {id: 'n2', position: {x: 0, y: 100}, data: {label: 'End'}}, ]; const initialEdges = [{id: 'n1-n2', source: 'n1', target: 'n2'}]; +const defaultEdgeOptions = { + type: 'floating', + markerEnd: { + type: MarkerType.ArrowClosed, + color: '#505050', + }, +}; + const VisualProgrammingUI = ()=> { const edgeReconnectSuccessful = useRef(true); const [nodes, , onNodesChange] = useNodesState(initialNodes); @@ -51,10 +63,11 @@ const VisualProgrammingUI = ()=> { }, [setEdges]); return ( -
+
{ onReconnectEnd={onReconnectEnd} onConnect={onConnect} fitView - attributionPosition="top-right" + proOptions={{hideAttribution: true }} >