MapEditor: Collapse/scroll unselected levels (like in TreeEditor)
As a power user, I create big trees with many children. As a result, it gets difficult to see through and navigate. It looks like (un)folding could solve this problem.
Example tree: parent -- son -- daughter
In the default view, all three elements should be visible. After folding, only the parent node should be visible. A graphical indicator that the parent holds folded children would be helpful.
Appreciate your time and efforts with VYM, Uwe!
Cool, I am not the only power user :-)
Here's my approach to bigger maps (need to make a video one day to show this):
I have the TreeEditor open (usually left of the map). Select "Parent" and then press the "<" key - every subtree folds in the TreeEditor at least, which I mainly use for navigation. Similar if you would select "son" first: All siblings of parents would fold and also everything down to the son/daughter level.
Is that something you would need in the MapEditor, too?
Maybe could be scripted, or implemented in the code itself...
Yeah, the way it works in TreeEditor is exactly how I imagine it for MapEditor too.
Maybe could be scripted, or implemented in the code itself...
Is that sth I do on my end? If so, please tell me more.
You could open the script editor and script output (e.g. Alt+S and A+Shift+S) and start with this (copied mostly from demos/scripts/iterating-branches.vys):
vym.clearConsole();
m1 = vym.currentMap();
m1.initIterator("foobar");
print ("Starting with branch: " + m1.getHeadingPlainText() );
while (m1.nextIterator("foobar") )
{
print ("Selected branch: " + m1.getHeadingPlainText() );
if (m1.isScrolled()) {
print (" is scrolled");
}
}
At the moment there is no command available returning the current depth(), I try to add that to the next beta-5, could be useful in that context
For reference: The current code for collapsing in TreeEditor is in https://github.com/insilmaril/vym/blob/e33f8fb9ccea3eb2f4a2182672580ee09bbcf3da/src/vymview.cpp#L261
This feature is already provided, it is called scroll.
This feature is already provided, it is called scroll.
Not exactly: As I understood it the new feature would be to scroll everything which is not the already selected branch. This is implemented in TreeEditor with the "<"-key, but not yet in MapEditor.
This feature is already provided, it is called scroll.
Not exactly: As I understood it the new feature would be to scroll everything which is not the already selected branch. This is implemented in TreeEditor with the "<"-key, but not yet in MapEditor.
Thank you for explaining your understanding of the issue. In any case, hitting the "s" key in the map editor is a great feature.