My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 3: Expand node movement API
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  jonathan.buchanan
Closed:  Jan 2008


 
Project Member Reported by jonathan.buchanan, Jan 2, 2008
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
The `position` argument to node movement methods in `TreeManager` is fully
implemented as of revision 32.
Status: Started
Jan 3, 2008
Project Member #2 jonathan.buchanan
Revision 33 adds a `move_to` method for `Model` instances.
Status: Fixed

Powered by Google Project Hosting