@@ -42,7 +42,7 @@ describe('ModeBar', function() {
42
42
_has : Plots . _hasPlotType ,
43
43
_subplots : { xaxis : xaxes || [ ] , yaxis : yaxes || [ ] } ,
44
44
modebar : {
45
- buttonstoadd : '' ,
45
+ add : '' ,
46
46
orientation : 'h' ,
47
47
bgcolor : 'rgba(255,255,255,0.7)' ,
48
48
color : 'rgba(0, 31, 95, 0.3)' ,
@@ -1560,7 +1560,7 @@ describe('ModeBar', function() {
1560
1560
. then ( done , done . fail ) ;
1561
1561
} ) ;
1562
1562
1563
- it ( 'add and remove predefined shape drawing and hover buttons via layout.modebar.buttonstoadd and template' , function ( done ) {
1563
+ it ( 'add and remove predefined shape drawing and hover buttons via layout.modebar.add and template' , function ( done ) {
1564
1564
function countButtons ( ) {
1565
1565
var modeBarEl = gd . _fullLayout . _modeBar . element ;
1566
1566
return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
@@ -1571,7 +1571,7 @@ describe('ModeBar', function() {
1571
1571
. then ( function ( ) {
1572
1572
expect ( countButtons ( ) ) . toBe ( initial ) ;
1573
1573
1574
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1574
+ return Plotly . relayout ( gd , 'modebar.add ' , [
1575
1575
'drawline' ,
1576
1576
'drawopenpath' ,
1577
1577
'drawclosedpath' ,
@@ -1583,12 +1583,12 @@ describe('ModeBar', function() {
1583
1583
. then ( function ( ) {
1584
1584
expect ( countButtons ( ) ) . toBe ( initial + 6 ) ;
1585
1585
1586
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , '' ) ;
1586
+ return Plotly . relayout ( gd , 'modebar.add ' , '' ) ;
1587
1587
} )
1588
1588
. then ( function ( ) {
1589
1589
expect ( countButtons ( ) ) . toBe ( initial ) ;
1590
1590
1591
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1591
+ return Plotly . relayout ( gd , 'modebar.add ' , [
1592
1592
'hovercompare' ,
1593
1593
'hoverclosest' ,
1594
1594
'togglespikelines'
@@ -1597,20 +1597,20 @@ describe('ModeBar', function() {
1597
1597
. then ( function ( ) {
1598
1598
expect ( countButtons ( ) ) . toBe ( initial + 3 ) ;
1599
1599
1600
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , '' ) ;
1600
+ return Plotly . relayout ( gd , 'modebar.add ' , '' ) ;
1601
1601
} )
1602
1602
. then ( function ( ) {
1603
1603
expect ( countButtons ( ) ) . toBe ( initial ) ;
1604
1604
1605
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1605
+ return Plotly . relayout ( gd , 'modebar.add ' , [
1606
1606
'v1hovermode' ,
1607
1607
'togglespikelines'
1608
1608
] . join ( '+' ) ) ;
1609
1609
} )
1610
1610
. then ( function ( ) {
1611
1611
expect ( countButtons ( ) ) . toBe ( initial + 3 ) ;
1612
1612
1613
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1613
+ return Plotly . relayout ( gd , 'modebar.add ' , [
1614
1614
'v1hovermode' ,
1615
1615
'togglespikelines' ,
1616
1616
'togglehover' ,
@@ -1624,20 +1624,20 @@ describe('ModeBar', function() {
1624
1624
. then ( function ( ) {
1625
1625
expect ( countButtons ( ) ) . toBe ( initial + 4 , 'skip duplicates' ) ;
1626
1626
1627
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1627
+ return Plotly . relayout ( gd , 'modebar.add ' , [
1628
1628
'drawline' ,
1629
1629
'invalid'
1630
1630
] . join ( '+' ) ) ;
1631
1631
} )
1632
1632
. then ( function ( ) {
1633
1633
expect ( countButtons ( ) ) . toBe ( initial + 1 , 'skip invalid' ) ;
1634
1634
1635
- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , '' ) ;
1635
+ return Plotly . relayout ( gd , 'modebar.add ' , '' ) ;
1636
1636
} )
1637
1637
. then ( function ( ) {
1638
1638
expect ( countButtons ( ) ) . toBe ( initial ) ;
1639
1639
1640
- return Plotly . relayout ( gd , 'template.layout.modebar.buttonstoadd ' , 'v1hovermode' ) ;
1640
+ return Plotly . relayout ( gd , 'template.layout.modebar.add ' , 'v1hovermode' ) ;
1641
1641
} )
1642
1642
. then ( function ( ) {
1643
1643
expect ( countButtons ( ) ) . toBe ( initial + 2 , 'via template' ) ;
0 commit comments