dnalot
9 Feb 2008, 11:16 PM
This is a layout that enables anchoring of contained elements relative to the container's specified anchor points. If the container is resized, all anchored items are automatically rerendered according to their anchor rules. This class is intended to be extended or created via the layout:'align' Ext.Container.layout config, and should generally not need to be created directly via the new keyword.
AlignLayout does not have any direct config options (other than inherited ones). However, the items added to an AlignLayout can supply an anchoring-specific config property of align which is a string containing two values separated by a dash, the first value is used as the element's anchor point, and the second value is used as the container's anchor point. This value is what tells the layout how the item should be anchored to the container and is passed into Ext.Element's alignTo method with any x/y offsets using the standard x and y component config options.
The items added to an AlignLayout can also supply the standard width and height component config options as integers or percentages based on the size of the container itself. Any negative or zero value is subtracted from the container's measurement to calculate remaining size.
New demo (http://www.docudesk.com/scripts/ext/demos.html) based on the BorderLayout Sample and showcasing the sexy Slate theme B)
Updates
-- 2008-02-11 --
[fixed] - All components now positioned absolutely to preserve placement e.g. if panel collapses
-- 2008-02-12 --
[fixed] - Closure corrupting style property of contained items
[fixed] - Size value of 0 intended to be equivalent to (-0) i.e. '100%'
[added] - Single side align values now double themselves or accept BorderLayout region identifiers for convenience e.g 't-t' is equivalent to 't' as well as 'north'
-- 2008-02-14 --
[changed] - Cleaned up globals in closure
-- 2008-02-15 --
[added] - Demo
-- 2008-02-17 --
[fixed] - Position against items' getPositionEl() rather than el itself
[changed] - Added dependency for internal use
-- 2008-02-20 --
[fixed] - Oversight in applying position
[changed] - Updated demo in response to post
[added] - New pseudonyms for corner alignment e.g. 'nw' is equivalent to 'tl'
-- 2008-02-28 --
[changed] - Corrected namespace
-- 2008-03-05 --
[fixed] - Style persistence between instances
[added] - Use position property in Container config to specify item positioning which defaults to 'absolute' and false is equivalent to 'auto'
AlignLayout does not have any direct config options (other than inherited ones). However, the items added to an AlignLayout can supply an anchoring-specific config property of align which is a string containing two values separated by a dash, the first value is used as the element's anchor point, and the second value is used as the container's anchor point. This value is what tells the layout how the item should be anchored to the container and is passed into Ext.Element's alignTo method with any x/y offsets using the standard x and y component config options.
The items added to an AlignLayout can also supply the standard width and height component config options as integers or percentages based on the size of the container itself. Any negative or zero value is subtracted from the container's measurement to calculate remaining size.
New demo (http://www.docudesk.com/scripts/ext/demos.html) based on the BorderLayout Sample and showcasing the sexy Slate theme B)
Updates
-- 2008-02-11 --
[fixed] - All components now positioned absolutely to preserve placement e.g. if panel collapses
-- 2008-02-12 --
[fixed] - Closure corrupting style property of contained items
[fixed] - Size value of 0 intended to be equivalent to (-0) i.e. '100%'
[added] - Single side align values now double themselves or accept BorderLayout region identifiers for convenience e.g 't-t' is equivalent to 't' as well as 'north'
-- 2008-02-14 --
[changed] - Cleaned up globals in closure
-- 2008-02-15 --
[added] - Demo
-- 2008-02-17 --
[fixed] - Position against items' getPositionEl() rather than el itself
[changed] - Added dependency for internal use
-- 2008-02-20 --
[fixed] - Oversight in applying position
[changed] - Updated demo in response to post
[added] - New pseudonyms for corner alignment e.g. 'nw' is equivalent to 'tl'
-- 2008-02-28 --
[changed] - Corrected namespace
-- 2008-03-05 --
[fixed] - Style persistence between instances
[added] - Use position property in Container config to specify item positioning which defaults to 'absolute' and false is equivalent to 'auto'