| Issue 3: | Expand node movement API | |
| 1 person starred this issue and may be notified of changes. | Back to list |
The current node moving methods were built for automatic reparenting, where nodes are always made the last child of their new parent, as in the use case for automatic reparenting, the only field available to control the layout of the tree is the parent field. Expand upon them to enable more flexible node moving. Proposed API Changes: 1. Where model moving methods currently receive a parent node, this should be considered the "target" node. Add an extra, optional parameter to all node movement methods which take a target node, to specify the position the node being moved should occupy relative to the given target node. If this positional indicator defaults to something like 'last-child', all existing usage should work as-is, as it is currently assumed that all nodes will be made children of the target node. 2. For convenience, add a `move_to` method to `Model` instances, which calls the appropriate `TreeManager` methods behind the scenes.
Jan 3, 2008
Project Member
#1
jonathan.buchanan
Status:
Started
|