Customise each targetted input field with the settings below (all are optional):
$(selector).signature({guideline: true});
background | change | color | disabled | distance | guideline | guidelineColor | guidelineIndent | guidelineOffset | notAvailable | scale | svgStyles | syncField | syncFormat | thickness
Name | Type | Default | Comments |
---|---|---|---|
distance | number | 0 | The minimum distance (pixels) of movement to start a drag operation.
|
background | string | '#ffffff' | 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.
|
color | string | '#000000' | 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.
|
thickness | number | 2 | The thickness of the lines used to draw the signature. |
guideline | boolean | false | Set to true to draw a horizontal guideline
within the signature area. |
guidelineColor | string | '#a0a0a0' | 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. |
guidelineOffset | number | 50 | The offset (pixels) of the guideline (if present) from the bottom of the signature area. |
guidelineIndent | number | 10 | The indent (pixels) of the guideline (if present) from the sides of the signature area. |
scale | number | 1 | A scaling factor for rendering the signature (only applies to redraws). Since 1.2.1. |
notAvailable | string | 'Your browser doesn\'t support signing' | The text to display in the signature area if the browser doesn't
support the canvas element. |
disabled | boolean | false | Set to true to disable the signature capture functionality.
You can also use the
disable
and enable
commands for this. |
syncField | string or element or jQuery | null | 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.
|
syncFormat | string | 'JSON' | The output representation that is automatically generated into the syncField.
One of the following: 'JSON', 'SVG', 'PNG', 'JPEG'.
PNG and JPEG output are generated as data: URLs.
Since 1.2.0. |
svgStyles | boolean | false | Set to true to apply styles in SVG using the style attribute,
rather than using individual inline attributes.
Since 1.2.0. |
change | function | null | 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'.
|