(originalModeBarButtons)
| 338 | |
| 339 | // fill in custom buttons referring to default mode bar buttons |
| 340 | function 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 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…