Skip to content

Sizing Enhanced Elements

Henrik Vendelbo edited this page Oct 21, 2013 · 4 revisions

Before the layout is adjusted by role/layouter elements the laidout contents are measured for size.

All elements that are actively sized will be checked as the first step 6 times per second.

If the element has a sizing handler it is called. If the element is "laidout" the Laidout.calcSizing method is called. If it has an encapsulating "layouter" the Layouter.calcSizing method is called.

If sizing.forceLayout is set to true by one of these methods or the content sizes have changed the element will be queued for layout in the second phase.

Actively Sized elements

If you pass data-role="'sizingElement':true" the element will be flagged for sizing.

If an element has a sizing handler for its role the element is flagged for sizing.

Elements with a Layouter is flagged for sizing.

Elements with a Laidout is flagged for sizing.

Layouter.sizingElement(el,parent,child,role,conf) is a method you can override for a Layouter if you want to flag a descendant for sizing return true.

Clone this wiki locally