mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-06-07 03:42:13 +02:00
'I' for collapsing children
This commit is contained in:
parent
6aaac9200d
commit
48e7932d4e
15
h-m-m
15
h-m-m
|
@ -2038,6 +2038,20 @@ function collapse_other_branches(&$mm)
|
||||||
display($mm);
|
display($mm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function collapse_inner(&$mm)
|
||||||
|
{
|
||||||
|
foreach ($mm['nodes'][ $mm['active_node'] ]['children'] as $cid)
|
||||||
|
$mm['nodes'][$cid]['collapsed'] = true;
|
||||||
|
|
||||||
|
$mm['nodes'][ $mm['active_node'] ]['collapsed'] = false;
|
||||||
|
|
||||||
|
build_map($mm);
|
||||||
|
center_active_node($mm);
|
||||||
|
display($mm);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function find_branch(&$mm, $cid)
|
function find_branch(&$mm, $cid)
|
||||||
{
|
{
|
||||||
if ($mm['nodes'][$cid]['parent'] == $mm['root'])
|
if ($mm['nodes'][$cid]['parent'] == $mm['root'])
|
||||||
|
@ -2332,6 +2346,7 @@ function monitor_key_presses(&$mm)
|
||||||
case 'h': change_active_node($mm, move_left); break;
|
case 'h': change_active_node($mm, move_left); break;
|
||||||
|
|
||||||
case 'i': collapse_other_branches($mm); break;
|
case 'i': collapse_other_branches($mm); break;
|
||||||
|
case 'I': collapse_inner($mm); break;
|
||||||
|
|
||||||
case 'j': change_active_node($mm, move_down); break;
|
case 'j': change_active_node($mm, move_down); break;
|
||||||
case 'J': move_active_node_down($mm); break;
|
case 'J': move_active_node_down($mm); break;
|
||||||
|
|
|
@ -52,6 +52,7 @@ Collapsing and expanding:
|
||||||
* `f` - focuses by collapsing all, but the ancestors and descendants of the active node
|
* `f` - focuses by collapsing all, but the ancestors and descendants of the active node
|
||||||
* `F` - locks focus as the active node changes (try it with the center lock)
|
* `F` - locks focus as the active node changes (try it with the center lock)
|
||||||
* `i` - collapses all the first level items except for the one that contains the active node
|
* `i` - collapses all the first level items except for the one that contains the active node
|
||||||
|
* `I` - collapses the children of the active node
|
||||||
|
|
||||||
Search:
|
Search:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue