Constructor
# new DuAECompSelector()
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
id |
int
|
<optional> |
0 | The current compitem id, 0 if None |
comps |
Array.<CompItem>
|
<optional> |
The compositions listed in the selector. | |
onChange |
Selector~onChange
|
The function to execute when the index changes. You can set your own function here, which must take no argument. The method is called after the index has changed. |
||
filterComps |
Selector~filterComps
|
A function which gets the comps to set in the selector. The default function will get all the comps in the project, You can set your own function here, which must take no argument. The function must return an array of CompItem. |
Methods
# static refresh(compsopt)
Refreshes the comp list
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
comps |
Array.<CompItem>
|
<optional> |
The list of compositions. By default, will use DuAECompSelector.filterComps() to get the comps. |
# static setCurrentId(index)
Changes the selection and the current comp id of the selector
Parameters:
Name | Type | Description |
---|---|---|
index |
int
|
The new comp id |
Type Definitions
# filterComps() → {Array.<CompItem>}
A function which gets the comps to set in the selector.
The default function will get all the comps in the project,
assign another function to this callback if you need to filter these comps.
The function must return an array of CompItem.
The default function will get all the comps in the project,
assign another function to this callback if you need to filter these comps.
The function must return an array of CompItem.
The compositions to set in the selector.
Array.<CompItem>
# onChange()
The function to execute when the index changes.
The method is called after the index has changed.
The method is called after the index has changed.