handleFormSubmit(e){

    if (e.which === 13) {
      console.log('this is the local state passed', this.state);

      //update the top margin
      if(this.state.margin && this.state.margin.top){
        this.controlTop(this.state.margin.top);
      }
      //update the bottom margin
      if(this.state.margin && this.state.margin.bottom){
        this.controlBottom(this.state.margin.bottom);
      }
      //update the right margin
      if(this.state.margin && this.state.margin.right){
        this.controlRight(this.state.margin.right);
      }
      //update the left margin
      if(this.state.margin && this.state.margin.left){
        this.controlLeft(this.state.margin.left);
      }

      //update the svg width
      if(this.state.width){
        this.controlWidth(this.state.width);
      }
      //update the svg height
      if(this.state.height){
        this.controlHeight(this.state.height);
      }
    }
  }
//When user press enter, action creators are called with all the user inputs
When user press enter, action creators are called with all the user inputs
When user press enter action creators are called with all the user inputs
handleFormSubmit(e){
    if (e.which === 13) {
      console.log('this is the local state passed', this.state);
      if(this.state.margin && this.state.margin.top){
        this.controlTop(this.state.margin.top);
      }
      if(this.state.margin && this.state.margin.bottom){
        this.controlBottom(this.state.margin.bottom);
      }
      if(this.state.margin && this.state.margin.right){
        this.controlRight(this.state.margin.right);
      }
      if(this.state.margin && this.state.margin.left){
        this.controlLeft(this.state.margin.left);
      }
      if(this.state.width){
        this.controlWidth(this.state.width);
      }
      if(this.state.height){
        this.controlHeight(this.state.height);
      }
    }
  }
handleFormSubmit ( e ) { if ( e . which === 13 ) { console . log ( 'this is the local state passed' , this . state ) ; if ( this . state . margin && this . state . margin . top ) { this . controlTop ( this . state . margin . top ) ; } if ( this . state . margin && this . state . margin . bottom ) { this . controlBottom ( this . state . margin . bottom ) ; } if ( this . state . margin && this . state . margin . right ) { this . controlRight ( this . state . margin . right ) ; } if ( this . state . margin && this . state . margin . left ) { this . controlLeft ( this . state . margin . left ) ; } if ( this . state . width ) { this . controlWidth ( this . state . width ) ; } if ( this . state . height ) { this . controlHeight ( this . state . height ) ; } } }
When user press enter, action creators are called with all the user inputs
When user press enter action creators are called with all the user inputs
//update the top margin //update the bottom margin //update the right margin //update the left margin //update the svg width //update the svg height