Open sloria opened 10 years ago
To be more clear:
var root = new HGrid.Tree();
var tree = new HGrid.Tree({name: 'My Docs', kind: 'folder'});
var leaf = new HGrid.Leaf({name: 'foo.txt', kind: 'item'});
root.add(tree);
tree.add(leaf);
console.log(leaf.path);
// => ["My Docs", "foo.txt"]
path
might also be an Array of IDs instead of names.
Besides the fact that this will eventually be needed for certain OSF features (e.g. pointers, S3 addon), this would be a useful feature to have