[Dojo-checkins] [dojo] #9339: Tree: we need public functions to access a node from an item

dojo trac at dojotoolkit.org
Mon Jun 22 22:09:24 EDT 2009


#9339: Tree: we need public functions to access a node from an item
-----------------------------------------+----------------------------------
 Reporter:  quenenni                     |        Owner:       
     Type:  enhancement                  |       Status:  new  
 Priority:  normal                       |    Milestone:  1.4  
Component:  Dijit                        |      Version:  1.3.0
 Severity:  normal                       |   Resolution:       
 Keywords:  tree item node _itemNodeMap  |  
-----------------------------------------+----------------------------------

Comment(by bill):

 Cool, that's looking good.   Could you possibly write an automated test
 for this, probably just expanding/following the model of
 dijit/tests/Tree.html?

 I think also we need to add a path attribute for documentation purposes
 and so that markup like below works:

 {{{
 <div dojoType=dijit.Tree path="['Foods', 'Fruits', 'Citrus']">
 }}}

 (I guess _setPathAttr() should accept id's as well as items)

 Other notes:
   * getNodesByItem: an easier way of copying an array is
 [].concat(oldArray).
   * _setPathAttr: you can use {{{path.shift()}}} rather than
 {{{splice(0,1)[0]}}}
   * For _getPathAttr(): rather than {{{splice()}}}, you can just call
 {{{ary.unshift(val);}}}
   * oh, our coding standards say to have spaces around > and = and == (and
 ===), and after //

-- 
Ticket URL: <http://bugs.dojotoolkit.org/ticket/9339#comment:13>
dojo <http://dojotoolkit.org/>
The Dojo UI Toolkit


More information about the Dojo-checkins mailing list