Class: SignatureField

SignatureField()

The SignatureField uses an HTML5 canvas element to render previews of the signature vector provided by it's editor view SignatureView.

Constructor

new SignatureField()

Source:
Requires:
  • module:argos.FieldManager
  • module:argos.Views.SignatureView
  • module:argos.Format
Example
{
        name: 'Signature',
        property: 'Signature',
        label: this.signatureText,
        type: 'signature'
    }

Extends

Requires

  • module:argos.FieldManager
  • module:argos.Views.SignatureView
  • module:argos.Format

Members

attributeMap

Properties:
Name Type Description
Creates Object a setter map to html nodes, namely: * inputValue => inputNode's value attribute
Inherited From:
Source:

config

Source:

currentValue

Properties:
Name Type Description
Value Object/String/Date/Number storage for current value, as it must be formatted for display this is the full value.
Inherited From:
Source:

originalValue

Properties:
Name Type Description
Value String storage for keeping track of modified/unmodified values. Used in isDirty.
Inherited From:
Source:

required :Boolean

required should be true if the field requires input. Defaults to false.
Type:
  • Boolean
Inherited From:
Source:

signature

Properties:
Name Type Description
A Array.<Array.<Number>> series of x,y coordinates in the format of: `[[0,0],[1,5]]`
Source:

signatureLabelText

Properties:
Name Type Description
Text String used for ARIA label
Source:

signatureText

Properties:
Name Type Description
Text String used within button
Source:

validationValue

Properties:
Name Type Description
Value Object/String/Date/Number storage for the value to use in validation, when gathering values from the editor view the validationValue is set using `getValues(true)` which returns all values even non-modified ones.
Inherited From:
Source:

view

Inherited From:
Source:

widgetTemplate

Properties:
Name Type Description
Simplate Simplate that defines the fields HTML Markup * `$` => Field instance * `$$` => Owner View instance
Overrides:
Source:

Methods

_disableTextElement()

Sets the input nodes' disabled attribute to true
Inherited From:
Source:

_enableTextElement()

Sets the input nodes' disabled attribute to false
Inherited From:
Source:

_onClick(evt)

Handler for the `onclick` event of the fields container. Invokes navigateToEditView.
Parameters:
Name Type Description
evt Event
Inherited From:
Source:

_onComplete()

Handler for `_onComplete` which is fired after the user has completed the form in the editor view Fires onChange.
Inherited From:
Source:

clearValue()

Clears the value set to the hidden field
Overrides:
Source:

complete()

Handler for the toolbar item that is passed to the editor view. When this function fires the view shown is the editor view but the function is fired in scope of the field. It gets a handler of the current active view and validates the form, if it passes it gathers the value, sets the fields text, calls `ReUI.back` and fires _onComplete.
Inherited From:
Source:

createNavigationOptions() → {Object}

Extends the parent implementation by also passing the `signature` array.
Overrides:
Source:
Returns:
Navigation options
Type
Object

disable()

Extends the parent implementation to also call _disableTextElement.
Inherited From:
Source:

enable()

Extends the parent implementation to also call _enableTextElement.
Inherited From:
Source:

formatValue(val) → {Array/String}

Since the EditorField calls `formatValue` during complete we need to override to simply return the value given.
Parameters:
Name Type Description
val
Overrides:
Source:
Returns:
Type
Array/String

getValue() → {Object/String/Date/Number}

Returns the current value
Inherited From:
Source:
Returns:
Type
Object/String/Date/Number

getValuesFromView()

Complete override that gets the editor view, gets the values and calls set value on the field
Overrides:
Source:

init()

Extends the parent implementation to connect the `onclick` event of the fields container to _onClick.
Inherited From:
Source:

isDirty() → {Boolean}

Determines if the value has been modified from the default/original state
Inherited From:
Source:
Returns:
Type
Boolean
Navigates to the given `this.view` using the options from createNavigationOptions.
Inherited From:
Source:

setText(text)

Sets the displayed text to the input.
Parameters:
Name Type Description
text String
Inherited From:
Source:

setValue(val, initial)

Sets the signature value by using format.imageFromVector to the img node and setting the array directly to `originalValue`.
Parameters:
Name Type Description
val
initial
Overrides:
Source:

validate(value)

Extends the parent implementation to use the `this.validationValue` instead of `this.getValue()`.
Parameters:
Name Type Description
value
Inherited From:
Source: