Skip to content

Commit 489d5a1

Browse files
authored
Merge pull request #16 from raduetsya/output_clear
Clear output on Run code
2 parents 1a9d4fd + bed014b commit 489d5a1

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

index.html

+2-4
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,11 @@
221221
<div id="main_col3" class="main_col">
222222
<div class="main_col_opened">
223223

224-
<div class="main_options" style="height:85px">
224+
<div class="main_options">
225225

226226

227227
<div class="main_options_header">Output</div>
228-
<div class="main_options_tools">
229-
<button id="clear_output" class="btn btn-dark">Clear</button>
230-
</div>
228+
<div class="main_options_tools"><!-- Some buttons here --></div>
231229

232230

233231

src/outputview.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ class OutputView
2020

2121
this.currentText = "";
2222

23-
document.getElementById("clear_output").addEventListener("click",function(){
24-
25-
this.clear();
26-
}.bind(this))
27-
28-
2923
this.addLine();
3024
}
3125

@@ -90,6 +84,7 @@ class OutputView
9084

9185
resetRuntimeOutput() {
9286
this.runtimeOutput = [""];
87+
this.clear();
9388
}
9489

9590
printLine(text,type) {

src/windowcontroller.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class WindowController
7272

7373

7474
let mcc = mc.getElementsByClassName("main_options")[0];
75-
this.mainOptionsHeight.push(parseInt(mcc.style.height,10));
75+
this.mainOptionsHeight.push(mcc.offsetHeight);
7676

7777
}
7878

0 commit comments

Comments
 (0)