Plugin.Align Class
yui3/src/node/js/align-plugin.js:11
Node plugin which can be used to align a node with another node, region, or the viewport.
Methods
center
-
region
Aligns the center of a node to the center of another node or region.
Parameters:
-
region
Node | HTMLElement | Objectoptional The node or region to align with. Defaults to the viewport region. the window is resized. If centering to viewport, this defaults to true, otherwise default is false.
destroy
()
Removes the resize handler, if any. This is called automatically when unplugged from the host node.
to
-
region
-
regionPoint
-
point
-
resize
Aligns node with a point on another node or region. Possible alignment points are: <dl> <dt>tl</dt> <dd>top left</dd> <dt>tr</dt> <dd>top right</dd> <dt>bl</dt> <dd>bottom left</dd> <dt>br</dt> <dd>bottom right</dd> <dt>tc</dt> <dd>top center</dd> <dt>bc</dt> <dd>bottom center</dd> <dt>rc</dt> <dd>right center</dd> <dt>lc</dt> <dd>left center</dd> <dt>cc</dt> <dd>center center</dd> </dl>
Parameters:
-
region
String | Node | HTMLElement | ObjectThe node or region to align with. Defaults to the viewport region.
-
regionPoint
StringThe point of the region to align with.
-
point
StringThe point of the node aligned to the region.
-
resize
BooleanWhether or not the node should re-align when the window is resized. Defaults to false.