3
<title>The source code</title>
4
<link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
5
<script type="text/javascript" src="../resources/prettify/prettify.js"></script>
7
<body onload="prettyPrint();">
8
<pre class="prettyprint lang-js"><div id="cls-Ext.layout.AbsoluteLayout"></div>/**
9
* @class Ext.layout.AbsoluteLayout
10
* @extends Ext.layout.AnchorLayout
11
* <p>This is a layout that inherits the anchoring of <b>{@link Ext.layout.AnchorLayout}</b> and adds the
12
* ability for x/y positioning using the standard x and y component config options.</p>
13
* <p>This class is intended to be extended or created via the <tt><b>{@link Ext.Container#layout layout}</b></tt>
14
* configuration property. See <tt><b>{@link Ext.Container#layout}</b></tt> for additional details.</p>
15
* <p>Example usage:</p>
17
var form = new Ext.form.FormPanel({
18
title: 'Absolute Layout',
21
// layout-specific configs go here
22
extraCls: 'x-abs-layout-item',
26
defaultType: 'textfield',
36
anchor:'100%' // anchor width by percentage
46
anchor: '100%' // anchor width by percentage
52
anchor: '100% 100%' // anchor width and height
57
Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, {
59
extraCls: 'x-abs-layout-item',
61
onLayout : function(ct, target){
63
this.paddingLeft = target.getPadding('l');
64
this.paddingTop = target.getPadding('t');
66
Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target);
70
adjustWidthAnchor : function(value, comp){
71
return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value;
75
adjustHeightAnchor : function(value, comp){
76
return value ? value - comp.getPosition(true)[1] + this.paddingTop : value;
78
<div id="prop-Ext.layout.AbsoluteLayout-activeItem"></div>/**
79
* @property activeItem
83
Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout;
b'\\ No newline at end of file'