File tree Expand file tree Collapse file tree 1 file changed +1
-14
lines changed Expand file tree Collapse file tree 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) {
399399
400400 var transforms , direction ;
401401 var fullInput = legendItem . trace . _fullInput || { } ;
402- var needsRedraw = false ;
403402 var update = { } ;
404403
405404 // N.B. this block isn't super clean,
@@ -419,7 +418,6 @@ function drawTexts(g, gd) {
419418
420419 if ( BLANK_STRING_REGEX . test ( origText ) ) {
421420 carr . remove ( legendItem . trace . _group ) ;
422- needsRedraw = true ;
423421 } else {
424422 carr . set ( legendItem . trace . _group , text ) ;
425423 }
@@ -429,18 +427,7 @@ function drawTexts(g, gd) {
429427 update . name = text ;
430428 }
431429
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 ) ;
444431 } ) ;
445432 }
446433 else text . call ( textLayout ) ;
You can’t perform that action at this time.
0 commit comments