@@ -33,6 +33,7 @@ interface Props {
3333 setCooldownTime : Dispatch < SetStateAction < number > >
3434}
3535
36+ const PATH_COLOR = "#ffde21"
3637const NODE_SIZE = 6 ;
3738const PADDING = 2 ;
3839
@@ -142,10 +143,13 @@ export default function GraphView({
142143 nodeVisibility = "visible"
143144 linkVisibility = "visible"
144145 linkCurvature = "curve"
146+ linkDirectionalArrowRelPos = { 1 }
147+ linkDirectionalArrowColor = { ( link ) => ( link . isPath || link . isPathSelected ) ? PATH_COLOR : link . color }
148+ linkDirectionalArrowLength = { ( link ) => link . source . id === link . target . id ? 0 : ( link . id === selectedObj ?. id || link . isPathSelected ) ? 3 : 2 }
145149 nodeRelSize = { NODE_SIZE }
146150 linkLineDash = { ( link ) => ( link . isPath && ! link . isPathSelected ) ? [ 5 , 5 ] : [ ] }
147- linkColor = { ( link ) => ( link . isPath || link . isPathSelected ) ? "#FF66B3" : link . color }
148- linkWidth = { ( link ) => ( link . id === selectedObj ?. id || link . isPathSelected ) ? 1 : 0.5 }
151+ linkColor = { ( link ) => ( link . isPath || link . isPathSelected ) ? PATH_COLOR : link . color }
152+ linkWidth = { ( link ) => ( link . id === selectedObj ?. id || link . isPathSelected ) ? 2 : 1 }
149153 nodeCanvasObjectMode = { ( ) => 'after' }
150154 linkCanvasObjectMode = { ( ) => 'after' }
151155 nodeCanvasObject = { ( node , ctx ) => {
@@ -154,11 +158,11 @@ export default function GraphView({
154158 if ( isPathResponse ) {
155159 if ( node . isPathSelected ) {
156160 ctx . fillStyle = node . color ;
157- ctx . strokeStyle = '#FF66B3' ;
161+ ctx . strokeStyle = PATH_COLOR ;
158162 ctx . lineWidth = 1
159163 } else if ( node . isPath ) {
160164 ctx . fillStyle = node . color ;
161- ctx . strokeStyle = '#FF66B3' ;
165+ ctx . strokeStyle = PATH_COLOR ;
162166 ctx . lineWidth = 0.5
163167 } else {
164168 ctx . fillStyle = '#E5E5E5' ;
@@ -168,11 +172,11 @@ export default function GraphView({
168172 } else if ( isPathResponse === undefined ) {
169173 if ( node . isPathSelected ) {
170174 ctx . fillStyle = node . color ;
171- ctx . strokeStyle = '#FF66B3' ;
175+ ctx . strokeStyle = PATH_COLOR ;
172176 ctx . lineWidth = 1
173177 } else if ( node . isPath ) {
174178 ctx . fillStyle = node . color ;
175- ctx . strokeStyle = '#FF66B3' ;
179+ ctx . strokeStyle = PATH_COLOR ;
176180 ctx . lineWidth = 0.5
177181 } else {
178182 ctx . fillStyle = node . color ;
0 commit comments