new UWA.Controls.Overlay(options)
The Overlay control is designed to create modal with custom content inside that fade when you close it.
Available Events
Event | Description |
---|---|
onPreOpen |
Triggered when the container is about to be opened |
onOpen |
Triggered when the container is fully visible |
onPreClose |
Triggered when the container is about to be closed |
onClose |
riggered when the container is fully hidden |
Example
var myOverlay = new UWA.Controls.Overlay();
myOverlay.inject(widget.body);
myOverlay.open();
Parameters
Name | Type | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Options hash or a option/value pair. Properties
|
Extends
- UWA.Controls.Abstract
Index
Members
-
name :String
-
Class name assigned to the parent element of the control.
Type
- String
Methods
-
closeOverlays(cb)
-
Close all overlays present in any level of the parent element of this overlay.
Parameters
Name Type Argument Description cb
Function <optional>
called when all overlays are closed
-
onFxComplete()
-
Triggered when the fx is complete.
-
isOpen() → {Boolean}
-
Check the state of this overlay.
Returns
true
if the overlay is open.- Type
- Boolean
-
open() → {this}
-
Open the overlay.
Returns
- Type
- this
-
close() → {this}
-
Close the overlay.
Returns
- Type
- this
-
toggle(y) → {this}
-
Toggle the overlay.
Parameters
Name Type Argument Description y
Boolean <optional>
Force the overlay to open or close
Returns
- Type
- this
-
resize(reset)
-
Resize the first positionned parent element with the same height of the content if necessary.
Parameters
Name Type Description reset
Boolean true
to reset parent to its initial height