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

Function isOutsideContainer

src/plot_api/subroutines.js:476–485  ·  view source on GitHub ↗
(gd, title, position, y, titleHeight)

Source from the content-addressed store, hash-verified

474
475
476function isOutsideContainer(gd, title, position, y, titleHeight) {
477 var plotHeight = title.yref === 'paper' ? gd._fullLayout._size.h : gd._fullLayout.height;
478 var yPosTop = Lib.isTopAnchor(title) ? y : y - titleHeight; // Standardize to the top of the title
479 var yPosRel = position === 'b' ? plotHeight - yPosTop : yPosTop; // Position relative to the top or bottom of plot
480 if((Lib.isTopAnchor(title) && position === 't') || Lib.isBottomAnchor(title) && position === 'b') {
481 return false;
482 } else {
483 return yPosRel < titleHeight;
484 }
485}
486
487function containerPushVal(position, titleY, titleYanchor, height, titleDepth) {
488 var push = 0;

Callers 1

applyTitleAutoMarginFunction · 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…