Skip to content

Commit

Permalink
take full title+subtitle height into account for automargin
Browse files Browse the repository at this point in the history
  • Loading branch information
emilykl committed Jul 17, 2024
1 parent de628de commit 47a5b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/plot_api/subroutines.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ exports.drawMainTitle = function(gd) {

if(title.text && title.automargin) {
var titleObj = d3.selectAll('.gtitle');
var titleHeight = Drawing.bBox(titleObj.node()).height;
var titleHeight = Drawing.bBox(d3.selectAll('.g-gtitle').node()).height;
var pushMargin = needsMarginPush(gd, title, titleHeight);
if(pushMargin > 0) {
applyTitleAutoMargin(gd, y, pushMargin, titleHeight);
Expand Down

0 comments on commit 47a5b82

Please sign in to comment.