Hey:

Recently we have been talking about multiple selections in Leo.
I believe this is something very important for beginners, and it was a big 
deal when I started with Leo. Actually I still miss a solution for this.
When you get to leo the first thing you try, if you come from a drag and 
drop environment is to get three nodes and drop them somewhere. Or delete 
them. Or move all of them right or left. And Leo cant do this.
But I feel this is crucial, because the more time goes by, the more users 
come expecting those kind of things. Because drag and drop is becoming the 
default in mobile and any environment apps, those kind of users will think 
of Leo as faulty when playing with it if Leo cant do those "simple" tasks.

Therefore Id like to propose a solution for those, and consider if those 
could be done.

Currently, we can do all of the named operations with one node. 

Lets start thinking on how to move several selected nodes as a child of 
another node.

What we have is the current (S)election, and (D)estination node.

First we must decide how Leo will do when a parent node and several of its 
children are selected. My suggestion would be to ignore the children of a 
node, so if we select several parents, and some of their children, only 
their parents will be moved to (D).

We also can assume that, when we drop our (S) to (D), we will want all the 
items in (S) to go either as a child or next of (D), same as it does 
currently for one node.

So, now, we have a way to filter a list of selected nodes into only those 
which are parents. If any node has children in the selection, those 
children are removed from the selection.

Next, we must only move the filtered selection as child or next of (D).

I think this can be done like this:

- For each selected position, store the gnx in a list. If any of them is 
cloned, we must also store how many positions with the same gnx exist in 
the tree previously to the one we are storing.

- Store the gnx of (D).

- Now, for each item in the list we made, find the position by gnx, then 
move it as child or next of (D). If it was a clone, find the nth position 
that has that gnx. Then move it.

This same strategy could be applied for the rest of wanted operations.
What do you think?





-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to