PDA

View Full Version : [FIXED-479][3.1svn5939] BorderLayout initially collapsed region bug



vladsch
22 Jan 2010, 9:10 AM
Hi,

latest version from SVN

If container has border layout and one of the region is initially collapsed then after region expanding the region's body is not visible

Steps to reproduce

1. Use the following example
http://www.extjs.com/deploy/dev/examples/window/layout.html

2. Add the following code to the west 'Navigation' panel config object

collapsed:true

3. Run example, click the button to show the window and try expand west region

vladsch
25 Jan 2010, 2:09 AM
Hi,

Sorry for the bump

Is it required additional details from me? Did you able to reproduce it? Just that issue is very annoying

Thank you

rshell
25 Jan 2010, 8:10 AM
I have exactly the same problem, someone please fix this.

Jamie Avins
25 Jan 2010, 8:51 AM
What rev did you check out?

rshell
25 Jan 2010, 10:36 AM
We checked out rev 5931.

Thanks a lot!

Jamie Avins
25 Jan 2010, 10:41 AM
Can you check anything past 5933, there was a large change to the engine structure which may affect this issue.

vladsch
25 Jan 2010, 12:09 PM
Hi,

Rev 5939 still has that issue
Here is my test case (run example and expand west region)


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Window Layouts Example</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/>

<!-- GC -->
<!-- LIBS -->
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<!-- ENDLIBS -->

<script type="text/javascript" src="../../ext-all.js"></script>

<script type="text/javascript">
Ext.onReady(function(){
var center = new Ext.Panel({
region: 'center',
margins:'3 3 3 0'
});

var nav = new Ext.Panel({
title: 'Navigation',
region: 'west',
split: true,
width: 200,
collapsible: true,
collapsed: true,
margins:'3 0 3 3',
cmargins:'3 3 3 3'
});

var win = new Ext.Window({
title: 'Layout Window',
closable:true,
width:600,
height:350,
plain:true,
layout: 'border',

items: [nav, center]
});

win.show(this);
});
</script>
</head>
<body>

</body>
</html>

rshell
26 Jan 2010, 2:11 AM
We have just checked out rev 5942 and the problem persists.

rshell
28 Jan 2010, 10:01 AM
Up to svn 5952 still not found a work around.

Jamie Avins
28 Jan 2010, 10:10 AM
It's not marked as fixed yet so I wouldn't expect it. This is a high priority item, we will update this thread as soon as it is resolved and in svn.

rshell
28 Jan 2010, 12:30 PM
Have found a partial workaround at present :-

1) Initialize page with side panel with collapse: false
2) After panel renders collapse the side panels.

Did this is a modification of the restoreState() method used to recover the state of the panel. In this which there was no cookie state it closes the side panel. Then may sure panel.restoreState() called just after page is renders.

So for all side panels add a restoreState()


restoreState: function(){
try {
var state = Ext.state.Manager.get(this.stateId);
if (state) {
this.applyState(state);
} else {
this.collapse(false);
}
}
catch (e) {
console.log('restoreState function failed');
console.log(e);
}
},


This alter initial layout of viewport reset the set panels:-



_viewport.doLayout();
_east_panel.restoreState();
_west_panel.restoreState();
_south_panel.restoreState();

Jamie Avins
28 Jan 2010, 1:10 PM
svn 5954 should resolve this issue. Please let me know if you still have issues.

jennyfong
29 Jan 2010, 1:40 AM
Thanks that fixed it.

vladsch
29 Jan 2010, 2:53 AM
Hi,

Thanks for the fix. But there is another problem which you can reproduce with my previous test case

1. Run example
2. Resize window (you have to increase window's height)
3. Click on west collapsed region (do not click on the expand icon, just click on collapsed band to make west region floatable)
4. You should see that height of west panel is less that window's body height

Thanks again

Jamie Avins
29 Jan 2010, 8:19 AM
Indeed. I'm looking at that now.

Jamie Avins
29 Jan 2010, 9:25 AM
Looks like this issue has been around for a while, fixed in svn 5956.