File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -428,8 +428,8 @@ exports.drawMainTitle = function(gd) {
428
428
} ) ;
429
429
430
430
if ( title . text && title . automargin ) {
431
- var titleObj = d3 . selectAll ( '.gtitle' ) ;
432
- var titleHeight = Drawing . bBox ( d3 . selectAll ( '.g-gtitle' ) . node ( ) ) . height ;
431
+ var titleObj = d3 . select ( gd ) . selectAll ( '.gtitle' ) ;
432
+ var titleHeight = Drawing . bBox ( d3 . select ( gd ) . selectAll ( '.g-gtitle' ) . node ( ) ) . height ;
433
433
var pushMargin = needsMarginPush ( gd , title , titleHeight ) ;
434
434
if ( pushMargin > 0 ) {
435
435
applyTitleAutoMargin ( gd , y , pushMargin , titleHeight ) ;
@@ -455,7 +455,7 @@ exports.drawMainTitle = function(gd) {
455
455
}
456
456
457
457
// If there is a subtitle
458
- var subtitleObj = d3 . selectAll ( '.gtitle-subtitle' ) ;
458
+ var subtitleObj = d3 . select ( gd ) . selectAll ( '.gtitle-subtitle' ) ;
459
459
if ( subtitleObj . node ( ) ) {
460
460
// Get bottom edge of title bounding box
461
461
var titleBB = titleObj . node ( ) . getBBox ( ) ;
You can’t perform that action at this time.
0 commit comments