PDA

View Full Version : [2.1/2.2][DUP] Possible bug with hideCollapseTool in region-based panels?



craig.marvelley
20 Aug 2008, 1:33 AM
Hi,

I'm new to Ext so apologies if this is expected behaviour!

My scenario is thus: I've a toolbar which is responsible for firing an action which, among other things, toggles a panel's collapse - the panel in question is in a border layout, with the following config:



{
id: 'summaryPanel',
title: 'Summary',
region: 'east',
split: true,
width: 250,
minSize: 250,
collapsible: true,
floatable: false,
hideCollapseTool: true
}
The panel is initally rendered without the collapse tool, as intended. However upon collapsing via my action, the expand button is displayed in the title bar, though the Panel docs for 'hideCollapseTool' state:

"True to hide the expand/collapse toggle button when collapsible = true, false to display it (defaults to false)."

I've traced the expand button addition through to the border layout Region class - the following code starting at line 336 of BorderLayout.js is responsible:



var t = this.toolTemplate.append(
this.collapsedEl.dom,
{id:'expand-'+this.position}, true);
t.addClassOnOver('x-tool-expand-'+this.position+'-over');
t.on('click', this.onExpandClick, this, {stopEvent:true});
So it seems that the region is overriding the panel behaviour. Shouldn't there be some kind of check first to make sure the panel's hideCollapseTool setting isn't true?

Cheers,
Craig

evant
20 Aug 2008, 1:36 AM
Sounds pretty reasonable, I'd say this is a bug.

craig.marvelley
20 Aug 2008, 1:54 AM
Cool, thanks for the quick reply! Do I need to submit this as a bug seperately or can it be moved?

Condor
20 Aug 2008, 2:39 AM
Duplicate of this post (http://extjs.com/forum/showthread.php?t=43070).