@@ -41,7 +41,6 @@ describe('ModeBar', function() {
41
41
_modebardiv : d3 . select ( getMockModeBarTree ( ) ) ,
42
42
_has : Plots . _hasPlotType ,
43
43
_subplots : { xaxis : xaxes || [ ] , yaxis : yaxes || [ ] } ,
44
- _basePlotModules : [ ] ,
45
44
modebar : {
46
45
orientation : 'h' ,
47
46
bgcolor : 'rgba(255,255,255,0.7)' ,
@@ -349,6 +348,7 @@ describe('ModeBar', function() {
349
348
var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
350
349
gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } ] ;
351
350
gd . _fullLayout . xaxis = { fixedrange : false } ;
351
+ gd . _fullData = [ { type : 'scatter' } ] ;
352
352
353
353
manageModeBar ( gd ) ;
354
354
var modeBar = gd . _fullLayout . _modeBar ;
@@ -412,6 +412,7 @@ describe('ModeBar', function() {
412
412
413
413
var gd = getMockGraphInfo ( ) ;
414
414
gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } ] ;
415
+ gd . _fullData = [ { type : 'scatter' } ] ;
415
416
416
417
manageModeBar ( gd ) ;
417
418
var modeBar = gd . _fullLayout . _modeBar ;
@@ -429,6 +430,7 @@ describe('ModeBar', function() {
429
430
430
431
var gd = getMockGraphInfo ( ) ;
431
432
gd . _fullLayout . _basePlotModules = [ { name : 'gl3d' } ] ;
433
+ gd . _fullData = [ { type : 'scatter3d' } ] ;
432
434
433
435
manageModeBar ( gd ) ;
434
436
var modeBar = gd . _fullLayout . _modeBar ;
@@ -446,6 +448,7 @@ describe('ModeBar', function() {
446
448
447
449
var gd = getMockGraphInfo ( ) ;
448
450
gd . _fullLayout . _basePlotModules = [ { name : 'geo' } ] ;
451
+ gd . _fullData = [ { type : 'scattergeo' } ] ;
449
452
450
453
manageModeBar ( gd ) ;
451
454
var modeBar = gd . _fullLayout . _modeBar ;
@@ -486,6 +489,7 @@ describe('ModeBar', function() {
486
489
487
490
var gd = getMockGraphInfo ( ) ;
488
491
gd . _fullLayout . _basePlotModules = [ { name : 'mapbox' } ] ;
492
+ gd . _fullData = [ { type : 'scattermapbox' } ] ;
489
493
490
494
manageModeBar ( gd ) ;
491
495
var modeBar = gd . _fullLayout . _modeBar ;
@@ -527,6 +531,7 @@ describe('ModeBar', function() {
527
531
var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
528
532
gd . _fullLayout . _basePlotModules = [ { name : 'gl2d' } ] ;
529
533
gd . _fullLayout . xaxis = { fixedrange : false } ;
534
+ gd . _fullData = [ { type : 'scattergl' } ] ;
530
535
531
536
manageModeBar ( gd ) ;
532
537
var modeBar = gd . _fullLayout . _modeBar ;
@@ -542,6 +547,7 @@ describe('ModeBar', function() {
542
547
543
548
var gd = getMockGraphInfo ( ) ;
544
549
gd . _fullLayout . _basePlotModules = [ { name : 'pie' } ] ;
550
+ gd . _fullData = [ { type : 'pie' } ] ;
545
551
546
552
manageModeBar ( gd ) ;
547
553
var modeBar = gd . _fullLayout . _modeBar ;
@@ -559,6 +565,7 @@ describe('ModeBar', function() {
559
565
560
566
var gd = getMockGraphInfo ( ) ;
561
567
gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } , { name : 'gl3d' } ] ;
568
+ gd . _fullData = [ { type : 'scatter' } , { type : 'scatter3d' } ] ;
562
569
563
570
manageModeBar ( gd ) ;
564
571
var modeBar = gd . _fullLayout . _modeBar ;
@@ -577,6 +584,7 @@ describe('ModeBar', function() {
577
584
var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
578
585
gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } , { name : 'geo' } ] ;
579
586
gd . _fullLayout . xaxis = { fixedrange : false } ;
587
+ gd . _fullData = [ { type : 'scatter' } , { type : 'scattergeo' } ] ;
580
588
581
589
manageModeBar ( gd ) ;
582
590
var modeBar = gd . _fullLayout . _modeBar ;
@@ -642,6 +650,7 @@ describe('ModeBar', function() {
642
650
643
651
var gd = getMockGraphInfo ( ) ;
644
652
gd . _fullLayout . _basePlotModules = [ { name : 'geo' } , { name : 'gl3d' } ] ;
653
+ gd . _fullData = [ { type : 'scattergeo' } , { type : 'scatter3d' } ] ;
645
654
646
655
manageModeBar ( gd ) ;
647
656
var modeBar = gd . _fullLayout . _modeBar ;
@@ -658,6 +667,7 @@ describe('ModeBar', function() {
658
667
659
668
var gd = getMockGraphInfo ( ) ;
660
669
gd . _fullLayout . _basePlotModules = [ { name : 'ternary' } ] ;
670
+ gd . _fullData = [ { type : 'scatterternary' } ] ;
661
671
662
672
manageModeBar ( gd ) ;
663
673
var modeBar = gd . _fullLayout . _modeBar ;
@@ -696,6 +706,7 @@ describe('ModeBar', function() {
696
706
697
707
var gd = getMockGraphInfo ( ) ;
698
708
gd . _fullLayout . _basePlotModules = [ { name : 'ternary' } , { name : 'cartesian' } ] ;
709
+ gd . _fullData = [ { type : 'scatterternary' } , { type : 'scatter' } ] ;
699
710
700
711
manageModeBar ( gd ) ;
701
712
var modeBar = gd . _fullLayout . _modeBar ;
@@ -713,6 +724,7 @@ describe('ModeBar', function() {
713
724
714
725
var gd = getMockGraphInfo ( ) ;
715
726
gd . _fullLayout . _basePlotModules = [ { name : 'ternary' } , { name : 'gl3d' } ] ;
727
+ gd . _fullData = [ { type : 'scatterternary' } , { type : 'scatter3d' } ] ;
716
728
717
729
manageModeBar ( gd ) ;
718
730
var modeBar = gd . _fullLayout . _modeBar ;
@@ -726,7 +738,7 @@ describe('ModeBar', function() {
726
738
] ) ;
727
739
728
740
var gd = getMockGraphInfo ( ) ;
729
- gd . _fullLayout . _basePlotModules = [ { name : 'indicator' } ] ;
741
+ gd . _fullData = [ { type : 'indicator' } ] ;
730
742
731
743
manageModeBar ( gd ) ;
732
744
var modeBar = gd . _fullLayout . _modeBar ;
@@ -741,7 +753,8 @@ describe('ModeBar', function() {
741
753
] ) ;
742
754
743
755
var gd = getMockGraphInfo ( ) ;
744
- gd . _fullLayout . _basePlotModules = [ { name : 'indicator' } , { name : 'pie' } ] ;
756
+ gd . _fullLayout . _basePlotModules = [ { name : 'pie' } ] ;
757
+ gd . _fullData = [ { type : 'indicator' } , { type : 'pie' } ] ;
745
758
746
759
manageModeBar ( gd ) ;
747
760
var modeBar = gd . _fullLayout . _modeBar ;
@@ -794,6 +807,7 @@ describe('ModeBar', function() {
794
807
it ( 'displays/hides cloud link according to showSendToCloud config arg' , function ( ) {
795
808
var gd = getMockGraphInfo ( ) ;
796
809
gd . _fullLayout . _basePlotModules = [ { name : 'pie' } ] ;
810
+ gd . _fullData = [ { type : 'pie' } ] ;
797
811
manageModeBar ( gd ) ;
798
812
checkButtons ( gd . _fullLayout . _modeBar , getButtons ( [
799
813
[ 'toImage' ] ,
@@ -823,6 +837,7 @@ describe('ModeBar', function() {
823
837
var gd = getMockGraphInfo ( [ 'x' ] , [ 'y' ] ) ;
824
838
gd . _fullLayout . _basePlotModules = [ { name : 'cartesian' } ] ;
825
839
gd . _fullLayout . xaxis = { fixedrange : false } ;
840
+ gd . _fullData = [ { type : 'scatter' } ] ;
826
841
return gd ;
827
842
}
828
843
@@ -833,6 +848,7 @@ describe('ModeBar', function() {
833
848
expect ( countButtons ( gd . _fullLayout . _modeBar ) ) . toEqual ( 11 ) ;
834
849
835
850
gd . _fullLayout . _basePlotModules = [ { name : 'gl3d' } ] ;
851
+ gd . _fullData = [ { type : 'scatter3d' } ] ;
836
852
manageModeBar ( gd ) ;
837
853
838
854
expect ( countButtons ( gd . _fullLayout . _modeBar ) ) . toEqual ( 9 ) ;
0 commit comments