(gd, y, pushMargin, titleHeight)
| 529 | } |
| 530 | |
| 531 | function applyTitleAutoMargin(gd, y, pushMargin, titleHeight) { |
| 532 | var titleID = 'title.automargin'; |
| 533 | var title = gd._fullLayout.title; |
| 534 | var position = title.y > 0.5 ? 't' : 'b'; |
| 535 | var push = { |
| 536 | x: title.x, |
| 537 | y: title.y, |
| 538 | t: 0, |
| 539 | b: 0 |
| 540 | }; |
| 541 | var reservedPush = {}; |
| 542 | |
| 543 | if(title.yref === 'paper' && isOutsideContainer(gd, title, position, y, titleHeight)) { |
| 544 | push[position] = pushMargin; |
| 545 | } else if(title.yref === 'container') { |
| 546 | reservedPush[position] = pushMargin; |
| 547 | gd._fullLayout._reservedMargin[titleID] = reservedPush; |
| 548 | } |
| 549 | Plots.allowAutoMargin(gd, titleID); |
| 550 | Plots.autoMargin(gd, titleID, push); |
| 551 | } |
| 552 | |
| 553 | function getMainTitleX(fullLayout, textAnchor) { |
| 554 | var title = fullLayout.title; |
no test coverage detected
searching dependent graphs…