(gd, title, titleHeight)
| 504 | } |
| 505 | |
| 506 | function needsMarginPush(gd, title, titleHeight) { |
| 507 | var titleY = title.y; |
| 508 | var titleYanchor = title.yanchor; |
| 509 | var position = titleY > 0.5 ? 't' : 'b'; |
| 510 | var curMargin = gd._fullLayout.margin[position]; |
| 511 | var pushMargin = 0; |
| 512 | if(title.yref === 'paper') { |
| 513 | pushMargin = ( |
| 514 | titleHeight + |
| 515 | title.pad.t + |
| 516 | title.pad.b |
| 517 | ); |
| 518 | } else if(title.yref === 'container') { |
| 519 | pushMargin = ( |
| 520 | containerPushVal(position, titleY, titleYanchor, gd._fullLayout.height, titleHeight) + |
| 521 | title.pad.t + |
| 522 | title.pad.b |
| 523 | ); |
| 524 | } |
| 525 | if(pushMargin > curMargin) { |
| 526 | return pushMargin; |
| 527 | } |
| 528 | return 0; |
| 529 | } |
| 530 | |
| 531 | function applyTitleAutoMargin(gd, y, pushMargin, titleHeight) { |
| 532 | var titleID = 'title.automargin'; |
no test coverage detected
searching dependent graphs…