MCPcopy Create free account
hub / github.com/plotly/plotly.js / crawlIntoTrace

Function crawlIntoTrace

src/plot_api/plot_schema.js:183–203  ·  view source on GitHub ↗
(container, i, astrPartial)

Source from the content-addressed store, hash-verified

181 }
182
183 function crawlIntoTrace(container, i, astrPartial) {
184 var item = container[stack[i]];
185 var newAstrPartial = astrPartial + stack[i];
186 if(i === stack.length - 1) {
187 if(isArrayOrTypedArray(item)) {
188 arrayAttributes.push(baseAttrName + newAstrPartial);
189 }
190 } else {
191 if(isArrayStack[i]) {
192 if(Array.isArray(item)) {
193 for(var j = 0; j < item.length; j++) {
194 if(isPlainObject(item[j])) {
195 crawlIntoTrace(item[j], i + 1, newAstrPartial + '[' + j + '].');
196 }
197 }
198 }
199 } else if(isPlainObject(item)) {
200 crawlIntoTrace(item, i + 1, newAstrPartial + '.');
201 }
202 }
203 }
204
205 baseContainer = trace;
206 baseAttrName = '';

Callers 1

callbackFunction · 0.85

Calls 1

isArrayOrTypedArrayFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…