@@ -2,6 +2,7 @@ var Plotly = require('@lib/index');
22var Lib = require ( '@src/lib' ) ;
33var Plots = Plotly . Plots ;
44var plotApiHelpers = require ( '@src/plot_api/helpers' ) ;
5+ var Axes = require ( '@src/plots/cartesian/axes' ) ;
56var Registry = require ( '@src/registry' ) ;
67var Drawing = require ( '@src/components/drawing' ) ;
78
@@ -650,6 +651,7 @@ describe('Plotly.react transitions:', function() {
650651 . then ( function ( ) {
651652 methods . push ( [ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' ] ) ;
652653 methods . push ( [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' ] ) ;
654+ methods . push ( [ Axes , 'drawOne' ] ) ;
653655 addSpies ( ) ;
654656 } )
655657 . then ( function ( ) {
@@ -660,7 +662,8 @@ describe('Plotly.react transitions:', function() {
660662 assertSpies ( 'just trace transition' , [
661663 [ Plots , 'transitionFromReact' , 1 ] ,
662664 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , 1 ] ,
663- [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 0 ]
665+ [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 0 ] ,
666+ [ Axes , 'drawOne' , 0 ]
664667 ] ) ;
665668 } )
666669 . then ( function ( ) {
@@ -671,8 +674,13 @@ describe('Plotly.react transitions:', function() {
671674 assertSpies ( 'just layout transition' , [
672675 [ Plots , 'transitionFromReact' , 1 ] ,
673676 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 1 ] ,
677+ [ Axes , 'drawOne' , 1 ] ,
678+ [ Axes , 'drawOne' , 1 ] ,
679+ [ Axes , 'drawOne' , 1 ] ,
680+ [ Axes , 'drawOne' , 1 ] ,
674681 // one _module.plot call from the relayout at end of axis transition
675682 [ Registry , 'call' , [ 'relayout' , gd , { 'xaxis.range' : [ - 2 , 2 ] } ] ] ,
683+ [ Axes , 'drawOne' , 1 ] ,
676684 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , 1 ] ,
677685 ] ) ;
678686 } )
@@ -688,8 +696,13 @@ describe('Plotly.react transitions:', function() {
688696 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 1 ] ,
689697 // one instantaneous transition options to halt other trace transitions (if any)
690698 [ 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 ] ,
691703 // one _module.plot call from the relayout at end of axis transition
692704 [ Registry , 'call' , [ 'relayout' , gd , { 'xaxis.range' : [ - 1 , 1 ] } ] ] ,
705+ [ Axes , 'drawOne' , 1 ] ,
693706 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , [ gd ] ]
694707 ] ) ;
695708 } )
@@ -707,7 +720,10 @@ describe('Plotly.react transitions:', function() {
707720 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , [ gd , [ 0 ] , { duration : 10 , easing : 'cubic-in-out' , ordering : 'traces first' } , 'function' ] ] ,
708721 // one by relayout call at the end of instantaneous axis transition
709722 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'transitionAxes' , 1 ] ,
723+ [ Axes , 'drawOne' , 1 ] ,
724+ [ Axes , 'drawOne' , 1 ] ,
710725 [ Registry , 'call' , [ 'relayout' , gd , { 'xaxis.range' : [ - 2 , 2 ] } ] ] ,
726+ [ Axes , 'drawOne' , 1 ] ,
711727 [ gd . _fullLayout . _basePlotModules [ 0 ] , 'plot' , [ gd ] ]
712728 ] ) ;
713729 } )
0 commit comments