Ext JS 4 has a fully refactored layout engine with higher efficiency and performance. During this session, you'll learn all the in-depth details with a hands-on coding review of the updated ContainerLayouts and newly introduced ComponentLayouts.
Container Modification
Changing items in a container
Trigger a layout by default
Passed Arrays will only trigger a single layout
Behavior can be manually overridden
Layouts are Bidirectional
Viewport
(Border)
West Center
(VBox) (TabPanel)
Tab 1 Tab 2
Navigation Settings
(VBox) (HBox)
Filter Form Grid Form A Form B
Size Properties w/ Layouts
When a container sizes a component, that sizing is permanent.
In Ext 4, layouts will no longer alter a component’s sizing
properties.
Component Layouts
Component Layouts define how a component sizes its child
items.
Replaces static sequence of setting resizeEl, calling onResize(),
and firing “resize” event.
Easier to Extend and Customize how a component resizes
Two di erent measurements
WC3
border
padding
content
Border Box Model (IE)
Unifying box models
One set of browsers have to do extra work to convert
measurements.
No extra calculations for IE6/7 in “quirks” mode
Ext 4/Sencha Mobile uses “box-sizing” CSS where available