Search

11/11/2009

yui panel - fixedcenter:contained

http://developer.yahoo.com/yui/docs/YAHOO.widget.Overlay.html#config_fixedcenter

fixedcenter - Boolean | String
Determines whether or not the Overlay should be anchored to the center of the viewport.

This property can be set to:

true
To enable fixed center positioning

When enabled, the overlay will be positioned in the center of viewport when initially displayed, and will remain in the center of the viewport whenever the window is scrolled or resized.

If the overlay is too big for the viewport, it's top left corner will be aligned with the top left corner of the viewport.
false
To disable fixed center positioning.

In this case the overlay can still be centered as a one-off operation, by invoking the center() method, however it will not remain centered when the window is scrolled/resized.
"contained"
To enable fixed center positioning, as with the true option.

However, unlike setting the property to true, when the property is set to "contained", if the overlay is too big for the viewport, it will not get automatically centered when the user scrolls or resizes the window (until the window is large enough to contain the overlay). This is useful in cases where the Overlay has both header and footer UI controls which the user may need to access.


YUI 2: Overlay
fixedcenter Boolean / String false

Specifies whether the Overlay should be automatically centered in the viewport on window scroll and resize.

It also supports the string value "contained", which will enable fixed center behavior, but only if the Overlay fits within the viewport. If the Overlay is larger than the viewport, automatic fixed centering will be disabled until the viewport is large enough to contain the Overlay.

沒有留言: