Constructor
# new Toggle(opts)
Initialization object
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
opts |
object
|
Button options. |
||
className |
string
|
<optional> |
class of the control |
|
title |
number
|
<optional> |
title of the control |
|
html |
number
|
<optional> |
html to insert in the control |
|
active |
boolean
|
<optional> |
false | the control is created active, default false |
disable |
boolean
|
<optional> |
false | the control is created disabled, default false |
bar |
Bar
|
<optional> |
a subbar associated with the control (drawn when active if control is nested in a Bar) |
|
onToggle |
function
|
<optional> |
callback when control is clicked (or use change:active event) |
- Tutorials:
Classes
Methods
# getActive() → {boolean}
Gets the control's active state. Returns true if the control is active.
boolean
# getDisable() → {boolean}
Gets the control's disable state. Returns true if the control is disabled.
boolean
# setDisable(disable)
Disables the control. If disabled, the control will be deactivated too.
Parameters:
Name | Type | Description |
---|---|---|
disable |
boolean
|