@@ -21,8 +21,7 @@ class EditorControls extends Component {
2121 constructor ( props , context ) {
2222 super ( props , context ) ;
2323
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 ) ;
2625
2726 // we only need to compute this once.
2827 if ( this . props . plotly ) {
@@ -85,12 +84,7 @@ class EditorControls extends Component {
8584 const value = payload . update [ attr ] ;
8685
8786 if ( splitTraceGroup ) {
88- props = shamefullyCreateSplitStyleProps (
89- graphDiv ,
90- attr ,
91- traceIndex ,
92- splitTraceGroup
93- ) ;
87+ props = shamefullyCreateSplitStyleProps ( graphDiv , attr , traceIndex , splitTraceGroup ) ;
9488 }
9589
9690 props . forEach ( p => {
@@ -262,17 +256,11 @@ class EditorControls extends Component {
262256 break ;
263257
264258 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 ) {
269260 if ( graphDiv . data [ payload . traceIndex ] . transforms . length === 1 ) {
270261 delete graphDiv . data [ payload . traceIndex ] . transforms ;
271262 } else {
272- graphDiv . data [ payload . traceIndex ] . transforms . splice (
273- payload . transformIndex ,
274- 1
275- ) ;
263+ graphDiv . data [ payload . traceIndex ] . transforms . splice ( payload . transformIndex , 1 ) ;
276264 }
277265 if ( this . props . onUpdate ) {
278266 this . props . onUpdate (
@@ -285,9 +273,7 @@ class EditorControls extends Component {
285273 break ;
286274
287275 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' ) ) ;
291277 }
292278 }
293279
0 commit comments