jQsafi / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

autoCollapse needs an additional mode #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What new or enhanced feature are you proposing?

Currently autoCollapse can only be set to either true or false.

I would like to see this as: 0, 1 or 2
Something like:

 0 = false  = autoCollapse OFF
 1 = true   = autoCollapse ON
 2 =        = Always Collapse

What goal would this enhancement help you achieve?

The current behaviour for autoCollapse doesn't work as expected.
At least, as I expect it.

When the next folder you click on is empty, the previous opened folder will NOT 
auto collapse!
E.g. it is the same behaviour as if the next folder was only a document.

From my point of view, regarding Folders, it's either autoCollapse or not 
regardless of the next Folders state.

Original issue reported on code.google.com by prana001 on 20 Oct 2010 at 7:03

GoogleCodeExporter commented 9 years ago
Could you achieve this behaviour using this pattern?:

onActivate(node){
    node.collapseSiblings()
}

Original comment by moo...@wwwendt.de on 8 Nov 2010 at 7:04

GoogleCodeExporter commented 9 years ago
Yes, this works nicely.

Original comment by prana001 on 8 Nov 2010 at 7:10