PDA

View Full Version : Definition of a layout run



tgr.joint
26 Feb 2015, 4:56 AM
I'm trying to understand exactly what a layout run is, and why (if from my understanding of the term - see below) there's close to 30 layout runs just collapsing or expanding a fieldset. See Fiddle https://fiddle.sencha.com/#fiddle/ire (open console to see the no. of runs)

In Ext.layout.Layout the following description is available for the method "finishedLayout".

"This method is called after all layouts are complete and their calculations flushed to the DOM. No further layouts will be run and this method is only called once per layout run."

However in Ext.layout.Context there is a method "runComplete" - this however is just called once in the same example as mentioned before.

I've been thrown into a project where we're seeing a lot of time spent waiting for layout calculations and I've been tasked with figuring out if we've done things completely wrong or if it's just how ExtJS works, my preliminary investigation shows that even with a bare minimum of components, there's still a lot of layout runs going on.