@@ -180,8 +180,10 @@ Plotly.plot = function(gd, data, layout, config) {
180
180
function marginPushersAgain ( ) {
181
181
// in case the margins changed, draw margin pushers again
182
182
var seq = JSON . stringify ( fullLayout . _size ) === oldmargins ?
183
- [ ] : [ marginPushers , subroutines . layoutStyles ] ;
184
- return Lib . syncOrAsync ( seq . concat ( Fx . init ) , gd ) ;
183
+ [ ] :
184
+ [ marginPushers , subroutines . layoutStyles ] ;
185
+
186
+ return Lib . syncOrAsync ( seq , gd ) ;
185
187
}
186
188
187
189
function positionAndAutorange ( ) {
@@ -205,7 +207,6 @@ Plotly.plot = function(gd, data, layout, config) {
205
207
}
206
208
}
207
209
208
-
209
210
// calc and autorange for errorbars
210
211
ErrorBars . calc ( gd ) ;
211
212
@@ -219,17 +220,13 @@ Plotly.plot = function(gd, data, layout, config) {
219
220
220
221
function doAutoRange ( ) {
221
222
if ( gd . _transitioning ) return ;
223
+
222
224
var axList = Plotly . Axes . list ( gd , '' , true ) ;
223
225
for ( var i = 0 ; i < axList . length ; i ++ ) {
224
226
Plotly . Axes . doAutoRange ( axList [ i ] ) ;
225
227
}
226
228
}
227
229
228
- function drawAxes ( ) {
229
- // draw ticks, titles, and calculate axis scaling (._b, ._m)
230
- return Plotly . Axes . doTicks ( gd , 'redraw' ) ;
231
- }
232
-
233
230
// Now plot the data
234
231
function drawData ( ) {
235
232
var calcdata = gd . calcdata ,
@@ -277,6 +274,15 @@ Plotly.plot = function(gd, data, layout, config) {
277
274
return Plots . previousPromises ( gd ) ;
278
275
}
279
276
277
+ // draw ticks, titles, and calculate axis scaling (._b, ._m)
278
+ function drawAxes ( ) {
279
+ Lib . syncOrAsync ( [
280
+ subroutines . layoutStyles ,
281
+ function ( ) { return Plotly . Axes . doTicks ( gd , 'redraw' ) ; } ,
282
+ Fx . init ,
283
+ ] , gd ) ;
284
+ }
285
+
280
286
// An initial paint must be completed before these components can be
281
287
// correctly sized and the whole plot re-margined. gd._replotting must
282
288
// be set to false before these will work properly.
@@ -302,8 +308,8 @@ Plotly.plot = function(gd, data, layout, config) {
302
308
marginPushersAgain ,
303
309
positionAndAutorange ,
304
310
subroutines . layoutStyles ,
305
- drawAxes ,
306
311
drawData ,
312
+ drawAxes ,
307
313
finalDraw
308
314
] , gd , cleanUp ) ;
309
315
@@ -2736,16 +2742,5 @@ function makePlotFramework(gd) {
2736
2742
2737
2743
gd . emit ( 'plotly_framework' ) ;
2738
2744
2739
- // position and style the containers, make main title
2740
- var frameWorkDone = Lib . syncOrAsync ( [
2741
- subroutines . layoutStyles ,
2742
- function goAxes ( ) { return Plotly . Axes . doTicks ( gd , 'redraw' ) ; } ,
2743
- Fx . init
2744
- ] , gd ) ;
2745
-
2746
- if ( frameWorkDone && frameWorkDone . then ) {
2747
- gd . _promises . push ( frameWorkDone ) ;
2748
- }
2749
-
2750
- return frameWorkDone ;
2745
+ return 'FRAMEWORK' ;
2751
2746
}
0 commit comments