mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: better layout for domain_group
This commit is contained in:
1 parent
ca55695498
commit
133afd2296
7 files changed
+27
-13
No files matched your search
@@ -78,7 +78,8 @@ export default class Editor extends DOMAttachedObject {
|
||||
if (!editorElement) return;
|
||||
const lineHeight = this.editor.getOption(monaco.editor.EditorOption.lineHeight);
|
||||
const lineCount = this.editor.getModel()?.getLineCount() || 1;
|
||||
const height = this.editor.getTopForLineNumber(lineCount + 1) + lineHeight;
|
||||
let height = this.editor.getTopForLineNumber(lineCount + 1) + lineHeight;
|
||||
if (window.innerHeight < height) height = window.innerHeight;
|
||||
if (prevHeight !== height) {
|
||||
prevHeight = height;
|
||||
editorElement.style.height = `${height}px`;
|
||||
|
||||
Reference in new issue
Block a user