src/sidebar/Layers.js
// Call to change layer name.
Call to change layer name.
Call to change layer name .
function changeName(id) {
  var input_element = $('#change_name_'+id).val();
  if (input_element == undefined) {
  } else {
    for (var i = 0; i < this.state.layer_list.length; i++) {
      if (id == this.state.layer_list[i][1]){
        var position = i
      }
    }
    var layers = [...this.state.layer_list]
    layers[position][0] = input_element
    this.setState( {layers} )
  }
}
function changeName ( id ) { var input_element = $ ( '#change_name_' + id ) . val ( ) ; if ( input_element == undefined ) { } else { for ( var i = 0 ; i < this . state . layer_list . length ; i ++ ) { if ( id == this . state . layer_list [ i ] [ 1 ] ) { var position = i } } var layers = [ ... this . state . layer_list ] layers [ position ] [ 0 ] = input_element this . setState ( { layers } ) } }
Call to change layer name.
Call to change layer name .