Merge pull request #153 from feeshmaster/patch-5

Update pixelResizeTool.js
This commit is contained in:
slweeb 2023-11-26 18:44:26 -05:00 committed by GitHub
commit d848b8dbff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@ pixelResizeButton.onclick = function(pixel) {
let canvas_width = document.getElementById("game").width;
let canvas_height = document.getElementById("game").height;
let pixelSizeNeeded = prompt("How big should pixels be?");
if (!pixelSizeNeeded) { return }
if (!pixelSizeNeeded || isNAN(pixelSizeNeeded)) { alert('number is invalid!'); return; }
resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true);
};
pixelResizeButton.textContent = "Resize";