From 3ab55c03ef5f6b1cc66460cb2f6cbcb9181e6283 Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Wed, 26 Apr 2017 22:10:15 +0300
Subject: [PATCH] temp fix for notes branch

---
 app/components/SimpleEditor/Editor.js              | 12 ++++++++----
 app/components/SimpleEditor/panes/Notes/Notes.js   | 13 ++++++++++---
 app/components/SimpleEditor/panes/Notes/notes.scss |  2 +-
 3 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/app/components/SimpleEditor/Editor.js b/app/components/SimpleEditor/Editor.js
index 5767139..aa99944 100644
--- a/app/components/SimpleEditor/Editor.js
+++ b/app/components/SimpleEditor/Editor.js
@@ -108,8 +108,7 @@ class Editor extends ProseEditor {
       $$(Overlay),
       $$(ContextMenu),
       // $$(Dropzones)
-      sideNav,
-      footerNotes
+      sideNav
     )
     .attr('id', 'content-panel')
     .ref('contentPanel')
@@ -119,12 +118,17 @@ class Editor extends ProseEditor {
         contentPanel,
         toc
       )
+    const ToolbarWithEditor = $$(SplitPane, { splitType: 'horizontal' })
+      .append(
+        toolbar,
+        contentPanelWithSplitPane
+      )
 
     el.append(
       $$(SplitPane, { splitType: 'horizontal' })
         .append(
-          toolbar,
-          contentPanelWithSplitPane
+          ToolbarWithEditor,
+          footerNotes
         )
     )
 
diff --git a/app/components/SimpleEditor/panes/Notes/Notes.js b/app/components/SimpleEditor/panes/Notes/Notes.js
index baf2b43..3124b9b 100644
--- a/app/components/SimpleEditor/panes/Notes/Notes.js
+++ b/app/components/SimpleEditor/panes/Notes/Notes.js
@@ -18,6 +18,14 @@ class Notes extends Component {
     this.context.editorSession.onUpdate('document', this.onNotesUpdated, this)
   }
 
+  didUpdate () {
+    // TEMP This will be merged in redesign branch.
+    this.el.el.classList.remove('sm-auto-fill')
+    this.el.el.classList.remove('se-pane')
+    const mainScrollPane = document.getElementById('content-panel')
+    mainScrollPane.style.height = this.el.el.offsetTop - 162 + 'px'
+  }
+
   render ($$) {
     const notesSessionConf = this._initNotesEditor()
     const resizer = $$('div').addClass('resize-area')
@@ -65,7 +73,6 @@ class Notes extends Component {
       noteContent += isolatedNoteElement.outerHTML
     }
 
-
     const doc = importer.importDocument(noteContent)
 
     const editorSession = new EditorSession(doc, {
@@ -87,8 +94,8 @@ class Notes extends Component {
     const height = (this.el.el.offsetHeight + this.el.el.offsetTop - e.clientY)
     const scrollPane = document.getElementById('notes-editor-content-panel').children
     scrollPane[0].style.minHeight = height - 40 + 'px'
-    const mainScrollPane = document.getElementById('content-panel').children
-    mainScrollPane[0].style.maxHeight = this.el.el.offsetTop - 140 + 'px'
+    const mainScrollPane = document.getElementById('content-panel')
+    mainScrollPane.style.height = this.el.el.offsetTop - 162 + 'px'
     this.el.el.style.height = height + 'px'
   }
 
diff --git a/app/components/SimpleEditor/panes/Notes/notes.scss b/app/components/SimpleEditor/panes/Notes/notes.scss
index d9d2cc7..824842e 100644
--- a/app/components/SimpleEditor/panes/Notes/notes.scss
+++ b/app/components/SimpleEditor/panes/Notes/notes.scss
@@ -18,7 +18,7 @@ $light-blue: #e4f0ff;
     cursor: row-resize;
     height: 5px;
     position: absolute;
-    top: 0;
+    top: -14px;
     width: 100%;
    }
    .sc-isolated-node,
-- 
GitLab