2 * Ext JS Library 2.2.1
\r
3 * Copyright(c) 2006-2009, Ext JS, LLC.
\r
4 * licensing@extjs.com
\r
6 * http://extjs.com/license
\r
10 * @class Ext.layout.AbsoluteLayout
\r
11 * @extends Ext.layout.AnchorLayout
\r
12 * <p>Inherits the anchoring of {@link Ext.layout.AnchorLayout} and adds the ability for x/y positioning using the
\r
13 * standard x and y component config options.</p>
\r
15 Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
\r
17 * @cfg {String} extraCls
\r
18 * An optional extra CSS class that will be added to the container (defaults to 'x-abs-layout-item'). This can be useful for
\r
19 * adding customized styles to the container or any of its children using standard CSS rules.
\r
21 extraCls: 'x-abs-layout-item',
\r
24 setContainer : function(ct){
\r
25 Ext.layout.AbsoluteLayout.superclass.setContainer.call(this, ct);
\r
26 if(ct.isXType('form')){
\r
31 onLayout : function(ct, target){
\r
32 if(this.isForm){ ct.body.position(); } else { target.position(); }
\r
33 Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
\r
37 getAnchorViewSize : function(ct, target){
\r
38 return this.isForm ? ct.body.getStyleSize() : Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this, ct, target);
\r
42 isValidParent : function(c, target){
\r
43 return this.isForm ? true : Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this, c, target);
\r
47 adjustWidthAnchor : function(value, comp){
\r
48 return value ? value - comp.getPosition(true)[0] : value;
\r
52 adjustHeightAnchor : function(value, comp){
\r
53 return value ? value - comp.getPosition(true)[1] : value;
\r
56 * @property activeItem
\r
60 Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;