This call should be done in ```treeproto.root(..)``` function. As the ```_setrootnode``` and the change of the ```edgeToParent``` are both wrapped in ```JSAV.anim``` which records the change to the animation history, calling ```node.edgeToParent()``` inside ```_setrootnode``` would result in a new recorded operation every time the step is applied when moving backward/forward in the animation.