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

Function computeLayoutBindings

src/plots/command.js:308–326  ·  view source on GitHub ↗
(gd, args)

Source from the content-addressed store, hash-verified

306}
307
308function computeLayoutBindings(gd, args) {
309 var bindings = [];
310
311 var astr = args[0];
312 var aobj = {};
313 if(typeof astr === 'string') {
314 aobj[astr] = args[1];
315 } else if(Lib.isPlainObject(astr)) {
316 aobj = astr;
317 } else {
318 return bindings;
319 }
320
321 crawl(aobj, function(path, attrName, attr) {
322 bindings.push({type: 'layout', prop: path, value: attr});
323 }, '', 0);
324
325 return bindings;
326}
327
328function computeDataBindings(gd, args) {
329 var traces, astr, val, aobj;

Callers 1

command.jsFile · 0.85

Calls 1

crawlFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…