yui/yui3 — pull request #873 by rgrove (2013-06-14 19:20:40+00:00)
Title: Tree.Sortable: Preserve `this` object for comparators

Sort comparator functions are now executed in their original context.

When the sort comparator lives on the tree, its `this` object will be the tree instance. When it lives on a node, its `this` object will be the node. When specified as an anonymous function in an options object, its `this` object will be the global object.

This makes it possible to define insertion-time sort criteria that takes a pending parent node into account even before the node being sorted has actually become a child of that parent.