Alien-Web-ExtJS-V3
view release on metacpan or search on metacpan
share/docs/source/AnchorLayout.html view on Meta::CPAN
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The source code</title>
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
<style type="text/css">
.highlight { display: block; background-color: #ddd; }
</style>
<script type="text/javascript">
function highlight() {
document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
}
</script>
</head>
<body onload="prettyPrint(); highlight();">
<pre class="prettyprint lang-js"><span id='Ext-layout-AnchorLayout'>/**
</span> * @class Ext.layout.AnchorLayout
* @extends Ext.layout.ContainerLayout
* <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
* <b><tt>{@link #anchor}</tt></b> rules.</p>
* <p>This class is intended to be extended or created via the layout:'anchor' {@link Ext.Container#layout}
* 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). By default,
* AnchorLayout will calculate anchor measurements based on the size of the container itself. However, the
* container using the AnchorLayout can supply an anchoring-specific config property of <b>anchorSize</b>.
* 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. For example:</p>
* <pre><code>
var viewport = new Ext.Viewport({
layout:'anchor',
anchorSize: {width:800, height:600},
items:[{
title:'Item 1',
html:'Content 1',
width:800,
anchor:'right 20%'
},{
title:'Item 2',
html:'Content 2',
width:300,
anchor:'50% 30%'
},{
title:'Item 3',
html:'Content 3',
width:600,
anchor:'-100 50%'
}]
});
* </code></pre>
*/
Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, {
<span id='Ext-layout-AnchorLayout-cfg-anchor'> /**
</span> * @cfg {String} anchor
* <p>This configuation option is to be applied to <b>child <tt>items</tt></b> of a container managed by
* this layout (ie. configured with <tt>layout:'anchor'</tt>).</p><br/>
*
* <p>This value is what tells the layout how an item should be anchored to the container. <tt>items</tt>
* added to an AnchorLayout accept 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%').
* The following types of anchor values are supported:<div class="mdetail-params"><ul>
( run in 1.189 second using v1.01-cache-2.11-cpan-02777c243ea )