src/sidebar/Layers.js
// Makes buttons unclickable if no layer is selected.
Makes buttons unclickable if no layer is selected.
Makes buttons unclickable if no layer is selected .
disableInvalidButtons() {
    if (this.state.selected_layer == null) {
       $('#delete').prop('disabled', true);
       $('#delete').css( 'cursor', 'not-allowed' );
       $('#save').prop('disabled', true);
       $('#save').css( 'cursor', 'not-allowed' );
    } else {
      $('#delete').prop('disabled', false);
      $('#delete').css( 'cursor', 'pointer' );
      $('#save').prop('disabled', false);
      $('#save').css( 'cursor', 'pointer' );
    }
  }
disableInvalidButtons ( ) { if ( this . state . selected_layer == null ) { $ ( '#delete' ) . prop ( 'disabled' , true ) ; $ ( '#delete' ) . css ( 'cursor' , 'not-allowed' ) ; $ ( '#save' ) . prop ( 'disabled' , true ) ; $ ( '#save' ) . css ( 'cursor' , 'not-allowed' ) ; } else { $ ( '#delete' ) . prop ( 'disabled' , false ) ; $ ( '#delete' ) . css ( 'cursor' , 'pointer' ) ; $ ( '#save' ) . prop ( 'disabled' , false ) ; $ ( '#save' ) . css ( 'cursor' , 'pointer' ) ; } }
Makes buttons unclickable if no layer is selected.
Makes buttons unclickable if no layer is selected .