PDA

View Full Version : Replacing "Temporary" Expansion of Regions with Proper Expansions



christophre
11 Aug 2007, 2:21 PM
<a href="http://extjs.com/forum/showthread.php?t=5054">This thread</a> was discussing modifying the "minimized" region toolbar to do a proper LayoutRegion.expand(), rather than the temporary "slide" animation (which hides the region after the mouse leaves its boundaries).

Unfortunately, that thread is about four months old and was "Pro Support" thread, so I couldn't reply to it anyway. So, I'm explaining a *workaround* here!

This qualifies as workaround rather than a proper fix, since it relies on "undoing" some of the private/internal work of LayoutRegion, but all in all, it's pretty simple -- all we are really doing is removing the default handler and replacing it with a new one:



var region = mainLayout.getRegion('south');

region.collapsedEl.un('click', region.collapseClick);
region.collapsedEl.on('click', region.expand, region);


That's it!