diff --git a/js/drawtools.js b/js/drawtools.js index 9e1d37e..97e9f2e 100644 --- a/js/drawtools.js +++ b/js/drawtools.js @@ -115,8 +115,8 @@ function enableGuideBox(image, scalecorrectionfactor) { if (typeof scalecorrectionfactor == "undefined") { scalecorrectionfactor = 1; } - // disable first to clear contents - disableGuideBox(); + var context = $("#placementguidebox")[0].getContext('2d'); + context.clearRect(0, 0, $("#placementguidebox")[0].width, $("#placementguidebox")[0].height); $("#placementguidebox").css("display", ""); // calculate size of guide image var pageWidthPx = $("#page-canvas-container .page-canvas")[0].getContext("2d").canvas.width; @@ -161,4 +161,8 @@ function getMousePos(canvas, evt) { x: (evt.clientX - rect.left) * scaleX, // scale mouse coordinates after they have y: (evt.clientY - rect.top) * scaleY // been adjusted to be relative to element } -} \ No newline at end of file +} + +// Hide it at start +// doesn't work in CSS because of reasons +disableGuideBox(); \ No newline at end of file