PDA

View Full Version : Preventing BorderLayout region from automatically sliding



digerata
6 Nov 2006, 11:46 AM
Hi Jack,

GREAT FREAKIN LIBRARY! THANKS! :D

Now that I got that out of the way, I have a question about border layout.

I was trying to programmatically interact with my east and west regions. I had setup the layout to collapse those two regions before displaying. Once the page was loaded, I wanted events I fired to trigger BorderLayoutRegion.slideOut(). I also wanted to be able to call BorderLayoutRegion.slideIn() to hide the regions when I was done with them. I was able to get both of those to work. However, it seems there is functionality built into the regions to slide them back in when a mouse event happens outside of the region. This defeats the custom slideOut/slideIn events I had setup.

Would it be possible to add a flag to prevent this functionality for cases like mine?

Again, beautiful freakin library!

digerata
6 Nov 2006, 11:48 AM
Sorry! Just realized I posted this in the wrong forum. Doh!

jack.slocum
6 Nov 2006, 2:57 PM
autoHide: false

jack.slocum
6 Nov 2006, 2:58 PM
Nevermind, I don't think that turns off mouse handlers. Hold on let me look.

jack.slocum
6 Nov 2006, 3:00 PM
layout.getRegion('west').slideInIf = function(){}

digerata
6 Nov 2006, 3:44 PM
layout.getRegion('west').slideInIf = function(){}

That almost gets me there. I can now click on other areas of the window and the east and west regions stay out. But if I mouse over the region then out, it still slides back in.

jack.slocum
6 Nov 2006, 4:23 PM
That's what the first one is for: autoHide:false

digerata
6 Nov 2006, 4:39 PM
Gotcha. That works. I didn't try it when you said nevermind.

Thanks, Jack!