@@ -21,8 +21,7 @@ class EditorControls extends Component {
21
21
constructor ( props , context ) {
22
22
super ( props , context ) ;
23
23
24
- this . localize = key =>
25
- localizeString ( this . props . dictionaries || { } , this . props . locale , key ) ;
24
+ this . localize = key => localizeString ( this . props . dictionaries || { } , this . props . locale , key ) ;
26
25
27
26
// we only need to compute this once.
28
27
if ( this . props . plotly ) {
@@ -85,12 +84,7 @@ class EditorControls extends Component {
85
84
const value = payload . update [ attr ] ;
86
85
87
86
if ( splitTraceGroup ) {
88
- props = shamefullyCreateSplitStyleProps (
89
- graphDiv ,
90
- attr ,
91
- traceIndex ,
92
- splitTraceGroup
93
- ) ;
87
+ props = shamefullyCreateSplitStyleProps ( graphDiv , attr , traceIndex , splitTraceGroup ) ;
94
88
}
95
89
96
90
props . forEach ( p => {
@@ -262,17 +256,11 @@ class EditorControls extends Component {
262
256
break ;
263
257
264
258
case EDITOR_ACTIONS . DELETE_TRANSFORM :
265
- if (
266
- isNumeric ( payload . transformIndex ) &&
267
- payload . traceIndex < graphDiv . data . length
268
- ) {
259
+ if ( isNumeric ( payload . transformIndex ) && payload . traceIndex < graphDiv . data . length ) {
269
260
if ( graphDiv . data [ payload . traceIndex ] . transforms . length === 1 ) {
270
261
delete graphDiv . data [ payload . traceIndex ] . transforms ;
271
262
} else {
272
- graphDiv . data [ payload . traceIndex ] . transforms . splice (
273
- payload . transformIndex ,
274
- 1
275
- ) ;
263
+ graphDiv . data [ payload . traceIndex ] . transforms . splice ( payload . transformIndex , 1 ) ;
276
264
}
277
265
if ( this . props . onUpdate ) {
278
266
this . props . onUpdate (
@@ -285,9 +273,7 @@ class EditorControls extends Component {
285
273
break ;
286
274
287
275
default :
288
- throw new Error (
289
- this . localize ( 'must specify an action type to handleEditorUpdate' )
290
- ) ;
276
+ throw new Error ( this . localize ( 'must specify an action type to handleEditorUpdate' ) ) ;
291
277
}
292
278
}
293
279
0 commit comments