mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-06-08 03:52:12 +02:00
small fixes for the hiding feature
This commit is contained in:
parent
2958450f95
commit
820b400315
9
h-m-m
9
h-m-m
|
@ -2296,7 +2296,8 @@ function change_active_node(&$mm, $x, $y)
|
||||||
|
|
||||||
if ($x > 0)
|
if ($x > 0)
|
||||||
{
|
{
|
||||||
if ($node['is_leaf']) return;
|
if (count($node['visible_children'])==0)
|
||||||
|
return;
|
||||||
|
|
||||||
// auto-unfold node on right move
|
// auto-unfold node on right move
|
||||||
if ($node['collapsed'] ?? false) {
|
if ($node['collapsed'] ?? false) {
|
||||||
|
@ -2715,7 +2716,8 @@ function expand_all(&$mm)
|
||||||
|
|
||||||
function collapse_siblings(&$mm, $id)
|
function collapse_siblings(&$mm, $id)
|
||||||
{
|
{
|
||||||
if ($id <= $mm['root_id']) return;
|
if ($id <= $mm['root_id'])
|
||||||
|
return;
|
||||||
|
|
||||||
$parent_id = $mm['nodes'][$id]['parent'];
|
$parent_id = $mm['nodes'][$id]['parent'];
|
||||||
|
|
||||||
|
@ -2729,7 +2731,8 @@ function collapse_siblings(&$mm, $id)
|
||||||
|
|
||||||
function expand_siblings(&$mm, $id)
|
function expand_siblings(&$mm, $id)
|
||||||
{
|
{
|
||||||
if ($mm['nodes'][$id]['is_leaf']) return;
|
if ($mm['nodes'][$id]['is_leaf'])
|
||||||
|
return;
|
||||||
|
|
||||||
$mm['nodes'][$id]['collapsed'] = false;
|
$mm['nodes'][$id]['collapsed'] = false;
|
||||||
foreach ($mm['nodes'][$id]['children'] as $cid)
|
foreach ($mm['nodes'][$id]['children'] as $cid)
|
||||||
|
|
Loading…
Reference in a new issue