@@ -1793,9 +1793,6 @@ axes.drawOne = function(gd, ax, opts) {
1793
1793
} ) ;
1794
1794
}
1795
1795
1796
- if ( ! opts . skipTitle &&
1797
- ! ( ( ax . rangeslider || { } ) . visible && ax . _boundingBox && ax . side === 'bottom' )
1798
- ) {
1799
1796
// TODO update 'avoid selection' for multicategory
1800
1797
seq . push ( function ( ) {
1801
1798
return axes . drawTitle ( gd , ax ) ;
@@ -1807,7 +1804,7 @@ axes.drawOne = function(gd, ax, opts) {
1807
1804
range [ 1 ] = Math . max ( range [ 1 ] , newRange [ 1 ] ) ;
1808
1805
}
1809
1806
1810
- seq . push ( function calcBoundingBox ( ) {
1807
+ function calcBoundingBox ( ) {
1811
1808
if ( ax . showticklabels ) {
1812
1809
var gdBB = gd . getBoundingClientRect ( ) ;
1813
1810
var bBox = mainAxLayer . node ( ) . getBoundingClientRect ( ) ;
@@ -1887,9 +1884,9 @@ axes.drawOne = function(gd, ax, opts) {
1887
1884
[ ax . _boundingBox . right , ax . _boundingBox . left ] ) ;
1888
1885
}
1889
1886
}
1890
- } ) ;
1887
+ }
1891
1888
1892
- seq . push ( function doAutoMargins ( ) {
1889
+ function doAutoMargins ( ) {
1893
1890
var pushKey = ax . _name + '.automargin' ;
1894
1891
1895
1892
if ( ! ax . automargin ) {
@@ -1915,7 +1912,15 @@ axes.drawOne = function(gd, ax, opts) {
1915
1912
}
1916
1913
1917
1914
Plots . autoMargin ( gd , pushKey , push ) ;
1918
- } ) ;
1915
+ }
1916
+
1917
+ seq . push ( calcBoundingBox , doAutoMargins ) ;
1918
+
1919
+ if ( ! opts . skipTitle &&
1920
+ ! ( ( ax . rangeslider || { } ) . visible && ax . _boundingBox && ax . side === 'bottom' )
1921
+ ) {
1922
+ seq . push ( function ( ) { return drawTitle ( gd , ax ) ; } ) ;
1923
+ }
1919
1924
1920
1925
return Lib . syncOrAsync ( seq ) ;
1921
1926
} ;
0 commit comments