(attr, val, i)
| 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) { |
no test coverage detected
searching dependent graphs…