diff --git a/app/components/SimpleEditor/Editor.js b/app/components/SimpleEditor/Editor.js index 5767139808d0bafa378f5eb2f28fafeb02722a99..aa9994478d687e5eb4ab45fbc9a481577d08ffb1 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 baf2b4395ef89101d933619bca0bc740f27ad7e4..3124b9b3eae31203a99bb167137d04008e212be9 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 d9d2cc7ae24c8eb4282f786c305952d74710ffbf..824842e69775600ad10eec63bd986938166eca4f 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,