Update pixelResizeTool.js
This commit is contained in:
parent
45d7aa910d
commit
161de6ed47
|
|
@ -2,8 +2,9 @@ pixelResizeButton = document.createElement("button");
|
||||||
pixelResizeButton.onclick = function(pixel) {
|
pixelResizeButton.onclick = function(pixel) {
|
||||||
let canvas_width = document.getElementById("game").width;
|
let canvas_width = document.getElementById("game").width;
|
||||||
let canvas_height = document.getElementById("game").height;
|
let canvas_height = document.getElementById("game").height;
|
||||||
let pixelSizeNeeded = prompt("how big of pixels you want");
|
let pixelSizeNeeded = prompt("How big should pixels be?");
|
||||||
resizeCanvas(canvas_height,canvas_width, pixelSizeNeeded, true);
|
if (!pixelSizeNeeded) { return }
|
||||||
|
resizeCanvas(canvas_height,canvas_width, parseFloat(pixelSizeNeeded), true);
|
||||||
};
|
};
|
||||||
pixelResizeButton.textContent = "resize pixels";
|
pixelResizeButton.textContent = "Resize";
|
||||||
document.getElementById("toolControls").appendChild(pixelResizeButton);
|
document.getElementById("toolControls").appendChild(pixelResizeButton);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue