@@ -80,7 +80,7 @@ export class BlockConnection<T extends TConnection>
8080 // Handle arrow visibility based on the provided props
8181 if ( props . showConnectionArrows ) {
8282 // Update will handle adding if not already in batch or updating if it is
83- this . context . batch . update ( this . arrowShape , { zIndex : zIndex , group : `arrow/${ this . getClassName ( state ) } ` } ) ;
83+ this . context . batch . update ( this . arrowShape , { zIndex : zIndex - 1 , group : `arrow/${ this . getClassName ( state ) } ` } ) ;
8484 } else {
8585 // Remove arrow from batch if showConnectionArrows is false
8686 this . context . batch . delete ( this . arrowShape ) ;
@@ -284,16 +284,6 @@ export class BlockConnection<T extends TConnection>
284284
285285 this . labelGeometry = { x, y, width, height } ;
286286
287- ctx . fillStyle = this . context . colors . connectionLabel . text ;
288-
289- if ( this . state . hovered ) ctx . fillStyle = this . context . colors . connectionLabel . hoverText ;
290- if ( this . state . selected ) ctx . fillStyle = this . context . colors . connectionLabel . selectedText ;
291-
292- ctx . textBaseline = "top" ;
293- ctx . textAlign = aligment ;
294- ctx . font = font ;
295- ctx . fillText ( this . state . label , x + padding , y + padding ) ;
296-
297287 ctx . fillStyle = this . context . colors . connectionLabel . background ;
298288
299289 if ( this . state . hovered ) ctx . fillStyle = this . context . colors . connectionLabel . hoverBackground ;
@@ -305,6 +295,16 @@ export class BlockConnection<T extends TConnection>
305295 measure . width + labelInnerLeftPadding + labelInnerRightPadding ,
306296 measure . height + labelInnerTopPadding + labelInnerBottomPadding
307297 ) ;
298+
299+ ctx . fillStyle = this . context . colors . connectionLabel . text ;
300+
301+ if ( this . state . hovered ) ctx . fillStyle = this . context . colors . connectionLabel . hoverText ;
302+ if ( this . state . selected ) ctx . fillStyle = this . context . colors . connectionLabel . selectedText ;
303+
304+ ctx . textBaseline = "top" ;
305+ ctx . textAlign = aligment ;
306+ ctx . font = font ;
307+ ctx . fillText ( this . state . label , x + padding , y + padding ) ;
308308 }
309309
310310 public getStrokeColor ( state : TConnection ) {
0 commit comments