I'm trying to sort siblings into a specified order. Although there is no way to specify exact positions of siblings (would be nice to be able to say, "this is the order - put them like that") I can at least run through siblings in order, placing them as the last child of their shared parent, and that will sort them all out, albeit inefficiently.
This does not work for root nodes. There appears to be no way to make a node the first or last (or ideally the Nth) root node. They can only be shifted around in relation to each other, which makes putting a root node at the start quite cumbersome.
So would it make sense to introduce methods to makeFirstChildOfRoot() or probably more accurately makeFirstRoot() and then makeLastRoot() and possibly makeNthRoot().
Similarly makeNthChildOf() would be very nice, as it supports drag-and-drop positioning of nodes in a GUI very well.
I'm trying to sort siblings into a specified order. Although there is no way to specify exact positions of siblings (would be nice to be able to say, "this is the order - put them like that") I can at least run through siblings in order, placing them as the last child of their shared parent, and that will sort them all out, albeit inefficiently.
This does not work for root nodes. There appears to be no way to make a node the first or last (or ideally the Nth) root node. They can only be shifted around in relation to each other, which makes putting a root node at the start quite cumbersome.
So would it make sense to introduce methods to
makeFirstChildOfRoot()
or probably more accuratelymakeFirstRoot()
and thenmakeLastRoot()
and possiblymakeNthRoot()
.Similarly
makeNthChildOf()
would be very nice, as it supports drag-and-drop positioning of nodes in a GUI very well.