Download src/components/mindmap/MindMapEdge.js from UnDaoDu/aimindmap: direct link, hf CLI and curl.
- Browser
- Download file 512 Bytes
-
https://huggingface.co/spaces/UnDaoDu/aimindmap/resolve/main/src/components/mindmap/MindMapEdge.js
- Command line
-
hf download hf://spaces/UnDaoDu/aimindmap/src/components/mindmap/MindMapEdge.js
-
curl -L -o MindMapEdge.js https://huggingface.co/spaces/UnDaoDu/aimindmap/resolve/main/src/components/mindmap/MindMapEdge.js
512 Bytes
| import { MarkerType } from 'reactflow'; | |
| export const LINE_TYPES = { | |
| SMOOTHSTEP: 'smoothstep', | |
| STRAIGHT: 'straight', | |
| BEZIER: 'bezier' | |
| }; | |
| export const edgeDefaults = { | |
| type: 'smoothstep', | |
| animated: true, | |
| style: { | |
| stroke: '#3498db', | |
| strokeWidth: 2, | |
| }, | |
| markerEnd: { | |
| type: MarkerType.ArrowClosed, | |
| width: 20, | |
| height: 20, | |
| color: '#3498db', | |
| }, | |
| }; | |
| export const getEdgeStyle = (edge, edgeTypes) => ({ | |
| ...edgeDefaults, | |
| type: edgeTypes[edge.id] || LINE_TYPES.SMOOTHSTEP, | |
| }); |