diff --git a/src/components/tf-editor/tf-editor.css b/src/components/tf-editor/tf-editor.css index 0d13c323ba978db2a60317c45ac168090abd6a88..8f9261144e0954c79323e82a01cd828764a2abe6 100644 --- a/src/components/tf-editor/tf-editor.css +++ b/src/components/tf-editor/tf-editor.css @@ -1,7 +1,3 @@ -.tf-editor-container { - margin: 10px; -} - .tf-editor-header { display: flex; flex-direction: row; @@ -41,4 +37,8 @@ .tf-editor-text-unsaved { color: orange; +} + +.tf-editor-codemirror-container { + overflow: scroll; } \ No newline at end of file diff --git a/src/components/tf-editor/tf-editor.js b/src/components/tf-editor/tf-editor.js index 3c8aec8c7979a92697a198a7b950bce8975dcefd..4721ae3b40fde67b739324d12fc443bb4d94623e 100644 --- a/src/components/tf-editor/tf-editor.js +++ b/src/components/tf-editor/tf-editor.js @@ -67,7 +67,6 @@ export default class TransceiverFunctionEditor extends React.Component { console.info(['this.hasUnsavedChanges', this.hasUnsavedChanges]); } - // setFile(directoryPath, filename, data, byname = true, contentType = 'text/plain') async saveTF() { let response = await ExperimentStorageService.instance.setFile( this.props.experimentId, this.state.selectedFilename, this.state.code); @@ -106,15 +105,15 @@ export default class TransceiverFunctionEditor extends React.Component { 'tf-editor-text-unsaved' : 'tf-editor-text-saved'}> {this.state.textChanges} </div> - {/*<div className='tf-editor-ui-save'> - </div>*/} </div> </div> - <CodeMirror - value={this.state.code} - maxHeight="100%" - onChange={(change, viewUpdate) => this.onChangeCodemirror(change, viewUpdate)}/> + <div className='tf-editor-codemirror-container'> + <CodeMirror + value={this.state.code} + onChange={(change, viewUpdate) => this.onChangeCodemirror(change, viewUpdate)}/> + </div> + {this.state.showDialogUnsavedChanges ? <div> <Modal show={this.state.showDialogUnsavedChanges}