chore(markers): cleanup marker api

This commit is contained in:
Christopher Möller
2021-11-24 12:02:09 +01:00
parent 3011efd101
commit 0f480444f2
6 changed files with 71 additions and 46 deletions
+7 -1
View File
@@ -13,6 +13,7 @@ import ReactFlow, {
EdgeChange,
OnLoadParams,
Connection,
MarkerType,
} from 'react-flow-renderer';
import DebugNode from './DebugNode';
@@ -86,7 +87,12 @@ const initialNodes: Node[] = [
];
const initialEdges: Edge[] = [
{ id: 'e1-2', source: '1', target: '2', animated: true },
{
id: 'e1-2',
source: '1',
target: '2',
markerEnd: { type: MarkerType.Arrow, strokeWidth: 2, width: 15, height: 15, color: '#f00' },
},
{ id: 'e1-3', source: '1', target: '3' },
{ id: 'e3-4', source: '3', target: '4', zIndex: 100 },
{ id: 'e3-4b', source: '3', target: '4b' },