@@ -528,10 +528,9 @@ class Edge {
528
528
// set style
529
529
var node1 = this . from ;
530
530
var node2 = this . to ;
531
- var selected = ( this . from . selected || this . to . selected || this . selected ) ;
532
531
533
- if ( this . labelModule . differentState ( selected , this . hover ) ) {
534
- this . labelModule . getTextSize ( ctx , selected , this . hover ) ;
532
+ if ( this . labelModule . differentState ( this . selected , this . hover ) ) {
533
+ this . labelModule . getTextSize ( ctx , this . selected , this . hover ) ;
535
534
}
536
535
537
536
if ( node1 . id != node2 . id ) {
@@ -541,13 +540,13 @@ class Edge {
541
540
542
541
// if the label has to be rotated:
543
542
if ( this . options . font . align !== "horizontal" ) {
544
- this . labelModule . calculateLabelSize ( ctx , selected , this . hover , point . x , point . y ) ;
543
+ this . labelModule . calculateLabelSize ( ctx , this . selected , this . hover , point . x , point . y ) ;
545
544
ctx . translate ( point . x , this . labelModule . size . yLine ) ;
546
545
this . _rotateForLabelAlignment ( ctx ) ;
547
546
}
548
547
549
548
// draw the label
550
- this . labelModule . draw ( ctx , point . x , point . y , selected , this . hover ) ;
549
+ this . labelModule . draw ( ctx , point . x , point . y , this . selected , this . hover ) ;
551
550
ctx . restore ( ) ;
552
551
}
553
552
else {
@@ -564,7 +563,7 @@ class Edge {
564
563
y = node1 . y - node1 . shape . height * 0.5 ;
565
564
}
566
565
point = this . _pointOnCircle ( x , y , radius , 0.125 ) ;
567
- this . labelModule . draw ( ctx , point . x , point . y , selected , this . hover ) ;
566
+ this . labelModule . draw ( ctx , point . x , point . y , this . selected , this . hover ) ;
568
567
}
569
568
}
570
569
}
0 commit comments