@@ -42,7 +42,7 @@ describe('ModeBar', function() {
4242 _has : Plots . _hasPlotType ,
4343 _subplots : { xaxis : xaxes || [ ] , yaxis : yaxes || [ ] } ,
4444 modebar : {
45- buttonstoadd : '' ,
45+ add : '' ,
4646 orientation : 'h' ,
4747 bgcolor : 'rgba(255,255,255,0.7)' ,
4848 color : 'rgba(0, 31, 95, 0.3)' ,
@@ -1560,7 +1560,7 @@ describe('ModeBar', function() {
15601560 . then ( done , done . fail ) ;
15611561 } ) ;
15621562
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 ) {
15641564 function countButtons ( ) {
15651565 var modeBarEl = gd . _fullLayout . _modeBar . element ;
15661566 return d3Select ( modeBarEl ) . selectAll ( 'a.modebar-btn' ) . size ( ) ;
@@ -1571,7 +1571,7 @@ describe('ModeBar', function() {
15711571 . then ( function ( ) {
15721572 expect ( countButtons ( ) ) . toBe ( initial ) ;
15731573
1574- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1574+ return Plotly . relayout ( gd , 'modebar.add ' , [
15751575 'drawline' ,
15761576 'drawopenpath' ,
15771577 'drawclosedpath' ,
@@ -1583,12 +1583,12 @@ describe('ModeBar', function() {
15831583 . then ( function ( ) {
15841584 expect ( countButtons ( ) ) . toBe ( initial + 6 ) ;
15851585
1586- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , '' ) ;
1586+ return Plotly . relayout ( gd , 'modebar.add ' , '' ) ;
15871587 } )
15881588 . then ( function ( ) {
15891589 expect ( countButtons ( ) ) . toBe ( initial ) ;
15901590
1591- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1591+ return Plotly . relayout ( gd , 'modebar.add ' , [
15921592 'hovercompare' ,
15931593 'hoverclosest' ,
15941594 'togglespikelines'
@@ -1597,20 +1597,20 @@ describe('ModeBar', function() {
15971597 . then ( function ( ) {
15981598 expect ( countButtons ( ) ) . toBe ( initial + 3 ) ;
15991599
1600- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , '' ) ;
1600+ return Plotly . relayout ( gd , 'modebar.add ' , '' ) ;
16011601 } )
16021602 . then ( function ( ) {
16031603 expect ( countButtons ( ) ) . toBe ( initial ) ;
16041604
1605- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1605+ return Plotly . relayout ( gd , 'modebar.add ' , [
16061606 'v1hovermode' ,
16071607 'togglespikelines'
16081608 ] . join ( '+' ) ) ;
16091609 } )
16101610 . then ( function ( ) {
16111611 expect ( countButtons ( ) ) . toBe ( initial + 3 ) ;
16121612
1613- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1613+ return Plotly . relayout ( gd , 'modebar.add ' , [
16141614 'v1hovermode' ,
16151615 'togglespikelines' ,
16161616 'togglehover' ,
@@ -1624,20 +1624,20 @@ describe('ModeBar', function() {
16241624 . then ( function ( ) {
16251625 expect ( countButtons ( ) ) . toBe ( initial + 4 , 'skip duplicates' ) ;
16261626
1627- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , [
1627+ return Plotly . relayout ( gd , 'modebar.add ' , [
16281628 'drawline' ,
16291629 'invalid'
16301630 ] . join ( '+' ) ) ;
16311631 } )
16321632 . then ( function ( ) {
16331633 expect ( countButtons ( ) ) . toBe ( initial + 1 , 'skip invalid' ) ;
16341634
1635- return Plotly . relayout ( gd , 'modebar.buttonstoadd ' , '' ) ;
1635+ return Plotly . relayout ( gd , 'modebar.add ' , '' ) ;
16361636 } )
16371637 . then ( function ( ) {
16381638 expect ( countButtons ( ) ) . toBe ( initial ) ;
16391639
1640- return Plotly . relayout ( gd , 'template.layout.modebar.buttonstoadd ' , 'v1hovermode' ) ;
1640+ return Plotly . relayout ( gd , 'template.layout.modebar.add ' , 'v1hovermode' ) ;
16411641 } )
16421642 . then ( function ( ) {
16431643 expect ( countButtons ( ) ) . toBe ( initial + 2 , 'via template' ) ;
0 commit comments