* Auto save on change of the editor * @param {String} value Contents of the Monaco editor instance
(value)
| 580 | * @param {String} value Contents of the Monaco editor instance |
| 581 | */ |
| 582 | handleEditorValueChange(value) { |
| 583 | const copyOpenTabs = Object.assign({}, this.state.openTabs) |
| 584 | const copyTabObject = Object.assign({}, this.state.openTabs[this.state.previousPaths[this.state.previousPaths.length - 1]]); |
| 585 | copyTabObject.editorValue = value; |
| 586 | copyOpenTabs[this.state.previousPaths[this.state.previousPaths.length - 1]] = copyTabObject; |
| 587 | this.setState({ openTabs: copyOpenTabs }, () => this.saveTab()); |
| 588 | } |
| 589 | closeSim() { |
| 590 | this.setState({ simulator: false }); |
| 591 | ipcRenderer.send('closeSim', this.state.liveServerPID); |