3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
\r
4 <title>The source code</title>
\r
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
\r
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
\r
8 <body onload="prettyPrint();">
\r
9 <pre class="prettyprint lang-js"><div id="cls-Ext.layout.AbsoluteLayout"></div>/**
10 * @class Ext.layout.AbsoluteLayout
11 * @extends Ext.layout.AnchorLayout
12 * <p>This is a layout that inherits the anchoring of <b>{@link Ext.layout.AnchorLayout}</b> and adds the
13 * ability for x/y positioning using the standard x and y component config options.</p>
14 * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
15 * configuration property. See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
16 * <p>Example usage:</p>
18 var form = new Ext.form.FormPanel({
19 title: 'Absolute Layout',
22 // layout-specific configs go here
23 extraCls: 'x-abs-layout-item',
27 defaultType: 'textfield',
37 anchor:'100%' // anchor width by percentage
47 anchor: '100%' // anchor width by percentage
53 anchor: '100% 100%' // anchor width and height
58 Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
60 extraCls: 'x-abs-layout-item',
64 onLayout : function(ct, target){
66 this.paddingLeft = target.getPadding('l');
67 this.paddingTop = target.getPadding('t');
68 Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
72 adjustWidthAnchor : function(value, comp){
73 return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
77 adjustHeightAnchor : function(value, comp){
78 return value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
80 <div id="prop-Ext.layout.AbsoluteLayout-activeItem"></div>/**
81 * @property activeItem
85 Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;