-
28 Oct 2011 1:34 PM #1
User-triggered window resize required to force correct layout of container hierarchy
User-triggered window resize required to force correct layout of container hierarchy
I've noticed a number of scenarios in which a view comes up initially blank - or if not completely blank, with much of its content missing. The display is fixed the first time I resize the window. I haven't debugged in detail, but it appears that in such cases, the width and/or height properties of parent containers aren't getting set during the initial layout, with the result that overflowing child components are hidden.
-
28 Oct 2011 2:22 PM #2
I haven't seen that behavior before, but your guess as to the root cause certainly fits the symptoms. Any chance that can be reproduced in a small example?
Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
31 Oct 2011 5:07 AM #3
Although it happens on a number of screens, the application is large and complex, and I haven't yet been able to isolate a small test case. Will post if I do...
This may be unrelated, but I also get a number of exceptions from the following line in Ext.layout.component.Component.beginLayoutCycle:
The problem is that me.lastComponentSize is undefined the first time this method is called for the component (firstCycle == true). I haven't really investigated to see how this property is supposed to be "bootstrapped", but apparently, it doesn't happen the way it should in some cases...Code:ownerContext.setWidth(me.lastComponentSize.width, false, true);
Thanks,
Brett S.
-
31 Oct 2011 9:11 AM #4
The root cause of this exception is improper "scoping" of the layout. While it is tempting to add a null check and default in some values, that will just produce a garbage layout result...
<tmi>
When a component is told to layout, if a dimension is calculated by its ownerLayout (width/heightAuthority==2), but the ownerLayout is not in scope for this run ("isTopLevel") then we pull the size information from the last layout run ("lastComponentSize"). If the component has never been sized, it will not have a "lastComponentSize" and so the layout scope *must* include its ownerLayout... sadly if "lastComponentSize" is null in this case, then this requirement is being violated.
</tmi>

Thanks for digging in on the build - much appreciated.Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
31 Oct 2011 9:16 AM #5
Don,
Thanks. I appreciate the explanation.
Brett S.
-
10 Dec 2011 1:21 AM #6
I am getting the error "me.lastComponentSize is undefined" in FireFox and "TypeError: Cannot convert 'me.lastComponentSize' to object" in Opera.
It works great in Safari and Chrome.
Will this be fixed for the next release?
-
10 Dec 2011 3:13 PM #7Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"


Reply With Quote