@@ -215,20 +215,20 @@ class SketchField extends Component {
215215
216216 _onMouseUp ( e ) {
217217 this . _selectedTool . doMouseUp ( e ) ;
218- let onChange = this . props . onChange ;
219- if ( onChange ) {
220- setTimeout ( ( ) => {
221- onChange ( event . e ) ;
218+ if ( this . props . onChange ) {
219+ let onChange = this . props . onChange ;
220+ setTimeout ( ( ) => {
221+ onChange ( e . e ) ;
222222 } , 10 ) ;
223223 }
224224 }
225225
226226 _onMouseOut ( e ) {
227227 this . _selectedTool . doMouseOut ( e ) ;
228- let onChange = this . props . onChange ;
229- if ( onChange ) {
230- setTimeout ( ( ) => {
231- onChange ( event . e ) ;
228+ if ( this . props . onChange ) {
229+ let onChange = this . props . onChange ;
230+ setTimeout ( ( ) => {
231+ onChange ( e . e ) ;
232232 } , 10 ) ;
233233 }
234234 }
@@ -300,7 +300,7 @@ class SketchField extends Component {
300300 this . _fc . renderAll ( ) ;
301301 }
302302 if ( this . props . onChange ) {
303- this . props . onChange ( event . e ) ;
303+ this . props . onChange ( ) ;
304304 }
305305 }
306306
@@ -325,7 +325,7 @@ class SketchField extends Component {
325325 obj . setCoords ( ) ;
326326 canvas . renderAll ( ) ;
327327 if ( this . props . onChange ) {
328- this . props . onChange ( event . e ) ;
328+ this . props . onChange ( ) ;
329329 }
330330 }
331331 }
@@ -396,7 +396,7 @@ class SketchField extends Component {
396396 canvas . loadFromJSON ( json , ( ) => {
397397 canvas . renderAll ( ) ;
398398 if ( this . props . onChange ) {
399- this . props . onChange ( null ) ;
399+ this . props . onChange ( ) ;
400400 }
401401 } ) ;
402402 } , 100 ) ;
@@ -418,7 +418,7 @@ class SketchField extends Component {
418418 canvas . renderAll ( ) ;
419419 } ;
420420 if ( this . props . onChange ) {
421- this . props . onChange ( null ) ;
421+ this . props . onChange ( ) ;
422422 }
423423 }
424424
0 commit comments