1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- <div class="body-wrap">
- <div class="top-tools">
- <a class="inner-link" href="#Ext.layout.AnchorLayout-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
- <a class="inner-link" href="#Ext.layout.AnchorLayout-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
- <a class="inner-link" href="#Ext.layout.AnchorLayout-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
- <a class="inner-link" href="#Ext.layout.AnchorLayout-configs"><img src="../resources/images/default/s.gif" class="item-icon icon-config">Config Options</a>
- <a class="bookmark" href="../docs/?class=Ext.layout.AnchorLayout"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
- </div>
- <div class="inheritance res-block">
- <pre class="res-block-inner"><a ext:cls="Ext.layout.ContainerLayout" ext:member="" href="output/Ext.layout.ContainerLayout.html">ContainerLayout</a>
- <img src="resources/elbow-end.gif"/>AnchorLayout</pre></div>
- <h1>Class Ext.layout.AnchorLayout</h1>
- <table cellspacing="0">
- <tr><td class="label">Package:</td><td class="hd-info">Ext.layout</td></tr>
- <tr><td class="label">Defined In:</td><td class="hd-info"><a href="../src/AnchorLayout.js" target="_blank">AnchorLayout.js</a></td></tr>
- <tr><td class="label">Class:</td><td class="hd-info">AnchorLayout</td></tr>
- <tr><td class="label">Subclasses:</td><td class="hd-info"><a ext:cls="Ext.layout.AbsoluteLayout" href="output/Ext.layout.AbsoluteLayout.html">AbsoluteLayout</a>, <a ext:cls="Ext.layout.FormLayout" href="output/Ext.layout.FormLayout.html">FormLayout</a></td></tr>
- <tr><td class="label">Extends:</td><td class="hd-info"><a ext:cls="Ext.layout.ContainerLayout" ext:member="" href="output/Ext.layout.ContainerLayout.html">ContainerLayout</a></td></tr>
- </table>
- <div class="description">
- <p>This is a layout that enables anchoring of contained elements relative to the container's dimensions. If
- the container is resized, all anchored items are automatically rerendered according to their anchor rules.
- This class is intended to be extended or created via the layout:'anchor' <a ext:cls="Ext.Container" ext:member="layout" href="output/Ext.Container.html#layout">Ext.Container.layout</a> config,
- and should generally not need to be created directly via the new keyword.</p>
- <p>AnchorLayout does not have any direct config options (other than inherited ones). However, the container
- using the AnchorLayout can supply an anchoring-specific config property of <b>anchorSize</b>. By default,
- AnchorLayout will calculate anchor measurements based on the size of the container itself. However, if
- anchorSize is specifed, the layout will use it as a virtual container for the purposes of calculating anchor
- measurements based on it instead, allowing the container to be sized independently of the anchoring logic if necessary.</p>
- <p>The items added to an AnchorLayout can also supply an anchoring-specific config property of <b>anchor</b> which
- is a string containing two values: the horizontal anchor value and the vertical anchor value (for example, '100% 50%').
- This value is what tells the layout how the item should be anchored to the container. The following types of
- anchor values are supported:
- <ul>
- <li><b>Percentage</b>: Any value between 1 and 100, expressed as a percentage. The first anchor is the percentage
- width that the item should take up within the container, and the second is the percentage height. Example: '100% 50%'
- would render an item the complete width of the container and 1/2 its height. If only one anchor value is supplied
- it is assumed to be the width value and the height will default to auto.</li>
- <li><b>Offsets</b>: Any positive or negative integer value. The first anchor is the offset from the right edge of
- the container, and the second is the offset from the bottom edge. Example: '-50 -100' would render an item the
- complete width of the container minus 50 pixels and the complete height minus 100 pixels. If only one anchor value
- is supplied it is assumed to be the right offset value and the bottom offset will default to 0.</li>
- <li><b>Sides</b>: Valid values are 'right' (or 'r') and 'bottom' (or 'b'). Either the container must have a fixed
- size or an anchorSize config value defined at render time in order for these to have any effect.</li>
- </ul>
- <p>Anchor values can also be mixed as needed. For example, '-50 75%' would render the width offset from the
- container right edge by 50 pixels and 75% of the container's height.</p> </div>
-
- <div class="hr"></div>
- <a id="Ext.layout.AnchorLayout-configs"></a>
- <h2>Config Options</h2>
- <table cellspacing="0" class="member-table">
- <tr>
- <th class="sig-header" colspan="2">Config Options</th>
- <th class="msource-header">Defined By</th>
- </tr>
- <tr class="config-row inherited expandable">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
- <td class="sig">
- <a id="Ext.layout.AnchorLayout-extraCls"></a>
- <b>extraCls</b> : String <div class="mdesc">
- <div class="short">An optional extra CSS class that will be added to the container (defaults to ''). This can be useful for adding custo...</div>
- <div class="long">
- An optional extra CSS class that will be added to the container (defaults to ''). This can be useful for adding customized styles to the container or any of its children using standard CSS rules. </div>
- </div>
- </td>
- <td class="msource"><a ext:cls="Ext.layout.ContainerLayout" ext:member="#extraCls" href="output/Ext.layout.ContainerLayout.html#extraCls">ContainerLayout</a></td>
- </tr>
- <tr class="config-row inherited alt">
- <td class="micon"><a class="exi" href="#expand"> </a></td>
- <td class="sig">
- <a id="Ext.layout.AnchorLayout-renderHidden"></a>
- <b>renderHidden</b> : Boolean <div class="mdesc">
- True to hide each contained item on render (defaults to false). </div>
- </td>
- <td class="msource"><a ext:cls="Ext.layout.ContainerLayout" ext:member="#renderHidden" href="output/Ext.layout.ContainerLayout.html#renderHidden">ContainerLayout</a></td>
- </tr>
- </table>
- <a id="Ext.layout.AnchorLayout-props"></a>
- <h2>Public Properties</h2>
- <div class="no-members">This class has no public properties.</div> <a id="Ext.layout.AnchorLayout-methods"></a>
- <h2>Public Methods</h2>
- <div class="no-members">This class has no public methods.</div> <a id="Ext.layout.AnchorLayout-events"></a>
- <h2>Public Events</h2>
- <div class="no-members">This class has no public events.</div>
- </div>
|