Grey out cancel button when not drawing
This commit is contained in:
parent
278fa9a79b
commit
6c67059596
@ -205,7 +205,7 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
<div class="btn btn-primary" onclick="activateTextTool()"><i class="fas fa-font"></i> Add Text</div>
|
||||
<div class="btn btn-primary" onclick="activateNotaryCertificateTool()"><i class="fas fa-sticky-note"></i> Add Certificate</div>
|
||||
<div class="btn btn-primary" onclick="addPage()"><i class="fas fa-plus"></i> Append Blank Page</div>
|
||||
<div class="btn btn-primary" onclick="disableGuideBox()">Cancel</div>
|
||||
<div class="btn btn-primary disabled" id="cancelDrawBtn" onclick="disableGuideBox()">Cancel</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card d-inline-block">
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user