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

Function getOrigin

src/traces/treemap/plot_one.js:104–115  ·  view source on GitHub ↗
(pt, onPathbar, refRect, size)

Source from the content-addressed store, hash-verified

102 };
103
104 var getOrigin = function(pt, onPathbar, refRect, size) {
105 if(onPathbar) {
106 return prevLookupPathbar[getKey(hierarchy)] || pathbarOrigin;
107 } else {
108 var ref = prevLookupSlices[trace.level] || refRect;
109
110 if(hasVisibleDepth(pt)) { // case of an empty object - happens when maxdepth is set
111 return findClosestEdge(pt, ref, size);
112 }
113 }
114 return {};
115 };
116
117 // N.B. handle multiple-root special case
118 if(cd0.hasMultipleRoots && isRoot) {

Callers 1

Calls 3

getKeyFunction · 0.85
hasVisibleDepthFunction · 0.85
findClosestEdgeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…