Skip to content

Commit

Permalink
feat: highlight valid/invalid connection between nodes (#3266)
Browse files Browse the repository at this point in the history
Change the inputs background to green/red to hint compatible connections, in adition to the `not-allowed` mouse cursor for incompatible connections
  • Loading branch information
rhumbertgz authored Sep 26, 2024
1 parent 4381656 commit d2d3f3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/ui/src/views/canvas/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@
flex-grow: 1;
height: 100%;
}

.chatflow-canvas .react-flow__handle-connecting {
cursor: not-allowed;
background: #db4e4e !important;
}

.chatflow-canvas .react-flow__handle-valid {
cursor: crosshair;
background: #5dba62 !important;
}
1 change: 1 addition & 0 deletions packages/ui/src/views/canvas/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ const Canvas = () => {
fitView
deleteKeyCode={canvas.canvasDialogShow ? null : ['Delete']}
minZoom={0.1}
className='chatflow-canvas'
>
<Controls
style={{
Expand Down

0 comments on commit d2d3f3d

Please sign in to comment.