Skip to content

Commit

Permalink
Formated Errors, fixed an error catching bug
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxBittker committed Sep 23, 2014
1 parent 09d27f9 commit e3a001b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Mojulo.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ JS_MOD.EquationManager = (function() {
});

$(form).on('submit', function(e) {
triggerUpdate(form, anim);
e.preventDefault();
triggerUpdate(form, anim);
});
}

Expand Down
12 changes: 7 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,28 @@
}
</style>



</head>
<body>
<form id="equation-form"> <!-- Not the best name, maybe come up with a better one -->
<input name="equation" size ="33" type="text" value="x * y * tick">
<button type="submit" onclick="ErrorDiv.innerHTML = '\n'">Run</button>
<br>
<canvas id="display"></canvas>



<pre>
<div id="ErrorDiv"></div>
<script type="text/javascript">
var div = document.getElementById("ErrorDiv");
div.textContent = "";
var text = div.textContent;
</script>


</pre>

</form>

<canvas id="display"></canvas>

<P>
Input an equation and hit run to see it animated! <br>If the result is a black square the equation didn't parse or it evaluates to low numbers only (0-10) <br>

Expand Down

0 comments on commit e3a001b

Please sign in to comment.