| Issue 51: | Expand option not evaluated in JSON mode | |
| 1 person starred this issue and may be notified of changes. | Back to list |
(Reported by Julius Volz) The current dynatree seems to only evaluate the 'expand' node option when constructing a tree from an HTML tag list (not when loading from AJAX/JSON). The attached patch makes dynatree actually look at the data.expand value when creating a new node and sets the bExpanded to true when appropriate, which expands the node. I hope this is the right way to do this - at least it works for me. Patch Index: src/jquery.dynatree.js =================================================================== --- src/jquery.dynatree.js (revision 64) +++ src/jquery.dynatree.js (working copy) @@ -74,7 +74,11 @@ this.span = null; // not yet created this.aChilds = null; // no subnodes yet this.bRead = false; // Lazy content not yet read - this.bExpanded = false; // Collapsed by default + if (this.data.expand) { + this.bExpanded = true; + } else { + this.bExpanded = false; // Collapsed by default + } }, toString: function() {
Nov 1, 2008
Project Member
#1
moo...@wwwendt.de
Status:
Fixed
Jul 17, 2012
considered verified
Status:
Verified
|