2 * @class Ext.app.PortalPanel
4 * A {@link Ext.Panel Panel} class used for providing drag-drop-enabled portal layouts.
6 Ext.define('Ext.app.PortalPanel', {
7 extend: 'Ext.panel.Panel',
8 alias: 'widget.portalpanel',
10 bodyCls: 'x-portal-body',
11 defaultType: 'portalcolumn',
12 componentLayout: 'body',
15 initComponent : function() {
18 // Implement a Container beforeLayout call from the layout to this Container
31 this.on('drop', this.doLayout, this);
34 // Set columnWidth, and set first and last column classes to allow exact CSS targeting.
35 beforeLayout: function() {
36 var items = this.layout.getLayoutItems(),
41 for (; i < len; i++) {
43 item.columnWidth = 1 / len;
44 item.removeCls(['x-portal-column-first', 'x-portal-column-last']);
46 items[0].addCls('x-portal-column-first');
47 items[len - 1].addCls('x-portal-column-last');
48 return this.callParent(arguments);
52 initEvents : function(){
54 this.dd = Ext.create('Ext.app.PortalDropZone', this, this.dropConfig);
58 beforeDestroy : function() {
62 Ext.app.PortalPanel.superclass.beforeDestroy.call(this);