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

Function fillCustomButton

src/components/modebar/manage.js:340–363  ·  view source on GitHub ↗
(originalModeBarButtons)

Source from the content-addressed store, hash-verified

338
339// fill in custom buttons referring to default mode bar buttons
340function fillCustomButton(originalModeBarButtons) {
341 var customButtons = extendDeep([], originalModeBarButtons);
342
343 for(var i = 0; i < customButtons.length; i++) {
344 var buttonGroup = customButtons[i];
345
346 for(var j = 0; j < buttonGroup.length; j++) {
347 var button = buttonGroup[j];
348
349 if(typeof button === 'string') {
350 if(modeBarButtons[button] !== undefined) {
351 customButtons[i][j] = modeBarButtons[button];
352 } else {
353 throw new Error([
354 '*modeBarButtons* configuration options',
355 'invalid button name'
356 ].join(' '));
357 }
358 }
359 }
360 }
361
362 return customButtons;
363}

Callers 1

manage.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…