MCPcopy Index your code
hub / github.com/plotly/plotly.js / containerPushVal

Function containerPushVal

src/plot_api/subroutines.js:487–504  ·  view source on GitHub ↗
(position, titleY, titleYanchor, height, titleDepth)

Source from the content-addressed store, hash-verified

485}
486
487function containerPushVal(position, titleY, titleYanchor, height, titleDepth) {
488 var push = 0;
489 if(titleYanchor === 'middle') {
490 push += titleDepth / 2;
491 }
492 if(position === 't') {
493 if(titleYanchor === 'top') {
494 push += titleDepth;
495 }
496 push += (height - titleY * height);
497 } else {
498 if(titleYanchor === 'bottom') {
499 push += titleDepth;
500 }
501 push += titleY * height;
502 }
503 return push;
504}
505
506function needsMarginPush(gd, title, titleHeight) {
507 var titleY = title.y;

Callers 1

needsMarginPushFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…