@@ -146,7 +146,7 @@ export class GenericArrow<Source extends IVisible, Target extends IVisible>
146146 * Subclasses can override this to provide custom hover colors.
147147 */
148148 protected getHighlightedColor ( ) : string {
149- return Config . ArrowHighlightedColor ;
149+ return this . isLive ? Config . ArrowHighlightedColor : Config . ArrowDeadHighlightedColor ;
150150 }
151151
152152 onMouseEnter = ( e : KonvaEventObject < MouseEvent > ) => {
@@ -189,8 +189,9 @@ export class GenericArrow<Source extends IVisible, Target extends IVisible>
189189 this . arrowHeadRef . current . pointerWidth ( Config . ArrowHoveredHeadSize ) ;
190190 this . arrowHeadRef . current . pointerLength ( Config . ArrowHoveredHeadSize ) ;
191191 }
192+ this . source . setArrowSourceHighlightedStyle ?.( ) ;
193+ this . target ?. setArrowSourceHighlightedStyle ?.( ) ;
192194 }
193-
194195 public setNormalStyle ( ) {
195196 const color = this . isLive ? defaultStrokeColor ( ) : fadedStrokeColor ( ) ;
196197 if ( this . pathRef . current ) {
@@ -202,19 +203,16 @@ export class GenericArrow<Source extends IVisible, Target extends IVisible>
202203 this . arrowHeadRef . current . pointerWidth ( Config . ArrowHeadSize ) ;
203204 this . arrowHeadRef . current . pointerLength ( Config . ArrowHeadSize ) ;
204205 }
206+ this . source . setArrowSourceNormalStyle ?.( ) ;
207+ this . target ?. setArrowSourceNormalStyle ?.( ) ;
205208 }
206209
207210 onClick = ( e : KonvaEventObject < MouseEvent > ) => {
208211 e . cancelBubble = true ;
209212
210213 // Toggle selection - clear first, then select if it wasn't already selected
211214 const wasSelected = this . isSelected ( ) ;
212- const oldArrow = arrowSelection . clearSelection ( ) ;
213-
214- // Update old arrow's visual state
215- if ( oldArrow && oldArrow !== this ) {
216- oldArrow . setNormalStyle ( ) ;
217- }
215+ arrowSelection . clearSelection ( ) ;
218216
219217 if ( ! wasSelected ) {
220218 this . select ( ) ;
0 commit comments