Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. //let ind = this.state.indSelected
  2. //if (ind >= 0 && this.state.dest === dest) {
  3. // if (dest === 1) { // move to the right
  4. // let val = this.state.paraLeft[ind], aux = [...this.state.paraLeft]; // make a separate copy of the array
  5. // aux.splice(ind, 1) // remove the element from the array copy
  6. // this.setState({
  7. // paraRight: this.state.paraRight.concat(val),
  8. // paraLeft: aux,
  9. // indSelected: -1,
  10. // dest: -1
  11. // })
  12. // }
  13. // else { // move to the left
  14. // let val = this.state.paraRight[ind], aux = [...this.state.paraRight]; // make a separate copy of the array
  15. // aux.splice(ind, 1) // remove the element from the array copy
  16. // this.setState({
  17. // paraLeft: this.state.paraLeft.concat(val),
  18. // paraRight: aux,
  19. // indSelected: -1,
  20. // dest: -1
  21. // })
  22. // }
  23. //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement