File tree Expand file tree Collapse file tree 4 files changed +17
-19
lines changed
app/src/components/visualizer Expand file tree Collapse file tree 4 files changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ const GardenFlowInner = ({ gardens }: Props) => {
221221 } ;
222222
223223 // handle node mouse enter/leave for hover effects
224- const onNodeMouseEnter : NodeMouseHandler = useCallback ( ( event , node ) => {
224+ const onNodeMouseEnter : NodeMouseHandler = useCallback ( ( _event , node ) => {
225225 if (
226226 node . type === "supergarden" ||
227227 node . type === "subgarden" ||
@@ -239,6 +239,18 @@ const GardenFlowInner = ({ gardens }: Props) => {
239239 document . body . style . cursor = "default" ;
240240 } , [ ] ) ;
241241
242+ const renderedEdges = edges . map ( ( edge ) => ( {
243+ ...edge ,
244+ // TODO toggle this via settings
245+ // type: "default",
246+ animated : true ,
247+ style : {
248+ ...edge . style ,
249+ strokeWidth : 2 ,
250+ stroke : "gray" ,
251+ } ,
252+ } ) ) ;
253+
242254 return (
243255 < ReactFlow
244256 className = "relative"
@@ -264,7 +276,7 @@ const GardenFlowInner = ({ gardens }: Props) => {
264276 : undefined ,
265277 } ,
266278 } ) ) }
267- edges = { edges }
279+ edges = { renderedEdges }
268280 onNodesChange = { onNodesChange }
269281 onEdgesChange = { onEdgesChange }
270282 onNodeClick = { onNodeClick }
@@ -290,8 +302,6 @@ const GardenFlowInner = ({ gardens }: Props) => {
290302 defaultEdgeOptions = { {
291303 type : "smoothstep" ,
292304 animated : true ,
293- // style: { stroke: "#999", strokeWidth: 1.5 },
294- // markerEnd: { type: MarkerType.ArrowClosed },
295305 } }
296306 connectionLineType = { ConnectionLineType . SmoothStep }
297307 >
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ const GardenNode = ({ data }: Props) => {
1515 data . targetConnections && data . targetConnections . length > 0 ;
1616 const hasBottomSources =
1717 data . sourceConnections && data . sourceConnections . length > 0 ;
18- const hasRightSources = false ; // optional: set this based on specific connection types
18+ // optional: set this based on specific connection types
19+ const hasRightSources = false ;
1920
2021 return (
2122 < Card className = "w-[200px] border-2 shadow-lg" >
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ const SubgardenNode = ({ data }: Props) => {
1616
1717 return (
1818 < Card className = "w-[200px] border-2 shadow-lg transition-transform hover:scale-105" >
19- { hasTargets && < Handle type = "target" position = { Position . Top } /> }
19+ < Handle type = "target" position = { Position . Top } />
2020
2121 < div className = "flex cursor-pointer flex-col items-center gap-4 rounded-lg px-2 py-2 text-center" >
2222 < div className = "flex w-full justify-between" >
Original file line number Diff line number Diff line change @@ -38,19 +38,6 @@ const SupergardenNode = ({ data }: Props) => {
3838 < h4 className = "line-clamp-2 text-sm" > { data . description } </ h4 >
3939 ) }
4040 </ div >
41-
42- < Button
43- variant = "secondary"
44- size = "sm"
45- onClick = { ( e ) => {
46- e . stopPropagation ( ) ;
47- window . open ( data . url , "_blank" ) ;
48- } }
49- className = "w-full"
50- >
51- < ExternalLinkIcon size = { 14 } className = "mr-1" />
52- View
53- </ Button >
5441 </ div >
5542 </ Card >
5643 ) ;
You can’t perform that action at this time.
0 commit comments