Skip to content

Commit

Permalink
update settings['screenWidth'] when convert bytestring into an image
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisnian committed Jul 19, 2018
1 parent b3565df commit 0053f73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ <h2>4. Output</h2>
var canvas = document.createElement("canvas");
canvas.width = parseInt(document.getElementById("text-input-width").value);
canvas.height = parseInt(document.getElementById("text-input-height").value);
settings["screenWidth"] = canvas.width;
settings["screenHeight"] = canvas.height;

if(canvasContainer.children.length) {
canvasContainer.removeChild(canvasContainer.firstChild);
Expand Down

0 comments on commit 0053f73

Please sign in to comment.