From 78262333511b03e1a6a3951ea98536f2a06f39d3 Mon Sep 17 00:00:00 2001 From: Don Kirkby Date: Sun, 5 Jul 2020 14:30:48 -0700 Subject: [PATCH] Update code block heights in browser, for #266. --- html/src/App.css | 1 - html/src/App.js | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/html/src/App.css b/html/src/App.css index f34e81b9..8c304037 100644 --- a/html/src/App.css +++ b/html/src/App.css @@ -13,7 +13,6 @@ .page-footer { height: 3em } .editor-pane { - height: 25em; width: 50%; position: relative; } diff --git a/html/src/App.js b/html/src/App.js index 4aa8f862..19d18b5b 100644 --- a/html/src/App.js +++ b/html/src/App.js @@ -43,6 +43,7 @@ class Editor extends Component { this.setState({selectedLine: this.props.selectedLine}); this.content.current.editor.gotoLine(this.props.selectedLine+1); } + this.content.current.editor.resize(); } render() { @@ -177,7 +178,8 @@ class CodeSample extends Component { progressBar = null, outputHeaders = null, outputSection = null, - resetButton = null; + resetButton = null, + lineCount = 1 + this.state.source.split(/\r\n|\r|\n/).length; if (this.state.isLive) { displayEditor =
-
+