3 * Copyright(c) 2006-2011 Sencha Inc.
5 * http://www.sencha.com/license
9 * @class Ext.ux.desktop.FitAllLayout
10 * @extends Ext.layout.container.AbstractFit
11 * <p>This layout applies a "fit" layout to all items, overlaying them on top of each
14 Ext.define('Ext.ux.desktop.FitAllLayout', {
15 extend: 'Ext.layout.container.AbstractFit',
16 alias: 'layout.fitall',
19 onLayout : function() {
23 var size = me.getLayoutTargetSize();
25 me.owner.items.each(function (item) {
26 me.setItemBox(item, size);
30 getTargetBox : function() {
31 return this.getLayoutTargetSize();
34 setItemBox : function(item, box) {
36 if (item && box.height > 0) {
37 if (me.isManaged('width') === true) {
38 box.width = undefined;
40 if (me.isManaged('height') === true) {
41 box.height = undefined;
44 item.getEl().position('absolute', null, 0, 0);
45 me.setItemSize(item, box.width, box.height);