Constructor
new Selector(applicator, formElementId, pointer, selectorIndex, callback, disabledopt)
Class constructor.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
applicator |
module:inPlaceApplicators~InPlaceApplicator | The in-place applicator to be represented. |
||
formElementId |
string | The |
||
pointer |
string | The JSON Pointer to the in-place applicator represented by the first selector of the toolbar containing the newly created selector. |
||
selectorIndex |
number | The index in the toolbar of the newly created selector. |
||
callback |
function | The callback function for the |
||
disabled |
boolean |
<optional> |
false | Flag indicating whether the button should be disabled at initialization. |
- Implements:
- Source:
Members
applicator :module:inPlaceApplicators~InPlaceApplicator
The represented in-place applicator.
Type:
- Source:
button :Array.<module:selectors~Selector>
The array of selector components contained in the toolbar.
Type:
- Array.<module:selectors~Selector>
- Source:
domElement :HTMLDivElement
Reference to the DOM object that contains the HTML structure of the component.
Type:
- HTMLDivElement
- Implements:
- Source:
Methods
disable()
Disables the component.
- Implements:
- Source:
enable()
Enables the component.
- Implements:
- Source:
remove()
Removes the DOM elements associated to the selector.
- Source:
update()
Updates the selector display.
- Source:
updateSelection(selected)
Updates the underlying module:inPlaceApplicators~InPlaceApplicator and the selector display.
Parameters:
Name | Type | Description |
---|---|---|
selected |
number | Index of the selected in-place applicator subschema. |
- Source: