From c2014682d0d3e0378552ba04ee2cba879bfdcfc8 Mon Sep 17 00:00:00 2001 From: amritrai5757 Date: Fri, 30 Dec 2022 03:35:04 +0000 Subject: [PATCH] Fixed canvas size limitations --- js/Startup.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/Startup.js b/js/Startup.js index 3319820..ab80820 100644 --- a/js/Startup.js +++ b/js/Startup.js @@ -17,6 +17,12 @@ const Startup = (() => { var width = Util.getValue('size-width' + splashPostfix); var height = Util.getValue('size-height' + splashPostfix); var selectedPalette = Util.getText('palette-button' + splashPostfix); + + //Checks whether width and height values are not invalid + if(width <= 0 || height <= 0) { + alert("Please enter valid width and height"); + return; + } newPixel(FileManager.defaultLPE(width,height)); resetInput();