Skip to content

Commit 0392a68

Browse files
committed
add clear button
1 parent 728e4ad commit 0392a68

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

v3/css/opt-frontend.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ button.smallBtn {
6363
}
6464

6565
button.bigBtn {
66-
font-size: 13pt;
66+
font-size: 12pt;
6767
padding: 6px;
6868
margin-top: 6px;
6969
}

v3/js/opt-frontend.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,10 @@ $(document).ready(function() {
231231
$("#executeBtn").attr('disabled', false);
232232
$("#executeBtn").click(executeCodeFromScratch);
233233

234+
$("#clearBtn").click(function() {
235+
pyInputCodeMirror.setValue('');
236+
});
237+
234238

235239
// canned examples
236240

v3/visualize.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104

105105
<p>
106106
<button id="executeBtn" class="bigBtn" type="button">Visualize Execution</button>
107+
<button style="margin-left: 10px;" id="clearBtn" class="bigBtn" type="button">Clear</button>
107108
</p>
108109

109110

0 commit comments

Comments
 (0)