diff --git a/js/drawtools.js b/js/drawtools.js index 97e9f2e..518760e 100644 --- a/js/drawtools.js +++ b/js/drawtools.js @@ -99,7 +99,7 @@ $("#page-canvas-container").on("click", ".page-canvas", function (evt) { }); $("#page-canvas-container").on("click", ".page-canvas.active", function (evt) { - if (typeof activeDrawImage == "undefined") { + if (typeof activeDrawImage == "undefined" || activeDrawImage == null) { return; } var canvas = $(this)[0]; @@ -137,6 +137,7 @@ function disableGuideBox() { var context = $("#placementguidebox")[0].getContext('2d'); context.clearRect(0, 0, $("#placementguidebox")[0].width, $("#placementguidebox")[0].height); + activeDrawImage = null; } $("#page-canvas-container").on("mousemove", function (evt) {