File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,52 @@ describe('update menus interactions', function() {
462
462
} ) ;
463
463
} ) ;
464
464
465
+ it ( 'should update correctly on failed binding comparisons' , function ( done ) {
466
+
467
+ // See https://github.com/plotly/plotly.js/issues/1169
468
+ // for more info.
469
+
470
+ var data = [ {
471
+ y : [ 1 , 2 , 3 ] ,
472
+ visible : true
473
+ } , {
474
+ y : [ 2 , 3 , 1 ] ,
475
+ visible : false
476
+ } , {
477
+ y : [ 3 , 1 , 2 ] ,
478
+ visible : false
479
+ } ] ;
480
+
481
+ var layout = {
482
+ updatemenus : [ {
483
+ buttons : [ {
484
+ label : 'a' ,
485
+ method : 'restyle' ,
486
+ args : [ 'visible' , [ true , false , false ] ]
487
+ } , {
488
+ label : 'b' ,
489
+ method : 'restyle' ,
490
+ args : [ 'visible' , [ false , true , false ] ]
491
+ } , {
492
+ label : 'c' ,
493
+ method : 'restyle' ,
494
+ args : [ 'visible' , [ false , false , true ] ]
495
+ } ]
496
+ } ]
497
+ } ;
498
+
499
+ Plotly . newPlot ( gd , data , layout ) . then ( function ( ) {
500
+ return click ( selectHeader ( 0 ) ) ;
501
+ } )
502
+ . then ( function ( ) {
503
+ return click ( selectButton ( 1 ) ) ;
504
+ } )
505
+ . then ( function ( ) {
506
+ assertActive ( gd , [ 1 ] ) ;
507
+ } )
508
+ . then ( done ) ;
509
+ } ) ;
510
+
465
511
it ( 'should change color on mouse over' , function ( done ) {
466
512
var INDEX_0 = 2 ,
467
513
INDEX_1 = gd . layout . updatemenus [ 1 ] . active ;
You can’t perform that action at this time.
0 commit comments