The background colour of the signature area. Specify this as a six character hexadecimal value prefixed by a hash (#), as a RGB triplet, or as a named colour.
$(selector).signature({background: "#0000ff"});
$(selector).signature({background: "rgb(0,0,255)"});
$(selector).signature({background: "blue"});
This function is called when the signature is changed: either by drawing a new line on it with the mouse, by
clearing it, or by re-drawing an entire signature. The function receives two parameters: the triggering event
and an empty UI object. You can also bind a handler to this event using its full name signaturechange
.
$(selector).signature({
change: (event, ui) => {
alert("The signature has changed");
}
});
$(selector).signature().on("signaturechange", (event, ui) => {
alert("The signature has changed");
});
The colour of the signature lines. Specify this as a six character hexadecimal value prefixed by a hash (#), as a RGB triplet, or as a named colour.
$(selector).signature({color: "#0000ff"});
$(selector).signature({color: "rgb(0,0,255)"});
$(selector).signature({color: "blue"});
Set to true to disable the signature capture functionality. You can also use the disable and enable commands for this.
The minimum distance (pixels) of movement to start a drag operation.
$(selector).signature({distance: 5});
Set to true to draw a horizontal guideline within the signature area.
The colour of the guideline (if present). Specify this as a six character hexadecimal value prefixed by a hash (#), as a RGB triplet, or as a named colour.
The indent (pixels) of the guideline (if present) from the sides of the signature area.
The offset (pixels) of the guideline (if present) from the bottom of the signature area.
The text to display in the signature area if the browser doesn"t support the canvas element.
Set to true
to apply styles in SVG using the style attribute, rather than using individual inline
attributes.
$(selector).signature({svgStyles: true});
The element to keep synchronised with the JSON text for the signature. The value may be a string selector, a DOM element, or a jQuery object.
$(selector).signature({syncField: "#jsonSignature"});
The output representation that is automatically generated into the syncField. PNG and JPEG output are generated as data URIs.
The thickness of the lines used to draw the signature.
Generated using TypeDoc
Optional settings that can be passed when creating a new signature instance to customize its behavior.