Alloy UI

aui-overlay  1.0.1

 
Filters

Class OverlayMask - extends OverlayBase

Known Subclasses:
ImageViewerMask DialogMask
A base class for OverlayMask, providing:
  • Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)
  • Cross browser mask functionality to cover an element or the entire page
  • Customizable mask (i.e., background, opacity)
Quick Example:
var instance = new A.OverlayMask().render();
Check the list of Configuration Attributes available for OverlayMask.

Constructor

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

Properties

OverlayMask.ATTRS - static Object

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

OverlayMask.NAME - static String

Static property provides a string to identify the class.

Properties inherited from WidgetStack:

Properties inherited from Attribute:

Properties inherited from Component:

Properties inherited from WidgetPositionAlign:

Properties inherited from Base:

Properties inherited from WidgetStdMod:

Properties inherited from WidgetPosition:

Properties inherited from WidgetPositionConstrain:

Configuration Attributes

alignPoints - Array

Points to align the Overlay used as mask.
Default Value: [ 'tl', 'tl' ]

background - String

Background color of the mask.
Default Value: null

opacity - Number

CSS opacity of the mask.
Default Value: .5

shim - boolean

Use shim option.
Default Value: True on IE.

target - Node | String

Node where the mask will be positioned and re-dimensioned. The default is the document, which means that if not specified the mask takes the full screen.
Default Value: document

visible - boolean

If true the Overlay is visible by default after the render phase. Inherited from Overlay.
Default Value: false

zIndex - Number

zIndex of the OverlayMask.
Default Value: 1000

Configuration attributes inherited from Widget:

Configuration attributes inherited from WidgetStack:

Configuration attributes inherited from Component:

Configuration attributes inherited from WidgetPositionAlign:

Configuration attributes inherited from Base:

Configuration attributes inherited from WidgetStdMod:

Configuration attributes inherited from WidgetPosition:

x,
xy,
y

Configuration attributes inherited from WidgetPositionConstrain:

Methods

_afterTargetChange

protected void _afterTargetChange ( event )
Fires after the value of the target attribute change.
Parameters:
event <EventFacade>

_afterVisibleChange

protected void _afterVisibleChange ( event )
Fires after the value of the visible attribute change.
Parameters:
event <EventFacade>

_setOpacity

protected Number _setOpacity ( v )
Setter for opacity.
Parameters:
v <Number>

_uiSetVisible

protected void _uiSetVisible ( val )
Invoke the OverlayMask.superclass._uiSetVisible. Used to reset the opacity to work around IE bugs when set opacity of hidden elements.
Parameters:
val <boolean>

bindUI

protected void bindUI ( )
Bind the events on the OverlayMask UI. Lifecycle.

getTargetSize

Object} Object containing the { height: height, width: width getTargetSize ( )
Get the size of the target. Used to dimension the mask node.
Returns: Object} Object containing the { height: height, width: width
.

refreshMask

void refreshMask ( )
Repaint the OverlayMask UI, respecting the target size and the alignPoints.

syncUI

protected void syncUI ( )
Sync the OverlayMask UI. Lifecycle.

Methods inherited from Plugin.Host:

Events

alignPointsChange

alignPointsChange ( event )
Fires when the value for the configuration attribute 'alignPoints' 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

backgroundChange

backgroundChange ( event )
Fires when the value for the configuration attribute 'background' 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

opacityChange

opacityChange ( event )
Fires when the value for the configuration attribute 'opacity' 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

shimChange

shimChange ( event )
Fires when the value for the configuration attribute 'shim' 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

targetChange

targetChange ( event )
Fires when the value for the configuration attribute 'target' 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

visibleChange

visibleChange ( event )
Fires when the value for the configuration attribute 'visible' 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

zIndexChange

zIndexChange ( event )
Fires when the value for the configuration attribute 'zIndex' 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 WidgetStack:

Events inherited from Base:

Events inherited from WidgetPosition: