Skip to content

Commit 47a5b82

Browse files
committed
take full title+subtitle height into account for automargin
1 parent de628de commit 47a5b82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plot_api/subroutines.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ exports.drawMainTitle = function(gd) {
421421

422422
if(title.text && title.automargin) {
423423
var titleObj = d3.selectAll('.gtitle');
424-
var titleHeight = Drawing.bBox(titleObj.node()).height;
424+
var titleHeight = Drawing.bBox(d3.selectAll('.g-gtitle').node()).height;
425425
var pushMargin = needsMarginPush(gd, title, titleHeight);
426426
if(pushMargin > 0) {
427427
applyTitleAutoMargin(gd, y, pushMargin, titleHeight);

0 commit comments

Comments
 (0)