File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1- - Fix modeBarButtons mutate the input, issue [[ #1157 ] ( https://github.com/plotly/dash/issues/1157 )]
1+ - Fix custom modebar buttons mutate the input [[ #6177 ] ( https://github.com/plotly/plotly.js/pull/6177 )]
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ module.exports = function manageModeBar(gd) {
4545 ] . join ( ' ' ) ) ;
4646 }
4747
48- var customButtons = extendDeep ( [ ] , context . modeBarButtons ) ;
48+ var customButtons = context . modeBarButtons ;
4949 var buttonGroups ;
5050
5151 if ( Array . isArray ( customButtons ) && customButtons . length ) {
@@ -331,7 +331,9 @@ function appendButtonsToGroups(groups, buttons) {
331331}
332332
333333// fill in custom buttons referring to default mode bar buttons
334- function fillCustomButton ( customButtons ) {
334+ function fillCustomButton ( originalModeBarButtons ) {
335+ var customButtons = extendDeep ( [ ] , originalModeBarButtons ) ;
336+
335337 for ( var i = 0 ; i < customButtons . length ; i ++ ) {
336338 var buttonGroup = customButtons [ i ] ;
337339
You can’t perform that action at this time.
0 commit comments