mar10/fancytree — pull request #59 by bradgreens (2013-09-11 23:13:30+00:00)
Title: addChildren update: Assign key based on position with node true.

- Assures nodes generated with addChildren are assigned the correct key within the context of the tree.
- Tested with and without insertBefore, and with arrays of nodes.

The reason for this addition is my application depends on the correct node key being set when I add children to the tree. This allows me to use `myNode.setActive()` on nodes generated with addChildren. Previously, the node key would return as '_1', which I was unable to target programmatically.

While looking at the addChildren method. It seems to me that it should return `nodeList`, and not `firstNode`. I did not change this as I don't want to make a breaking change unless the team approves.