@@ -2,6 +2,7 @@ var Plotly = require('@lib/index');
2
2
var Lib = require ( '@src/lib' ) ;
3
3
var Plots = Plotly . Plots ;
4
4
var plotApiHelpers = require ( '@src/plot_api/helpers' ) ;
5
+ var Axes = require ( '@src/plots/cartesian/axes' ) ;
5
6
var Registry = require ( '@src/registry' ) ;
6
7
var Drawing = require ( '@src/components/drawing' ) ;
7
8
@@ -650,6 +651,7 @@ describe('Plotly.react transitions:', function() {
650
651
. then ( function ( ) {
651
652
methods . push ( [ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' ] ) ;
652
653
methods . push ( [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' ] ) ;
654
+ methods . push ( [ Axes , 'drawOne' ] ) ;
653
655
addSpies ( ) ;
654
656
} )
655
657
. then ( function ( ) {
@@ -660,7 +662,8 @@ describe('Plotly.react transitions:', function() {
660
662
assertSpies ( 'just trace transition' , [
661
663
[ Plots , 'transitionFromReact' , 1 ] ,
662
664
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , 1 ] ,
663
- [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 0 ]
665
+ [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 0 ] ,
666
+ [ Axes , 'drawOne' , 0 ]
664
667
] ) ;
665
668
} )
666
669
. then ( function ( ) {
@@ -671,8 +674,13 @@ describe('Plotly.react transitions:', function() {
671
674
assertSpies ( 'just layout transition' , [
672
675
[ Plots , 'transitionFromReact' , 1 ] ,
673
676
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 1 ] ,
677
+ [ Axes , 'drawOne' , 1 ] ,
678
+ [ Axes , 'drawOne' , 1 ] ,
679
+ [ Axes , 'drawOne' , 1 ] ,
680
+ [ Axes , 'drawOne' , 1 ] ,
674
681
// one _module.plot call from the relayout at end of axis transition
675
682
[ Registry , 'call' , [ 'relayout' , gd , { 'xaxis.range' : [ - 2 , 2 ] } ] ] ,
683
+ [ Axes , 'drawOne' , 1 ] ,
676
684
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , 1 ] ,
677
685
] ) ;
678
686
} )
@@ -688,8 +696,13 @@ describe('Plotly.react transitions:', function() {
688
696
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 1 ] ,
689
697
// one instantaneous transition options to halt other trace transitions (if any)
690
698
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , [ gd , null , { duration : 0 , easing : 'cubic-in-out' , ordering : 'layout first' } , 'function' ] ] ,
699
+ [ Axes , 'drawOne' , 1 ] ,
700
+ [ Axes , 'drawOne' , 1 ] ,
701
+ [ Axes , 'drawOne' , 1 ] ,
702
+ [ Axes , 'drawOne' , 1 ] ,
691
703
// one _module.plot call from the relayout at end of axis transition
692
704
[ Registry , 'call' , [ 'relayout' , gd , { 'xaxis.range' : [ - 1 , 1 ] } ] ] ,
705
+ [ Axes , 'drawOne' , 1 ] ,
693
706
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , [ gd ] ]
694
707
] ) ;
695
708
} )
@@ -707,7 +720,10 @@ describe('Plotly.react transitions:', function() {
707
720
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , [ gd , [ 0 ] , { duration : 10 , easing : 'cubic-in-out' , ordering : 'traces first' } , 'function' ] ] ,
708
721
// one by relayout call at the end of instantaneous axis transition
709
722
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 1 ] ,
723
+ [ Axes , 'drawOne' , 1 ] ,
724
+ [ Axes , 'drawOne' , 1 ] ,
710
725
[ Registry , 'call' , [ 'relayout' , gd , { 'xaxis.range' : [ - 2 , 2 ] } ] ] ,
726
+ [ Axes , 'drawOne' , 1 ] ,
711
727
[ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , [ gd ] ]
712
728
] ) ;
713
729
} )
0 commit comments