@@ -191,8 +191,7 @@ class SketchFieldDemo extends React.Component {
191191 < IconButton onTouchTap = { ( c ) => this . _removeMe ( index ) } >
192192 < ClearIcon color = "white" />
193193 </ IconButton >
194- }
195- >
194+ } >
196195 < img src = { drawing } />
197196 </ GridListTile >
198197 ) ;
@@ -323,25 +322,19 @@ class SketchFieldDemo extends React.Component {
323322 < div className = "col-xs-12 col-sm-12 col-md-12 col-lg-12" >
324323 < AppBar title = "Sketch Tool" position = "static" style = { styles . appBar } >
325324 < Toolbar >
326- < Typography
327- variant = "h6"
328- color = "inherit"
329- style = { { flexGrow : 1 } }
330- >
325+ < Typography variant = "h6" color = "inherit" style = { { flexGrow : 1 } } >
331326 Sketch Tool
332327 </ Typography >
333328 < IconButton
334329 color = "primary"
335330 disabled = { ! this . state . canUndo }
336- onClick = { this . _undo }
337- >
331+ onClick = { this . _undo } >
338332 < UndoIcon />
339333 </ IconButton >
340334 < IconButton
341335 color = "primary"
342336 disabled = { ! this . state . canRedo }
343- onClick = { this . _redo }
344- >
337+ onClick = { this . _redo } >
345338 < RedoIcon />
346339 </ IconButton >
347340 < IconButton color = "primary" onClick = { this . _save } >
@@ -374,9 +367,7 @@ class SketchFieldDemo extends React.Component {
374367 : "transparent"
375368 }
376369 width = { this . state . controlledSize ? this . state . sketchWidth : null }
377- height = {
378- this . state . controlledSize ? this . state . sketchHeight : null
379- }
370+ height = { this . state . controlledSize ? this . state . sketchHeight : null }
380371 defaultValue = { dataJson }
381372 value = { controlledValue }
382373 forceValue
@@ -393,8 +384,7 @@ class SketchFieldDemo extends React.Component {
393384 < IconButton
394385 onClick = { ( e ) =>
395386 this . setState ( { expandTools : ! this . state . expandTools } )
396- }
397- >
387+ } >
398388 < ExpandMore />
399389 </ IconButton >
400390 }
@@ -408,8 +398,7 @@ class SketchFieldDemo extends React.Component {
408398 label = "Canvas Tool"
409399 value = { this . state . tool }
410400 onChange = { this . _selectTool }
411- helperText = "Please select Canvas Tool"
412- >
401+ helperText = "Please select Canvas Tool" >
413402 < MenuItem value = { Tools . Select } key = "Select" >
414403 Select
415404 </ MenuItem >
@@ -466,9 +455,7 @@ class SketchFieldDemo extends React.Component {
466455 < TextField
467456 label = "Text"
468457 helperText = "Add text to Sketch"
469- onChange = { ( e ) =>
470- this . setState ( { text : e . target . value } )
471- }
458+ onChange = { ( e ) => this . setState ( { text : e . target . value } ) }
472459 value = { this . state . text }
473460 />
474461 </ div >
@@ -491,8 +478,7 @@ class SketchFieldDemo extends React.Component {
491478 this . setState ( {
492479 expandControls : ! this . state . expandControls ,
493480 } )
494- }
495- >
481+ } >
496482 < ExpandMore />
497483 </ IconButton >
498484 }
@@ -546,17 +532,15 @@ class SketchFieldDemo extends React.Component {
546532 onClick = { ( e ) => {
547533 this . _sketch . copy ( ) ;
548534 this . _sketch . paste ( ) ;
549- } }
550- >
535+ } } >
551536 < CopyIcon />
552537 </ IconButton >
553538 </ div >
554539 < div className = "col" >
555540 < IconButton
556541 color = "primary"
557542 disabled = { ! this . state . enableRemoveSelected }
558- onClick = { this . _removeSelected }
559- >
543+ onClick = { this . _removeSelected } >
560544 < RemoveIcon />
561545 </ IconButton >
562546 </ div >
@@ -572,8 +556,7 @@ class SketchFieldDemo extends React.Component {
572556 < IconButton
573557 onClick = { ( e ) =>
574558 this . setState ( { expandColors : ! this . state . expandColors } )
575- }
576- >
559+ } >
577560 < ExpandMore />
578561 </ IconButton >
579562 }
@@ -585,9 +568,7 @@ class SketchFieldDemo extends React.Component {
585568 < CompactPicker
586569 id = "lineColor"
587570 color = { this . state . lineColor }
588- onChange = { ( color ) =>
589- this . setState ( { lineColor : color . hex } )
590- }
571+ onChange = { ( color ) => this . setState ( { lineColor : color . hex } ) }
591572 />
592573 < br />
593574 < br />
@@ -606,9 +587,7 @@ class SketchFieldDemo extends React.Component {
606587 />
607588 < CompactPicker
608589 color = { this . state . fillColor }
609- onChange = { ( color ) =>
610- this . setState ( { fillColor : color . hex } )
611- }
590+ onChange = { ( color ) => this . setState ( { fillColor : color . hex } ) }
612591 />
613592 </ CardContent >
614593 </ Collapse >
@@ -621,8 +600,7 @@ class SketchFieldDemo extends React.Component {
621600 < IconButton
622601 onClick = { ( e ) =>
623602 this . setState ( { expandBack : ! this . state . expandBack } )
624- }
625- >
603+ } >
626604 < ExpandMore />
627605 </ IconButton >
628606 }
@@ -693,8 +671,7 @@ class SketchFieldDemo extends React.Component {
693671 style = { styles . dropArea }
694672 activeStyle = { styles . activeStyle }
695673 rejectStyle = { styles . rejectStyle }
696- onDrop = { this . _onBackgroundImageDrop }
697- >
674+ onDrop = { this . _onBackgroundImageDrop } >
698675 Try dropping an image here,
699676 < br />
700677 or click
@@ -713,8 +690,7 @@ class SketchFieldDemo extends React.Component {
713690 < IconButton
714691 onClick = { ( e ) =>
715692 this . setState ( { expandImages : ! this . state . expandImages } )
716- }
717- >
693+ } >
718694 < ExpandMore />
719695 </ IconButton >
720696 }
@@ -725,25 +701,21 @@ class SketchFieldDemo extends React.Component {
725701 < TextField
726702 label = "Image URL"
727703 helperText = "Copy/Paste an image URL"
728- onChange = { ( e ) =>
729- this . setState ( { imageUrl : e . target . value } )
730- }
704+ onChange = { ( e ) => this . setState ( { imageUrl : e . target . value } ) }
731705 value = { this . state . imageUrl }
732706 />
733707 < Button
734708 variant = "outlined"
735709 onClick = { ( e ) => {
736710 this . _sketch . addImg ( this . state . imageUrl ) ;
737- } }
738- >
711+ } } >
739712 Load Image from URL
740713 </ Button >
741714 </ div >
742715 < br />
743716 < Button
744717 variant = "outlined"
745- onClick = { ( e ) => this . _sketch . addImg ( dataUrl ) }
746- >
718+ onClick = { ( e ) => this . _sketch . addImg ( dataUrl ) } >
747719 Load Image from Data URL
748720 </ Button >
749721 </ CardContent >
@@ -759,8 +731,7 @@ class SketchFieldDemo extends React.Component {
759731 this . setState ( {
760732 expandControlled : ! this . state . expandControlled ,
761733 } )
762- }
763- >
734+ } >
764735 < ExpandMore />
765736 </ IconButton >
766737 }
@@ -773,8 +744,7 @@ class SketchFieldDemo extends React.Component {
773744 this . setState ( {
774745 controlledValue : dataJsonControlled ,
775746 } )
776- }
777- >
747+ } >
778748 Load controlled Value
779749 </ Button >
780750 </ CardContent >
0 commit comments