@@ -178,7 +178,7 @@ Plotly.plot = function(gd, data, layout, config) {
178178 return plots . previousPromises ( gd ) ;
179179 }
180180
181- function marginPushersAgain ( ) {
181+ function marginPushersAgain ( ) {
182182 // in case the margins changed, draw margin pushers again
183183 var seq = JSON . stringify ( fullLayout . _size ) === oldmargins ?
184184 [ ] : [ marginPushers , layoutStyles ] ;
@@ -335,7 +335,7 @@ Plotly.plot = function(gd, data, layout, config) {
335335 return plots . previousPromises ( gd ) ;
336336 }
337337
338- function cleanUp ( ) {
338+ function cleanUp ( ) {
339339 // now we're REALLY TRULY done plotting...
340340 // so mark it as done and let other procedures call a replot
341341 gd . _replotting = false ;
@@ -484,7 +484,7 @@ function plotGeo(gd) {
484484 fullLayout [ geoId ] . _geo = geo ;
485485 }
486486
487- geo . plot ( fullGeoData , fullLayout ) ;
487+ geo . plot ( fullGeoData , fullLayout , gd . _promises ) ;
488488 }
489489}
490490
@@ -570,7 +570,7 @@ function plotPolar(gd, data, layout) {
570570 if ( txt === '' || ! txt ) opacity = 0 ;
571571 var placeholderText = 'Click to enter title' ;
572572
573- var titleLayout = function ( ) {
573+ var titleLayout = function ( ) {
574574 this . call ( Plotly . util . convertToTspans ) ;
575575 //TODO: html/mathjax
576576 //TODO: center title
@@ -586,17 +586,17 @@ function plotPolar(gd, data, layout) {
586586 title . attr ( { 'data-unformatted' : placeholderText } )
587587 . text ( placeholderText )
588588 . style ( { opacity : opacity } )
589- . on ( 'mouseover.opacity' , function ( ) {
589+ . on ( 'mouseover.opacity' , function ( ) {
590590 d3 . select ( this ) . transition ( ) . duration ( 100 )
591591 . style ( 'opacity' , 1 ) ;
592592 } )
593- . on ( 'mouseout.opacity' , function ( ) {
593+ . on ( 'mouseout.opacity' , function ( ) {
594594 d3 . select ( this ) . transition ( ) . duration ( 1000 )
595595 . style ( 'opacity' , 0 ) ;
596596 } ) ;
597597 }
598598
599- var setContenteditable = function ( ) {
599+ var setContenteditable = function ( ) {
600600 this . call ( Plotly . util . makeEditable )
601601 . on ( 'edit' , function ( text ) {
602602 gd . framework ( { layout : { title : text } } ) ;
@@ -605,7 +605,7 @@ function plotPolar(gd, data, layout) {
605605 . call ( titleLayout ) ;
606606 this . call ( setContenteditable ) ;
607607 } )
608- . on ( 'cancel' , function ( ) {
608+ . on ( 'cancel' , function ( ) {
609609 var txt = this . attr ( 'data-unformatted' ) ;
610610 this . text ( txt ) . call ( titleLayout ) ;
611611 } ) ;
@@ -940,7 +940,7 @@ Plotly.redraw = function(gd) {
940940Plotly . newPlot = function ( gd , data , layout , config ) {
941941 gd = getGraphDiv ( gd ) ;
942942 plots . purge ( gd ) ;
943- Plotly . plot ( gd , data , layout , config ) ;
943+ return Plotly . plot ( gd , data , layout , config ) ;
944944} ;
945945
946946function doCalcdata ( gd ) {
@@ -1747,7 +1747,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
17471747 }
17481748
17491749 // make a new empty vals array for undoit
1750- function a0 ( ) { return traces . map ( function ( ) { return undefined ; } ) ; }
1750+ function a0 ( ) { return traces . map ( function ( ) { return undefined ; } ) ; }
17511751
17521752 // for autoranging multiple axes
17531753 function addToAxlist ( axid ) {
@@ -1764,11 +1764,11 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
17641764 // attr can be an array to set several at once (all to the same val)
17651765 function doextra ( attr , val , i ) {
17661766 if ( Array . isArray ( attr ) ) {
1767- attr . forEach ( function ( a ) { doextra ( a , val , i ) ; } ) ;
1767+ attr . forEach ( function ( a ) { doextra ( a , val , i ) ; } ) ;
17681768 return ;
17691769 }
17701770 // quit if explicitly setting this elsewhere
1771- if ( attr in aobj ) { return ; }
1771+ if ( attr in aobj ) return ;
17721772
17731773 var extraparam ;
17741774 if ( attr . substr ( 0 , 6 ) === 'LAYOUT' ) {
@@ -2055,7 +2055,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
20552055 // a complete layout redraw takes care of plot and
20562056 var seq ;
20572057 if ( dolayout ) {
2058- seq = [ function changeLayout ( ) {
2058+ seq = [ function changeLayout ( ) {
20592059 var copyLayout = gd . layout ;
20602060 gd . layout = undefined ;
20612061 return Plotly . plot ( gd , '' , copyLayout ) ;
@@ -2068,7 +2068,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
20682068 plots . supplyDefaults ( gd ) ;
20692069 seq = [ plots . previousPromises ] ;
20702070 if ( dostyle ) {
2071- seq . push ( function doStyle ( ) {
2071+ seq . push ( function doStyle ( ) {
20722072 // first see if we need to do arraysToCalcdata
20732073 // call it regardless of what change we made, in case
20742074 // supplyDefaults brought in an array that was already
@@ -2085,7 +2085,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
20852085 } ) ;
20862086 }
20872087 if ( docolorbars ) {
2088- seq . push ( function doColorBars ( ) {
2088+ seq . push ( function doColorBars ( ) {
20892089 gd . calcdata . forEach ( function ( cd ) {
20902090 if ( ( cd [ 0 ] . t || { } ) . cb ) {
20912091 var trace = cd [ 0 ] . trace ,
@@ -2114,7 +2114,7 @@ Plotly.restyle = function restyle(gd, astr, val, traces) {
21142114
21152115 if ( ! plotDone || ! plotDone . then ) plotDone = Promise . resolve ( ) ;
21162116
2117- return plotDone . then ( function ( ) {
2117+ return plotDone . then ( function ( ) {
21182118 gd . emit ( 'plotly_restyle' ,
21192119 Plotly . Lib . extendDeep ( [ ] , [ redoit , traces ] ) ) ;
21202120 } ) ;
@@ -2432,7 +2432,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
24322432 seq = [ plots . previousPromises ] ;
24332433
24342434 if ( doplot || docalc ) {
2435- seq . push ( function layoutReplot ( ) {
2435+ seq . push ( function layoutReplot ( ) {
24362436 // force plot() to redo the layout
24372437 gd . layout = undefined ;
24382438 // force it to redo calcdata?
@@ -2447,7 +2447,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
24472447 fullLayout = gd . _fullLayout ;
24482448
24492449 if ( dolegend ) {
2450- seq . push ( function doLegend ( ) {
2450+ seq . push ( function doLegend ( ) {
24512451 Plotly . Legend . draw ( gd ) ;
24522452 return plots . previousPromises ( gd ) ;
24532453 } ) ;
@@ -2456,7 +2456,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
24562456 if ( dolayoutstyle ) seq . push ( layoutStyles ) ;
24572457
24582458 if ( doticks ) {
2459- seq . push ( function ( ) {
2459+ seq . push ( function ( ) {
24602460 Plotly . Axes . doTicks ( gd , 'redraw' ) ;
24612461 Plotly . Titles . draw ( gd , 'gtitle' ) ;
24622462 return plots . previousPromises ( gd ) ;
@@ -2486,7 +2486,7 @@ Plotly.relayout = function relayout(gd, astr, val) {
24862486
24872487 if ( ! plotDone || ! plotDone . then ) plotDone = Promise . resolve ( ) ;
24882488
2489- return plotDone . then ( function ( ) {
2489+ return plotDone . then ( function ( ) {
24902490 gd . emit ( 'plotly_relayout' ,
24912491 Plotly . Lib . extendDeep ( { } , redoit ) ) ;
24922492 } ) ;
@@ -2671,7 +2671,7 @@ function makePlotFramework(gd) {
26712671 // position and style the containers, make main title
26722672 var frameWorkDone = Plotly . Lib . syncOrAsync ( [
26732673 layoutStyles ,
2674- function goAxes ( ) { return Plotly . Axes . doTicks ( gd , 'redraw' ) ; } ,
2674+ function goAxes ( ) { return Plotly . Axes . doTicks ( gd , 'redraw' ) ; } ,
26752675 Plotly . Fx . init
26762676 ] , gd ) ;
26772677
0 commit comments