File tree 1 file changed +1
-14
lines changed
1 file changed +1
-14
lines changed Original file line number Diff line number Diff line change @@ -399,7 +399,6 @@ function drawTexts(g, gd) {
399
399
400
400
var transforms , direction ;
401
401
var fullInput = legendItem . trace . _fullInput || { } ;
402
- var needsRedraw = false ;
403
402
var update = { } ;
404
403
405
404
// N.B. this block isn't super clean,
@@ -419,7 +418,6 @@ function drawTexts(g, gd) {
419
418
420
419
if ( BLANK_STRING_REGEX . test ( origText ) ) {
421
420
carr . remove ( legendItem . trace . _group ) ;
422
- needsRedraw = true ;
423
421
} else {
424
422
carr . set ( legendItem . trace . _group , text ) ;
425
423
}
@@ -429,18 +427,7 @@ function drawTexts(g, gd) {
429
427
update . name = text ;
430
428
}
431
429
432
- var p = Plotly . restyle ( gd , update , traceIndex ) ;
433
-
434
- // If a groupby label is deleted, it seems like we need another redraw in order
435
- // to restore the label. Otherwise it simply sets this property and the blank
436
- // string is retained.
437
- if ( needsRedraw ) {
438
- p = p . then ( function ( ) {
439
- return Plotly . redraw ( gd ) ;
440
- } ) ;
441
- }
442
-
443
- return p ;
430
+ return Plotly . restyle ( gd , update , traceIndex ) ;
444
431
} ) ;
445
432
}
446
433
else text . call ( textLayout ) ;
You can’t perform that action at this time.
0 commit comments