diff --git a/h-m-m b/h-m-m index d2025bf..2132163 100644 --- a/h-m-m +++ b/h-m-m @@ -1636,7 +1636,6 @@ function export_html(&$mm) message($mm, 'Exported as '.$mm['filename'].'.html'); copy_to_clipboard($mm, $mm['filename'].'.html'); - } @@ -1664,7 +1663,7 @@ function export_html_node(&$mm, $parent_id) $output = "
" ."" - .$mm['nodes'][$parent_id]['title'] + .$mm['nodes'][$parent_id]['title'] . ' (' . count($mm['nodes'][$parent_id]['children']) . ')' .""; foreach ($mm['nodes'][$parent_id]['children'] as $cid) @@ -1837,7 +1836,13 @@ function change_active_node(&$mm, $direction) if ($direction==move_right) { - if ($node['is_leaf'] || ($node['collapsed'] ?? false) ) return; + if ($node['is_leaf']) return; + + // auto-unfold node on right move + if ($node['collapsed'] ?? false) { + toggle($mm); + $node = $mm['nodes'][ $mm['active_node'] ]; + } $distance = []; foreach ($node['children'] as $cid)