Skip to content

Commit

Permalink
Replace alert in canvas_api_tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
evelinabe committed Jul 4, 2024
1 parent 600202f commit 03a091f
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,6 @@ function draw() {
// check input
if (document.getElementById("miterLimit").value.match(/\d+(\.\d+)?/)) {
ctx.miterLimit = parseFloat(document.getElementById("miterLimit").value);
} else {
alert("Value must be a positive number");
}

// Draw lines
Expand All @@ -421,7 +419,7 @@ function draw() {
clicking the redraw button.<br /><br />
<form onsubmit="return draw();">
<label for="miterLimit">Miter limit</label>
<input type="number" size="3" id="miterLimit" />
<input type="number" size="3" min="1" id="miterLimit" />
<input type="submit" value="Redraw" />
</form>
</td>
Expand Down

0 comments on commit 03a091f

Please sign in to comment.