diff --git a/src/plots/plots.js b/src/plots/plots.js index fa25a4fe14b..cb11473468b 100644 --- a/src/plots/plots.js +++ b/src/plots/plots.js @@ -2611,14 +2611,14 @@ plots.transitionFromReact = function(gd, restyleFlags, relayoutFlags, oldFullLay axisTransitionOpts = Lib.extendFlat({}, transitionOpts, {duration: 0}); transitionedTraces = allTraceIndices; traceTransitionOpts = transitionOpts; - transitionTraces(); setTimeout(transitionAxes, transitionOpts.duration); + transitionTraces(); } else { axisTransitionOpts = transitionOpts; transitionedTraces = null; traceTransitionOpts = Lib.extendFlat({}, transitionOpts, {duration: 0}); + setTimeout(transitionTraces, axisTransitionOpts.duration); transitionAxes(); - transitionTraces(); } } else if(axEdits.length) { axisTransitionOpts = transitionOpts; diff --git a/test/jasmine/tests/transition_test.js b/test/jasmine/tests/transition_test.js index 34e76f5dacd..aefa4611b0c 100644 --- a/test/jasmine/tests/transition_test.js +++ b/test/jasmine/tests/transition_test.js @@ -694,10 +694,10 @@ describe('Plotly.react transitions:', function() { assertSpies('both trace and layout transitions', [ [Plots, 'transitionFromReact', 1], [gd._fullLayout._basePlotModules[0], 'transitionAxes', 1], - // one instantaneous transition options to halt other trace transitions (if any) - [gd._fullLayout._basePlotModules[0], 'plot', [gd, null, {duration: 0, easing: 'cubic-in-out', ordering: 'layout first'}, 'function']], [Axes, 'drawOne', 1], [Axes, 'drawOne', 1], + // one instantaneous transition options to halt other trace transitions (if any) + [gd._fullLayout._basePlotModules[0], 'plot', [gd, null, {duration: 0, easing: 'cubic-in-out', ordering: 'layout first'}, 'function']], [Axes, 'drawOne', 1], [Axes, 'drawOne', 1], // one _module.plot call from the relayout at end of axis transition