dendrograms/astrodendro — pull request #109 by tomr-stargazer (2014-04-10 17:21:33+00:00)
Title: Implemented the Lasso select in Scatter. There are still some kinks.

Hi all, this is a demonstration of how I think Lasso selections will work -- please check it out and try running it. The main hangup is that when you select a structure via other methods, astrodendro assumes you want to select all of that structure's children as well, which is not a paradigm that works with lasso select and we'll probably have to retool the code in a few places to be more general about this. **Also**, if you try to select more than one point at a time you'll hit a NotImplementedError.

Some scattered thoughts I wrote in my commit message are below.

The main obstacles to tackle:
rethinking how SelectionHub.select() should work, now that we might use the Lasso to select multiple unrelated structures.
The previous selection methods always assumed you wanted a single structure plus all its children, but now we might want to split these into two use cases:
1. You pick an object and want all its children
2. You pick a handful of unrelated objects and you don't want their children

in which case it might make sense to reimplement (1.) as a special case of (2.) which activates when you pass the select() function a single structure (and then it goes and populates the selection with all the children before passing it along to the plots) or something like this. You see what I mean?

This kind of thing would necessitate changing some of the logic in, e.g. BasicDendrogramViewer._update_lines() which calls DendrogramPlotter.get_lines() which has the code ```structures = structure.descendants + [structure]``` implying that when you plot some lines you always want descendants. I'm not super sure how hard I want to fix that, but if we wanted to have a perfect logical correlation with the scatter plots you circle and the specific branches that get highlighted, we would need to circumvent this "get all descendants" logic.