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

Function doextra

src/plot_api/plot_api.js:1428–1456  ·  view source on GitHub ↗
(attr, val, i)

Source from the content-addressed store, hash-verified

1426 // val=null will delete the attribute
1427 // attr can be an array to set several at once (all to the same val)
1428 function doextra(attr, val, i) {
1429 if (Array.isArray(attr)) {
1430 attr.forEach(function (a) {
1431 doextra(a, val, i);
1432 });
1433 return;
1434 }
1435 // quit if explicitly setting this elsewhere
1436 if (attr in aobj || helpers.hasParent(aobj, attr)) return;
1437
1438 var extraparam;
1439 if (attr.slice(0, 6) === 'LAYOUT') {
1440 extraparam = layoutNP(gd.layout, attr.replace('LAYOUT', ''));
1441 } else {
1442 var tracei = traces[i];
1443 var preGUI = fullLayout._tracePreGUI[getFullTrace(tracei)._fullInput.uid];
1444 extraparam = makeNP(preGUI, guiEditFlag)(data[tracei], attr);
1445 }
1446
1447 if (!(attr in undoit)) {
1448 undoit[attr] = a0();
1449 }
1450 if (undoit[attr][i] === undefined) {
1451 undoit[attr][i] = undefinedToNull(extraparam.get());
1452 }
1453 if (val !== undefined) {
1454 extraparam.set(val);
1455 }
1456 }
1457
1458 function allBins(binAttr) {
1459 return function (j) {

Callers 2

_restyleFunction · 0.85
_relayoutFunction · 0.85

Calls 4

getFullTraceFunction · 0.85
makeNPFunction · 0.85
a0Function · 0.85
undefinedToNullFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…