From 9f05aae876d2d7fad4495faa1f1d889c0679db72 Mon Sep 17 00:00:00 2001 From: Gazook89 <58999374+Gazook89@users.noreply.github.com> Date: Wed, 10 Nov 2021 11:17:45 -0600 Subject: [PATCH] remove `left` property entirely and set height to cm.defaultTextHeight --- client/homebrew/editor/editor.jsx | 7 ++++--- client/homebrew/editor/editor.less | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/client/homebrew/editor/editor.jsx b/client/homebrew/editor/editor.jsx index a882863d1..7879b8797 100644 --- a/client/homebrew/editor/editor.jsx +++ b/client/homebrew/editor/editor.jsx @@ -122,8 +122,9 @@ const Editor = createClass({ textContent : editorPageCount }); codeMirror.addWidget({ line: lineNumber, ch: 0 }, testElement); - testElement.style.top = `${parseInt(testElement.style.top) - 12.5}px`; - testElement.style.left = 'unset'; + // testElement.style.top = `${parseInt(testElement.style.top) - 12.5}px`; + testElement.style.top = `${parseInt(testElement.style.top) - cm.defaultTextHeight()}px`; + testElement.style.left = null; editorPageCount = editorPageCount + 1; } } @@ -136,7 +137,7 @@ const Editor = createClass({ }); codeMirror.addWidget({ line: lineNumber, ch: 0 }, testElement); testElement.style.top = `${parseInt(testElement.style.top) - 12.5}px`; - testElement.style.left = 'unset'; + testElement.style.left = null; editorPageCount = editorPageCount + 1; } } diff --git a/client/homebrew/editor/editor.less b/client/homebrew/editor/editor.less index 61f9279cb..d20cfd86e 100644 --- a/client/homebrew/editor/editor.less +++ b/client/homebrew/editor/editor.less @@ -11,7 +11,7 @@ } .editor-page-count{ color : grey; - right : 15px; + right : 15px; // needs to be enough to push past scrollbar. } .columnSplit{ font-style : italic;