1. #1
    Sencha User
    Join Date
    Mar 2007
    Location
    Boulder, CO
    Posts
    69
    Vote Rating
    0
    ericwaldheim is on a distinguished road

      0  

    Default LayoutDialog regression?

    LayoutDialog regression?


    I have a LayoutDialog with a nested layout panel that worked in alpha3 and does not work in beta1 or beta2. In the betas the north and south panels are not displayed. Here's the code (remove either the includes of alpha3 or beta2 to see it work or not work). (I'm running on FF.)
    Thanks.
    Code:
    <HTML>
    <head>
    
    <link rel="stylesheet" type="text/css" href="ext/resources/css/ext-all.css" />
    
    <script src="ext-1.0-alpha3/yui-utilities.js"></script>
    <script src="ext-1.0-alpha3/ext-yui-adapter.js"></script>
    <script src="ext-1.0-alpha3/ext-all.js"></script>
    
    <script src="ext-1.0-beta2/adapter/yui/yui-utilities.js"></script>
    <script src="ext-1.0-beta2/adapter/yui/ext-yui-adapter.js"></script>
    <script src="ext-1.0-beta2/ext-all.js"></script>
    
    <script type='text/javascript'>
    
    Ext.onReady(winMain);
    function winMain()
    {
    	var dlg = new Ext.LayoutDialog(
    		'ew-dlg', {height:450, width:730, north:{}, south:{}, center:{}});
     	dlg.addButton("OK", function() {alert('ok')});
    
    	var layout = dlg.getLayout();
    	var innerLayout = new Ext.BorderLayout(
    		'ew-center', { west: {split:true, initialSize:'50%'}, center: {} });
    	layout.beginUpdate();
    	layout.add('north', new Ext.ContentPanel('ew-north'));
    	layout.add('south', new Ext.ContentPanel('ew-south'));
    	innerLayout.add('west', new Ext.ContentPanel('ew-center-west'));
    	innerLayout.add('center', new Ext.ContentPanel('ew-center-center'));
    	layout.add('center', new Ext.NestedLayoutPanel(innerLayout));
    	layout.endUpdate();
    	
    	dlg.show();
    }
    
    </script>
    </head>
    <body>
    
    <div id='ew-dlg' style='visibility:hidden'>
    <div class='x-dlg-hd'>LayoutDialog</div>
    
    <div class='x-dlg-bd'>
    <div id='ew-north'><button>Button</button></div>
    <div id='ew-center'></div>
    <div id='ew-center-center'></div>
    <div id='ew-center-west'></div>
    <div id='ew-south'><button>Button</button></div>
    </div>
    
    <div class='x-dlg-ft'></div>
    </div>
    
    </body>
    </html>

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    You need to specify initialSize on your North and South regions.

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Location
    Boulder, CO
    Posts
    69
    Vote Rating
    0
    ericwaldheim is on a distinguished road

      0  

    Default


    Prior to 1.0-beta1, Ext figured out how big to make the regions automatically.
    Was this feature unintended?
    Are you certain that now we need to figure this out manually?
    Seems like a step backward.
    Am I missing something?
    Thanks,
    Eric

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854
    Vote Rating
    4
    tryanDLS is on a distinguished road

      0  

    Default


    I'm not sure what was going on before. I do remember that there were some issues around null values and problems with calculating how far the splitters could be allowed to drag the borders and size calculations. Since there's really no way to guess what the defaults should be if you don't specify anything, they may be treated as 0 now to avoid problems.

Thread Participants: 1