Alloy UI

aui-overlay  1.0.1

 
Filters

Class OverlayManager - extends Base

Known Subclasses:
OverlayContextPanelManager DialogManager OverlayContextManager CalendarManager

A base class for OverlayManager, providing:
  • Grouping overlays
  • Show or hide the entire group of registered overlays
  • Basic Overlay Stackability (zIndex support)
Quick Example:
var groupOverlayManager = new A.OverlayManager();
groupOverlayManager.register([overlay1, overlay2, overlay3]);
groupOverlayManager.hideAll();
Check the list of Configuration Attributes available for OverlayManager.

Constructor

OverlayManager ( config )
Parameters:
config <Object> Object literal specifying widget configuration properties.

Properties

OverlayManager.ATTRS - static Object

Static property used to define the default attribute configuration for the OverlayManager.

OverlayManager.NAME - static String

Static property provides a string to identify the class.

Properties inherited from Attribute:

Properties inherited from Base:

Configuration Attributes

zIndexBase - Number

The zIndex base to be used on the stacking for all overlays registered on the OverlayManager.
Default Value: 1000

Configuration attributes inherited from Base:

Methods

_onFocusedChange

protected void _onFocusedChange ( event )
Fires when the focused attribute change. Used to invoke bringToTop.
Parameters:
event <EventFacade>

_onMouseDown

protected void _onMouseDown ( event )
Mousedown event handler, used to invoke bringToTop.
Parameters:
event <EventFacade>

_registered

protected boolean _registered ( overlay )
Check if the overlay is registered.
Parameters:
overlay <Overlay> Overlay

bringToTop

void bringToTop ( overlay )
Set the passed overlay zIndex to the highest value.
Parameters:
overlay <Overlay> Instance of Overlay.

destructor

protected void destructor ( )
Descructor lifecycle implementation for the OverlayManager class. Purges events attached to the node (and all child nodes).

each

null each ( fn )
Loop through all registered Overlay and execute a callback.
Parameters:
fn <function> Callback to be executed on the Array.each

hideAll

void hideAll ( )
Invoke the hide method from all registered Overlays.

initializer

protected void initializer ( )
Construction logic executed during OverlayManager instantiation. Lifecycle.

register

Array register ( overlay )
Register the passed Overlay to this OverlayManager.
Parameters:
overlay <Overlay> Overlay instance to be registered
Returns: Array
Registered overlays

remove

null remove ( overlay )
Remove the passed Overlay from this OverlayManager.
Parameters:
overlay <Overlay> Overlay instance to be removed

showAll

void showAll ( )
Invoke the show method from all registered Overlays.

sortByZIndexDesc

Number sortByZIndexDesc ( a , b )
zIndex comparator. Used on Array.sort.
Parameters:
a <Overlay> Overlay
b <Overlay> Overlay

Events

zIndexBaseChange

zIndexBaseChange ( event )
Fires when the value for the configuration attribute 'zIndexBase' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event<Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Events inherited from Base: