2
* Ext JS Library 3.0 RC2
3
* Copyright(c) 2006-2009, Ext JS, LLC.
6
* http://extjs.com/license
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',
62
onLayout : function(ct, target){
64
this.paddingLeft = target.getPadding('l');
65
this.paddingTop = target.getPadding('t');
67
Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
71
adjustWidthAnchor : function(value, comp){
72
return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
76
adjustHeightAnchor : function(value, comp){
77
return value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
80
* @property activeItem
84
Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;