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>/**
\r
10 * @class Ext.layout.AbsoluteLayout
\r
11 * @extends Ext.layout.AnchorLayout
\r
12 * <p>This is a layout that inherits the anchoring of <b>{@link Ext.layout.AnchorLayout}</b> and adds the
\r
13 * ability for x/y positioning using the standard x and y component config options.</p>
\r
14 * <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
\r
15 * configuration property. See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
\r
16 * <p>Example usage:</p>
\r
18 var form = new Ext.form.FormPanel({
\r
19 title: 'Absolute Layout',
\r
22 // layout-specific configs go here
\r
23 extraCls: 'x-abs-layout-item',
\r
26 url:'save-form.php',
\r
27 defaultType: 'textfield',
\r
37 anchor:'100%' // anchor width by percentage
\r
47 anchor: '100%' // anchor width by percentage
\r
53 anchor: '100% 100%' // anchor width and height
\r
58 Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
\r
60 extraCls: 'x-abs-layout-item',
\r
62 onLayout : function(ct, target){
\r
64 this.paddingLeft = target.getPadding('l');
\r
65 this.paddingTop = target.getPadding('t');
\r
67 Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
\r
71 adjustWidthAnchor : function(value, comp){
\r
72 return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
\r
76 adjustHeightAnchor : function(value, comp){
\r
77 return value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
\r
79 <div id="prop-Ext.layout.AbsoluteLayout-activeItem"></div>/**
\r
80 * @property activeItem
\r
84 Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;