@@ -2429,7 +2429,6 @@ axes.drawLabels = function(gd, ax, opts) {
2429
2429
} ;
2430
2430
2431
2431
function drawTitle ( gd , ax ) {
2432
- axes . drawTitle = function ( gd , ax ) {
2433
2432
var fullLayout = gd . _fullLayout ;
2434
2433
var axId = ax . _id ;
2435
2434
var axLetter = axId . charAt ( 0 ) ;
@@ -2457,13 +2456,13 @@ axes.drawTitle = function(gd, ax) {
2457
2456
fontSize * ( ax . showticklabels ? 1.5 : 0.5 ) ;
2458
2457
}
2459
2458
y += counterAxis . _offset ;
2460
- }
2461
- else {
2459
+ } else {
2462
2460
counterAxis = ( ax . anchor === 'free' ) ?
2463
2461
{ _offset : gs . l + ( ax . position || 0 ) * gs . w , _length : 0 } :
2464
2462
axisIds . getFromId ( gd , ax . anchor ) ;
2465
2463
2466
2464
y = ax . _offset + ax . _length / 2 ;
2465
+
2467
2466
if ( ax . side === 'right' ) {
2468
2467
x = counterAxis . _length + titleStandoff +
2469
2468
fontSize * ( ax . showticklabels ? 1 : 0.5 ) ;
@@ -2492,15 +2491,15 @@ axes.drawTitle = function(gd, ax) {
2492
2491
}
2493
2492
}
2494
2493
2495
- Titles . draw ( gd , axId + 'title' , {
2494
+ return Titles . draw ( gd , axId + 'title' , {
2496
2495
propContainer : ax ,
2497
2496
propName : ax . _name + '.title.text' ,
2498
2497
placeholder : fullLayout . _dfltTitle [ axLetter ] ,
2499
2498
avoid : avoid ,
2500
2499
transform : transform ,
2501
2500
attributes : { x : x , y : y , 'text-anchor' : 'middle' }
2502
2501
} ) ;
2503
- } ;
2502
+ }
2504
2503
2505
2504
axes . shouldShowZeroLine = function ( gd , ax , counterAxis ) {
2506
2505
var rng = Lib . simpleMap ( ax . range , ax . r2l ) ;
0 commit comments