Tooltip Class
<p><img src="assets/images/aui-tooltip/main.png"/></p>
A base class for Tooltip, providing: <ul> <li>Widget Lifecycle (initializer, renderUI, bindUI, syncUI, destructor)</li> <li>Additional information when hovering over a target element</li> </ul>
Quick Example:<br/>
<pre><code>var instance = new A.Tooltip({ trigger: '#element', align: { points: [ 'lc', 'rc' ] }, bodyContent: 'Simple tooltip' }).render(); </code></pre>
Check the list of <a href="Tooltip.html#configattributes">Configuration Attributes</a> available for Tooltip.
Constructor
Tooltip
-
config
Parameters:
-
config
ObjectObject literal specifying widget configuration properties.
Index
Methods
- _addShimResizeHandlers
- _addStdModContent
- _afterAlignChange
- _afterAlignOnChange
- _afterBodyChange
- _afterConstrainChange
- _afterFillHeightChange
- _afterFooterChange
- _afterHeaderChange
- _afterHideOnChange
- _afterShimChange
- _afterShowArrowChange
- _afterShowOnChange
- _afterTriggerChange
- _afterXYChange
- _afterZIndexChange
- _applyStdModParsedConfig
- _attachPosAlignUIHandles
- _beforeHideOnChange
- _beforeShow
- _beforeShowOnChange
- _beforeTriggerChange
- _bindUIPosAlign
- _bindUIPosConstrained
- _bindUIPosition
- _bindUIStack
- _bindUIStdMod
- _cancelAutoHide
- _constrain
- _constrainOnXYChange
- _destroyShim
- _detachPosAlignUIHandles
- _detachStackHandles
- _doAlign
- _enableConstraints
- _eraseStdMod
- _fillHeight
- _findStdModSection
- _getAlignedXY
- _getAlignToXY
- _getPreciseHeight
- _getRegion
- _getShimTemplate
- _getStdModContent
- _getStdModTemplate
- _getX
- _getY
- _insertStdModSection
- _invokeHideTaskOnInteraction
- _loadBodyContentFromTitle
- _onVisibleChangeOverlayContext
- _parseStdModHTML
- _parseZIndex
- _preventOverlap
- _renderElements
- _renderShim
- _renderShimDeferred
- _renderStdMod
- _renderUIPosition
- _renderUIStack
- _renderUIStdMod
- _setAlignCenter
- _setAnim
- _setConstrain
- _setHideDelay
- _setHideOn
- _setShowDelay
- _setShowOn
- _setStack
- _setX
- _setY
- _setZIndex
- _stopTriggerEventPropagation
- _syncElements
- _syncUIPosAlign
- _syncUIPosition
- _syncUIStack
- _syncUIStdMod
- _toggle
- _uiSetAlign
- _uiSetFillHeight
- _uiSetShim
- _uiSetStdMod
- _uiSetVisiblePosAlign
- _uiSetXY
- _uiSetZIndex
- _validateFillHeight
- _validateXY
- align
- bindUI
- centered
- clearIntervals
- constrain
- fillHeight
- fixPointerColor
- getAlignPoint
- getConstrainedXY
- getStdModNode
- hide
- initializer
- move
- refreshAlign
- renderUI
- setStdModContent
- show
- sizeShim
- syncUI
- syncXY
- toggle
- updateCurrentNode
Properties
- _posAlignUIHandles
- Tooltip.ATTRS static
- Tooltip.NAME static
Methods
_addShimResizeHandlers
()
private
Sets up event listeners to resize the shim when the size of the Widget changes. <p> NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to resize the shim purely through CSS, when the Widget does not have an explicit width/height set. </p>
_addStdModContent
-
node
-
children
-
where
Helper method to add content to a StdMod section node. The content is added either before, after or replaces the existing node content based on the value of the <code>where</code> argument.
Parameters:
-
node
Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section Node to be updated.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
children
Node | NodeList | String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The new content Node, NodeList or String to be added to section Node provided.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
where
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. If not provided, the content will replace existing content in the Node.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_afterAlignChange
-
e
Handles alignChange
events by updating the UI in response to align
Attribute changes.
Parameters:
_afterAlignOnChange
-
e
Handles alignOnChange
events by updating the alignment-syncing event
handlers.
Parameters:
_afterBodyChange
-
e
Fires after the attribute <code>bodyContent</code> change.
Parameters:
_afterConstrainChange
-
e
After change listener for the "constrain" attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event facade</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_afterFillHeightChange
-
e
Default attribute change listener for the fillHeight attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the attribute change</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_afterHeaderChange
-
e
Default attribute change listener for the headerContent attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the attribute change</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_afterHideOnChange
-
event
<p>Fires after the <a href="OverlayContext.html#config_hideOn">hideOn</a> attribute change.</p>
Parameters:
-
event
EventFacade
_afterShimChange
-
e
Default attribute change listener for the shim attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the attribute change</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_afterShowArrowChange
-
event
<p>Fires after showArrow attribute changes.</p>
Parameters:
-
event
EventFacade
_afterShowOnChange
-
event
<p>Fires after the <a href="OverlayContext.html#config_showOn">showOn</a> attribute change.</p>
Parameters:
-
event
EventFacade
_afterTriggerChange
-
event
<p>Fires after the <a href="OverlayContext.html#config_trigger">trigger</a> attribute change.</p>
Parameters:
-
event
EventFacade
_afterXYChange
-
e
Default attribute change listener for the xy attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the attribute change</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_afterZIndexChange
-
e
Default attribute change listener for the zIndex attribute, responsible for updating the UI, in response to attribute changes.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the attribute change</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_applyStdModParsedConfig
()
private
This method is injected before the _applyParsedConfig step in the application of HTML_PARSER, and sets up the state to identify whether or not we should remove the current DOM content or not, based on whether or not the current content attribute value was extracted from the DOM, or provided by the user configuration
_attachPosAlignUIHandles
()
protected
Attaches the alignment-syncing event handlers.
_beforeHideOnChange
-
event
<p>Fires before the <a href="OverlayContext.html#config_hideOn">hideOn</a> attribute change.</p>
Parameters:
-
event
EventFacade
_beforeShow
-
event
<p>Fires before show the OverlayContextPanel.</p>
Parameters:
-
event
EventFacade
_beforeShowOnChange
-
event
<p>Fires before the <a href="OverlayContext.html#config_showOn">showOn</a> attribute change.</p>
Parameters:
-
event
EventFacade
_beforeTriggerChange
-
event
<p>Fires before the <a href="OverlayContext.html#config_trigger">trigger</a> attribute change.</p>
Parameters:
-
event
EventFacade
_bindUIPosAlign
()
protected
Bind event listeners responsible for updating the UI state in response to the widget's position-align related state changes.
This method is invoked after bindUI
has been invoked for the Widget
class using the AOP infrastructure.
_bindUIPosConstrained
()
protected
Binds event listeners responsible for updating the UI state in response to Widget constrained positioning related state changes. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_bindUIPosition
()
protected
Binds event listeners responsible for updating the UI state in response to Widget position related state changes. <p> This method in invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_bindUIStack
()
protected
Binds event listeners responsible for updating the UI state in response to Widget stack related state changes. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_bindUIStdMod
()
protected
Binds event listeners responsible for updating the UI state in response to Widget standard module related state changes. <p> This method is invoked after bindUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_cancelAutoHide
-
event
<p>Cancel hide event if the user does some interaction with the OverlayContext (focus, click or mouseover).</p>
Parameters:
-
event
EventFacade
_constrain
-
val
-
axis
-
nodeRegion
-
constrainingRegion
The method which performs the actual constrain calculations for a given axis ("x" or "y") based on the regions provided.
Parameters:
-
val
Number<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value to constrain</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
axis
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The axis to use for constrainment</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
nodeRegion
Region<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The region of the node to constrain</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
constrainingRegion
Region<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The region of the node (or viewport) to constrain to</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The constrained value</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_constrainOnXYChange
-
e
The on change listener for the "xy" attribute. Modifies the event facade's newVal property with the constrained XY value.
Parameters:
-
e
EventFacade<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The event facade for the attribute change</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_destroyShim
()
private
Removes the shim from the DOM, and detaches any related event listeners.
_detachPosAlignUIHandles
()
protected
Detaches the alignment-syncing event handlers.
_detachStackHandles
-
String
Detaches any handles stored for the provided key
Parameters:
-
String
Object<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>handleKey The key defining the group of handles which should be detached</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_doAlign
-
xy
Helper method, used to align the given point on the widget, with the XY page coordinates provided.
Parameters:
-
xy
Array<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>XY page coordinates to align to.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_enableConstraints
-
enable
Updates the UI if enabling constraints, and sets up the xyChange event listeners to constrain whenever the widget is moved. Disabling constraints removes the listeners.
Parameters:
-
enable
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Enable or disable constraints</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_eraseStdMod
-
section
Removes the DOM node for the given section.
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section to remove. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_fillHeight
()
private
Updates the rendered UI, to resize the current section specified by the fillHeight attribute, so that the standard module fills out the Widget height. If a height has not been set on Widget, the section is not resized (height is set to "auto").
_findStdModSection
-
section
Helper method to to find the rendered node for the given section, if it exists.
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section for which the render Node is to be found. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The rendered node for the given section, or null if not found.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getAlignedXY
-
[node]
-
points
Returns Widget
alignment coordinates realative to the given Node
.
Parameters:
-
[node]
Node | String | Null optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node to align to, or null to indicate the viewport.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
points
Array<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The alignment points.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the coordinates.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getAlignToXY
-
'Node'
-
[point]
-
'Node'
-
'Node'
Returns coordinates realative to the passed Node
alignment.
Parameters:
-
'Node'
Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node to align to.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[point]
Array optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node alignment points.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
'Node'
Number<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>x coordinate.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
'Node'
Number<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>y coordinate.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the coordinates.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getPreciseHeight
-
node
Helper method to obtain the precise height of the node provided, including padding and border. The height could be a sub-pixel value for certain browsers, such as Firefox 3.
Parameters:
-
node
Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node for which the precise height is required.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The height of the Node including borders and padding, possibly a float.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getRegion
-
[node]
Returns the region of the passed-in Node
, or the viewport region if
calling with passing in a Node
.
Parameters:
-
[node]
Node optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node to get the region of.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node's region.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getShimTemplate
()
Node
private
Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>node A new shim Node instance.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getStdModContent
-
section
Retrieves the child nodes (content) of a standard module section
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The standard module section whose child nodes are to be retrieved. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The child node collection of the standard module section.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getStdModTemplate
-
section
Gets a new Node reference for the given standard module section, by cloning the stored template node.
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section to create a new node for. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The new Node instance for the section</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getX
()
Number
protected
Default getter for the X attribute. The value is retrieved from the XY attribute, which is the sole store for the XY state.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The X page co-ordinate value</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_getY
()
Number
protected
Default getter for the Y attribute. The value is retrieved from the XY attribute, which is the sole store for the XY state.
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The Y page co-ordinate value</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_insertStdModSection
-
contentBox
-
section
-
sectionNode
Helper method to insert the Node for the given section into the correct location in the contentBox.
Parameters:
-
contentBox
Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the Widgets content box.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
sectionNode
Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The Node for the section.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_invokeHideTaskOnInteraction
-
event
<p>Invoke the hide event when the OverlayContext looses the focus.</p>
Parameters:
-
event
EventFacade
_loadBodyContentFromTitle
-
currentNode
Use the <code>title</code> content of the <code>currentNode</code> as the content of the Tooltip.
Parameters:
-
currentNode
NodeCurrent node being used by the Tooltip
_onVisibleChangeOverlayContext
-
event
<p>Fires when the <a href="OverlayContext.html#config_visible">visible</a> attribute changes.</p>
Parameters:
-
event
EventFacade
_parseStdModHTML
-
section
Utility method, used by WidgetStdMods HTML_PARSER implementation to extract data for each section from markup.
Parameters:
-
section
String
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Inner HTML string with the contents of the section</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_parseZIndex
-
srcNode
Parses a zIndex
attribute value from this widget's srcNode
.
Parameters:
-
srcNode
Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node to parse a <code>zIndex</code> value from.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The parsed <code>zIndex</code> value.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_preventOverlap
-
val
-
axis
-
nodeRegion
-
constrainingRegion
The method which performs the preventOverlap calculations for a given axis ("x" or "y") based on the value and regions provided.
Parameters:
-
val
Number<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The value being constrain</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
axis
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The axis to being constrained</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
nodeRegion
Region<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The region of the node being constrained</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
constrainingRegion
Region<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The region of the node (or viewport) we need to constrain to</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The constrained value</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_renderElements
()
protected
<p>Render DOM elements for the OverlayContextPanel.</p>
_renderShim
()
private
Creates the shim element and adds it to the DOM
_renderShimDeferred
()
private
Sets up change handlers for the visible attribute, to defer shim creation/rendering until the Widget is made visible.
_renderStdMod
-
section
Creates the DOM node for the given section, and inserts it into the correct location in the contentBox.
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section to create/render. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A reference to the added section node</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_renderUIPosition
()
protected
Creates/Initializes the DOM to support xy page positioning. <p> This method in invoked after renderUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_renderUIStack
()
protected
Creates/Initializes the DOM to support stackability. <p> This method in invoked after renderUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_renderUIStdMod
()
protected
Creates/Initializes the DOM for standard module support. <p> This method is invoked after renderUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_setAlignCenter
-
val
Default setter for center
Attribute changes. Sets up the appropriate
value, and passes it through the to the align attribute.
Parameters:
-
val
Boolean | Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The Attribute value being set.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>the value passed in.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setAnim
-
value
<p>Setter for the <a href="OverlayContextPanel.html#config_anim">anim</a> attribute.</p>
Parameters:
-
value
Object
Returns:
_setConstrain
-
val
The setter implementation for the "constrain" attribute.
Parameters:
-
val
Node | boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The attribute value</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setHideDelay
-
val
<p>Setter for the <a href="OverlayContext.html#config_hideDelay">hideDelay</a> attribute.</p>
Parameters:
-
val
Number
Returns:
_setHideOn
-
eventType
<p>Setter for the <a href="OverlayContext.html#config_hideOn">hideOn</a> attribute.</p>
Parameters:
-
eventType
String<p><p><p>Event type</p></p></p>
Returns:
_setShowDelay
-
val
<p>Setter for the <a href="OverlayContext.html#config_showDelay">showDelay</a> attribute.</p>
Parameters:
-
val
Number
Returns:
_setShowOn
-
eventType
<p>Setter for the <a href="OverlayContext.html#config_showOn">showOn</a> attribute.</p>
Parameters:
-
eventType
String<p><p><p>Event type</p></p></p>
Returns:
_setStack
-
value
<p>Setter for the <a href="OverlayContextPanel.html#config_stack">stack</a> attribute.</p>
Parameters:
-
value
Boolean
Returns:
_setX
-
val
Default setter for the X attribute. The setter passes the X value through to the XY attribute, which is the sole store for the XY state.
Parameters:
-
val
Number<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The X page co-ordinate value</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setY
-
val
Default setter for the Y attribute. The setter passes the Y value through to the XY attribute, which is the sole store for the XY state.
Parameters:
-
val
Number<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The Y page co-ordinate value</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_setZIndex
-
zIndex
Default setter for zIndex attribute changes. Normalizes zIndex values to numbers, converting non-numerical values to 0.
Parameters:
-
zIndex
String | Number
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Normalized zIndex</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_stopTriggerEventPropagation
-
event
<p>Helper method to invoke event.stopPropagation().</p>
Parameters:
-
event
EventFacade
_syncElements
()
protected
<p>Sync the UI of the OverlayContextPanel elements.</p>
_syncUIPosAlign
()
protected
Synchronizes the current align
Attribute value to the DOM.
This method is invoked after syncUI
has been invoked for the Widget
class using the AOP infrastructure.
_syncUIPosition
()
protected
Synchronizes the UI to match the Widgets xy page position state. <p> This method in invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_syncUIStack
()
protected
Synchronizes the UI to match the Widgets stack state. This method in invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure.
_syncUIStdMod
()
protected
Synchronizes the UI to match the Widgets standard module state. <p> This method is invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure. </p>
_toggle
-
event
<p>Handles the logic for the <a href="OverlayContext.html#method_toggle">toggle</a>.</p>
Parameters:
-
event
EventFacade
_uiSetAlign
-
[node]
-
points
Updates the UI to reflect the align
value passed in.
Note: See the align
Attribute documentation, for the Object structure
expected.
Parameters:
-
[node]
Node | String | Null optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node to align to, or null to indicate the viewport.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
points
Array<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The alignment points.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetFillHeight
-
fillSection
Updates the rendered UI, to resize the provided section so that the standard module fills out the specified widget height. Note: This method does not check whether or not a height is set on the Widget.
Parameters:
-
fillSection
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetShim
-
enable
Updates the UI to enable/disable the shim. If the widget is not currently visible, creation of the shim is deferred until it is made visible, for performance reasons.
Parameters:
-
enable
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>If true, creates/renders the shim, if false, removes it.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetStdMod
-
section
-
content
-
where
Updates the rendered UI, adding the provided content (either an HTML string, or node reference), to the specified section. The content is either added before, after or replaces existing content in the section, based on the value of the <code>where</code> argument.
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
content
String | Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The new content (either as an HTML string, or Node reference) to add to the section</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
where
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. If not provided, the content will replace existing content in the section.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetVisiblePosAlign
-
visible
Attaches or detaches alignment-syncing event handlers based on the widget's
visible
Attribute state.
Parameters:
-
visible
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The current value of the widget's <code>visible</code> Attribute.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetXY
-
val
Updates the UI to reflect the XY page co-ordinates passed in.
Parameters:
-
val
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The XY page co-ordinates value to be reflected in the UI</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_uiSetZIndex
-
zIndex
Updates the UI to reflect the zIndex value passed in.
Parameters:
-
zIndex
Number<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The zindex to be reflected in the UI</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_validateFillHeight
-
val
Default validator for the fillHeight attribute. Verifies that the value set is a valid section specifier - one of WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER, or a falsey value if fillHeight is to be disabled.
Parameters:
-
val
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section which should be setup to fill height, or false/null to disable fillHeight</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>true if valid, false if not</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
_validateXY
-
val
Default validator for the XY attribute
Parameters:
-
val
Array<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The XY page co-ordinate value which is being set.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>true if valid, false if not.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
align
-
node
-
points
<p>Aligns the OverlayContextPanel to the provided node (or viewport) using the provided points. Inherited from <a href="Overlay.html#method_align">Overlay</a>.</p>
Parameters:
-
node
Node | String | null<p>A reference (or selector string) for the Node which with the OverlayContextPanel is to be aligned.</p>
-
points
Array2<p>A two element array, specifying the points on the OverlayContextPanel and node/viewport which need to be aligned.</p>
bindUI
()
protected
Bind the events on the Tooltip UI. Lifecycle.
centered
-
[node]
Centers the widget in the viewport, or if a Node
is passed in, it will
be centered to that Node
.
Parameters:
-
[node]
Node | String optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>A <code>Node</code> reference or selector String defining the <code>Node</code> which the widget should be centered. If a <code>Node</code> is not passed in, then the widget will be centered to the viewport.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
clearIntervals
()
<p>Clear the intervals to show or hide the OverlayContext. See <a href="OverlayContext.html#config_hideDelay">hideDelay</a> and <a href="OverlayContext.html#config_showDelay">showDelay</a>.</p>
constrain
-
xy
-
node
Constrains the widget's bounding box to a node (or the viewport). If xy or node are not passed in, the current position and the value of "constrain" will be used respectively.
The widget's position will be changed to the constrained position.
Parameters:
-
xy
Array<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. The xy values to constrain</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
node
Node | boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. The node to constrain to, or true for the viewport</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
fillHeight
-
node
Sets the height on the provided header, body or footer element to fill out the height of the Widget. It determines the height of the widgets bounding box, based on it's configured height value, and sets the height of the provided section to fill out any space remaining after the other standard module section heights have been accounted for.
<p><strong>NOTE:</strong> This method is not designed to work if an explicit height has not been set on the Widget, since for an "auto" height Widget, the heights of the header/body/footer will drive the height of the Widget.</p>
Parameters:
-
node
Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node which should be resized to fill out the height of the Widget bounding box. Should be a standard module section node which belongs to the widget.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
fixPointerColor
()
<p>OverlayContextPanel uses a imageless arrow, which involves some CSS technics. This method is meant to fix the color of the borders of the arrow.</p>
getAlignPoint
()
String
<p>Normalize the align point value. The align point 'cc' is not a valid position for the arrow and then it's normalized to the 'bc' point.</p>
Returns:
getConstrainedXY
-
xy
-
node
Calculates the constrained positions for the XY positions provided, using the provided node argument is passed in. If no node value is passed in, the value of the "constrain" attribute is used.
Parameters:
-
xy
Array<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The xy values to constrain</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
node
Node | boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. The node to constrain to, or true for the viewport</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The constrained xy values</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
getStdModNode
-
section
-
forceCreate
Returns the node reference for the specified section
.
Note: The DOM is not queried for the node reference. The reference
stored by the widget instance is returned if it was set. Passing a
truthy for forceCreate
will create the section node if it does not
already exist.
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The section whose node reference is required. Either <code>WidgetStdMod.HEADER</code>, <code>WidgetStdMod.BODY</code>, or <code>WidgetStdMod.FOOTER</code>.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
forceCreate
Boolean<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Whether the section node should be created if it does not already exist.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
Returns:
<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The node reference for the <code>section</code>, or null if not set.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
initializer
()
protected
<p>Construction logic executed during OverlayContext instantiation. Lifecycle.</p>
move
-
x
-
[y]
Moves the Widget to the specified page xy co-ordinate position.
Parameters:
-
x
Number | Number[]<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The new x position or [x, y] values passed as an array to support simple pass through of Node.getXY results</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
[y]
Number optional<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The new y position</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
refreshAlign
()
<p>Refreshes the alignment of the OverlayContext with the <a href="OverlayContext.html#config_currentNode">currentNode</a>. See also <a href="OverlayContext.html#config_align">align</a>.</p>
renderUI
()
protected
<p>Create the DOM structure for the OverlayContextPanel. Lifecycle.</p>
setStdModContent
-
section
-
content
-
where
Updates the body section of the standard module with the content provided (either an HTML string, or node reference). <p> This method can be used instead of the corresponding section content attribute if you'd like to retain the current content of the section, and insert content before or after it, by specifying the <code>where</code> argument. </p>
Parameters:
-
section
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The standard module section whose content is to be updated. Either WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
content
String | Node<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>The content to be added, either an HTML string or a Node reference.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
-
where
String<p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p><p>Optional. Either WidgetStdMod.AFTER, WidgetStdMod.BEFORE or WidgetStdMod.REPLACE. If not provided, the content will replace existing content in the section.</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>
show
()
Over-ride the <code>show</code> to invoke the <a href="Tooltip.html#method__loadBodyContentFromTitle">_loadBodyContentFromTitle</a>. See <a href="OverlayContext.html#config_show">OverlayContext show</a>.
sizeShim
()
For IE6, synchronizes the size and position of iframe shim to that of Widget bounding box which it is protecting. For all other browsers, this method does not do anything.
syncUI
()
protected
<p>Sync the OverlayContextPanel UI. Lifecycle.</p>
syncXY
()
Synchronizes the Panel's "xy", "x", and "y" properties with the Widget's position in the DOM.
updateCurrentNode
-
event
<p>Update the <a href="OverlayContext.html#config_currentNode">currentNode</a> with the <a href="OverlayContext.html#config_align">align</a> node or the event.currentTarget and in last case with the first item of the <a href="OverlayContext.html#config_trigger">trigger</a>.</p>
Parameters:
-
event
EventFacade
Properties
_posAlignUIHandles
Array
protected
Holds the alignment-syncing event handles.
Default: null
Tooltip.ATTRS
Object
static
Static property used to define the default attribute configuration for the Tooltip.
Tooltip.NAME
String
static
Static property provides a string to identify the class.
Attributes
align
Object
See <a href="Overlay.html#config_align">OverlayContextPanel align</a>.
Default: { node: null, points: [ BL, TR ] }
alignOn
Array
An Array of Objects corresponding to the Node
s and events that will cause
the alignment of this widget to be synced to the DOM.
The alignOn
Attribute is expected to be an Array of Objects with the
following properties:
-
__
eventName
__: The String event name to listen for. -
__
node
__: The optionalNode
that will fire the event, it can be aNode
reference or a selector String. This will default to the widget'sboundingBox
.
Default: []
Example:
Sync this widget's alignment on window resize:
myWidget.set('alignOn', [
{
node : Y.one('win'),
eventName: 'resize'
}
]);
anim
Object
See <a href="OverlayContextPanel.html#config_anim">OverlayContextPanel anim</a>.
Default: { show: false }
arrow
String
<p>Position where the arrow will be placed. See <a href="OverlayContextPanel.html#config_showArrow">showArrow</a>. If it's not set, it will get the value set on the <a href="OverlayContext.html#config_align">align</a> point. Here is a list of valid arrows 'bc', 'bl', 'br', 'cc', 'lb', 'lc', 'lt', 'rb', 'rc', 'rl'.</p>
Default: null
bodyContent
HTML
The content to be added to the body section. This will replace any existing content in the body. If you want to append, or insert new content, use the <a href="#method_setStdModContent">setStdModContent</a> method.
Default: undefined
cancellableHide
Boolean
<p>Cancel auto hide delay if the user interact with the Overlay (focus, click, mouseover)</p>
Default: true
centered
Boolean | Node
A convenience Attribute, which can be used as a shortcut for the align
Attribute.
If set to true
, the widget is centered in the viewport. If set to a Node
reference or valid selector String, the widget will be centered within the
Node
. If set to false
, no center positioning is applied.
Default: false
constrain
Boolean | Node
The node to constrain the widget's bounding box to, when setting xy. Can also be set to true, to constrain to the viewport.
Default: null
currentNode
Node
<p>OverlayContext allow multiple elements to be the <a href="OverlayContext.html#config_trigger">trigger</a>, the currentNode stores the current active one.</p>
Default: First item of the <a href="OverlayContext.html#config_trigger">trigger</a> NodeList.
fillHeight
String
The section (WidgetStdMod.HEADER, WidgetStdMod.BODY or WidgetStdMod.FOOTER) which should be resized to fill the height of the standard module, when a height is set on the Widget. If a height is not set on the widget, then all sections are sized based on their content.
Default: WidgetStdMod.BODY
headerContent
HTML
The content to be added to the header section. This will replace any existing content in the header. If you want to append, or insert new content, use the <a href="#method_setStdModContent">setStdModContent</a> method.
Default: undefined
hideDelay
Number
See <a href="OverlayContext.html#config_hideDelay">OverlayContext hideDelay</a>.
Default: 500
hideOn
String
See <a href="OverlayContext.html#config_showOn">OverlayContext showOn</a>.
Default: mouseout
hideOnDocumentClick
Boolean
<p>If true the instance is registered on the <a href="OverlayContextManager.html">OverlayContextManager</a> static class and will be hide when the user click on document.</p>
Default: true
preventOverlap
Boolean
If set to true, and WidgetPositionAlign is also added to the Widget, constrained positioning will attempt to prevent the widget's bounding box from overlapping the element to which it has been aligned, by flipping the orientation of the alignment for corner based alignments
shim
Boolean
Boolean flag to indicate whether or not a shim should be added to the Widgets boundingBox, to protect it from select box bleedthrough.
Default: false, for all browsers other than IE6, for which a shim is enabled by default.
showArrow
Boolean
<p>If true the OverlayContextPanel will show an arrow positioned on the <a href="OverlayContextPanel.html#config_arrow">arrow</a> point.</p>
Default: true
showDelay
Number
<p>Number of milliseconds after the show method is invoked to show the OverlayContext.</p>
Default: 0
showOn
String
See <a href="OverlayContext.html#config_showOn">OverlayContext showOn</a>.
Default: mouseover
title
Boolean
Use the content of the <code>title</code> attribute as the Tooltip content.
Default: false
trigger
Node | NodeList | String
<p>Node, NodeList or Selector which will be used as trigger elements to show or hide the OverlayContext.</p>
Default: null
visible
Boolean
<p>If true the OverlayContext is visible by default after the render phase. Inherited from <a href="Overlay.html">Overlay</a>.</p>
Default: false
x
Number
Page X co-ordinate for the widget. This attribute acts as a facade for the xy attribute. Changes in position can be monitored by listening for xyChange events.
Default: 0
y
Number
Page Y co-ordinate for the widget. This attribute acts as a facade for the xy attribute. Changes in position can be monitored by listening for xyChange events.
Default: 0
zIndex
Number
The z-index to apply to the Widgets boundingBox. Non-numerical values for zIndex will be converted to 0
Default: 0