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"});
Whether the signature data should be saved as a base 64 string.
A map with all behaviors that were defined for this widget. The key is the name of the behavior, the value is the callback function that is invoked when the behavior is called.
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});
ID of the form to use for AJAX requests.
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 client-side ID of the widget, with all parent naming containers, such as
myForm:myWidget
. This is also the ID of the container HTML element for this widget. In case the widget needs
multiple container elements (such as Paginator), this may also be an array if IDs.
The text to display in the signature area if the browser doesn"t support the canvas element.
Callback that is invoked when the signature changes.
An optional callback that is invoked
after this widget was created successfully, at the end of the init method. This is
usually specified via the widgetPostConstruct
attribute on the JSF component. Note that this is also called
during a refresh
(AJAX update).
An optional callback that is invoked after
this widget was refreshed after an AJAX update, at the end of the refresh method.
This is usually specified via the widgetPostRefresh
attribute on the JSF component.
An optional callback that is invoked before
this widget is about to be destroyed, e.g., when the component was removed at the end of an AJAX update. This is
called at the beginning of the destroy method. This is usually specified via the
widgetPreDestroy
attribute on the JSF component.
Whether the signature widget is readonly.
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.
The name of the widget variables of this widget. The widget variable can be used to
access a widget instance by calling PF("myWidgetVar")
.
Generated using TypeDoc
The configuration for the Signature widget. You can access this configuration via BaseWidget.cfg. Please note that this configuration is usually meant to be read-only and should not be modified.