From e1e99e2b11f5786a3068a0b0128580469d2e0da3 Mon Sep 17 00:00:00 2001
From: Sandro Weber <webers@in.tum.de>
Date: Wed, 7 Sep 2022 12:29:38 +0200
Subject: [PATCH] more layouting

---
 src/components/tf-editor/tf-editor.css |  8 ++++----
 src/components/tf-editor/tf-editor.js  | 13 ++++++-------
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/src/components/tf-editor/tf-editor.css b/src/components/tf-editor/tf-editor.css
index 0d13c32..8f92611 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 3c8aec8..4721ae3 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}
-- 
GitLab