From 6c670595969f8b27c0769c2baafedfbe762507df Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Thu, 15 Jul 2021 20:16:10 -0600 Subject: [PATCH] Grey out cancel button when not drawing --- src/index.html | 2 +- src/js/drawtools.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.html b/src/index.html index 156ea32..2af53fb 100644 --- a/src/index.html +++ b/src/index.html @@ -205,7 +205,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
Add Text
Add Certificate
Append Blank Page
-
Cancel
+
Cancel
diff --git a/src/js/drawtools.js b/src/js/drawtools.js index 18f9160..dd35636 100644 --- a/src/js/drawtools.js +++ b/src/js/drawtools.js @@ -190,6 +190,7 @@ $("#page-canvas-container").on("click", ".page-canvas.active", function (evt) { function enableGuideBox(image, scalecorrectionfactor) { + $("#cancelDrawBtn").removeClass("disabled"); if (typeof scalecorrectionfactor == "undefined") { scalecorrectionfactor = 1; } @@ -214,6 +215,7 @@ function enableGuideBox(image, scalecorrectionfactor) { function disableGuideBox() { $("#placementguidebox").css("display", "none"); + $("#cancelDrawBtn").addClass("disabled"); var context = $("#placementguidebox")[0].getContext('2d'); context.clearRect(0, 0, $("#placementguidebox")[0].width, $("#placementguidebox")[0].height);