Options
All
  • Public
  • Public/Protected
  • All
Menu

Optional settings that can be passed when creating a new signature instance to customize its behavior.

Hierarchy

Index

Properties

background: string

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"});
change: null | OnChangeListener

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");
});
color: string

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"});
disabled: boolean

Set to true to disable the signature capture functionality. You can also use the disable and enable commands for this.

distance: number

The minimum distance (pixels) of movement to start a drag operation.

$(selector).signature({distance: 5});
guideline: boolean

Set to true to draw a horizontal guideline within the signature area.

guidelineColor: string

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.

guidelineIndent: number

The indent (pixels) of the guideline (if present) from the sides of the signature area.

guidelineOffset: number

The offset (pixels) of the guideline (if present) from the bottom of the signature area.

notAvailable: string

The text to display in the signature area if the browser doesn"t support the canvas element.

svgStyles: boolean

Set to true to apply styles in SVG using the style attribute, rather than using individual inline attributes.

$(selector).signature({svgStyles: true});
since

1.2.0

syncField: null | string | HTMLElement | JQuery<HTMLElement>

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"});
syncFormat: SyncFormat

The output representation that is automatically generated into the syncField. PNG and JPEG output are generated as data URIs.

since

1.2.0

thickness: number

The thickness of the lines used to draw the signature.

Generated using TypeDoc