Constructor
# new Settings(props)
Link the DOM elements (panel, buttons and overlay)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
props |
object
|
null | Properties effects. |
panel |
object
|
||
panel.trans |
object
|
||
panel.trans.effect |
string
|
Effect name. One of slide, fade or none. Default slide. |
|
panel.trans.duration |
string
|
Duration of the effect in milliseconds. Default 300. |
|
overlay |
object
|
||
panel.trans |
object
|
||
overlay.trans.effect |
string
|
Effect name. One of slide, fade or none. Default fade. |
|
overlay.trans.duration |
string
|
Duration of the effect in milliseconds. Default 100. |
Methods
# addOption(option)
Add an option to the panel.
Parameters:
Name | Type | Description |
---|---|---|
option |
BaseField
|
Any kind of field for add. |
# cancel()
Restore the settings before open the panel and close the panel.
# setListeners()
Add listeners for the buttons of the panel and for the overlay.