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) {
45
45
] . join ( ' ' ) ) ;
46
46
}
47
47
48
- var customButtons = extendDeep ( [ ] , context . modeBarButtons ) ;
48
+ var customButtons = context . modeBarButtons ;
49
49
var buttonGroups ;
50
50
51
51
if ( Array . isArray ( customButtons ) && customButtons . length ) {
@@ -331,7 +331,9 @@ function appendButtonsToGroups(groups, buttons) {
331
331
}
332
332
333
333
// fill in custom buttons referring to default mode bar buttons
334
- function fillCustomButton ( customButtons ) {
334
+ function fillCustomButton ( originalModeBarButtons ) {
335
+ var customButtons = extendDeep ( [ ] , originalModeBarButtons ) ;
336
+
335
337
for ( var i = 0 ; i < customButtons . length ; i ++ ) {
336
338
var buttonGroup = customButtons [ i ] ;
337
339
You can’t perform that action at this time.
0 commit comments