/* Copyright (C) 2020-2021       MB Informatique         <info@mb-informatique.fr> */

var canvas = document.getElementById("canvas");
var signaturePad = new SignaturePad(canvas, {
    minWidth: 0.5,
    maxWidth: 2.5,
    penColor: "rgb(0, 0, 0)"
});

var canvasAndForm = document.getElementById("canvasAndForm");
var cancelButton = document.getElementById("clear");

function postData() {
    var data = signaturePad.toDataURL("image/png");
    document.getElementById("inp_img").value = data;
}

cancelButton.addEventListener("click", function (event) {
    signaturePad.clear();
});
