Skip to content

Commit

Permalink
minor improvements: draw btn and canvas reset
Browse files Browse the repository at this point in the history
  • Loading branch information
ep12 committed Jun 9, 2020
1 parent c5f9e7b commit 5471e51
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion barnsley.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
function iterate(rules, counter) {
if (counter <= 0) {
console.info("Redraw finished");
document.getElementById("drawbtn").disabled = false;
return;
}
// if (counter % 100 == 0) {
Expand Down Expand Up @@ -102,6 +103,7 @@
if (detcheck) {
console.info("Redraw");
setupCanvas();
document.getElementById("drawbtn").disabled = true;
iterate(rules, 1 * document.getElementById("sn-iterruns").value);
} else {
for (var i=0; i < 4; i++) {
Expand Down Expand Up @@ -204,7 +206,7 @@ <h2>Settings</h2>
<br/>
<input type="reset" style="float: right;" class="danger" value="reset options">
<input type="button" style="float: right;" class="semidanger" value="reset canvas" onclick="setupCanvas();">
<input type="button" style="float: right;" class="greenbox" value="draw!" onclick="updateSettings();">
<input type="button" style="float: right;" class="greenbox" value="draw!" onclick="updateSettings();" id="drawbtn">
</form>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion style.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ input::-webkit-inner-spin-button, input::-webkit-outer-spin-button {
/* background-color: forestgreen; */
background-color: #00519E;
color: white;
border-radius: 0.65em 0.65em 0em 0em;
border-radius: 0.5em 0.5em 0em 0em;
width: 100%;
text-align: center;
margin: 0;
Expand Down Expand Up @@ -177,3 +177,6 @@ input::-webkit-inner-spin-button, input::-webkit-outer-spin-button {
height: 100%;
padding: 1em;
}
input[type="button"]:disabled, input[type="button"][disabled] {
background-color: gray !important;
}

0 comments on commit 5471e51

Please sign in to comment.