fixed the single-child Y alignement issue

This commit is contained in:
nadrad 2023-01-07 22:46:24 +01:00
parent d53c923049
commit 5e216d6dad

2
h-m-m
View file

@ -687,7 +687,7 @@ function calculate_children_y(&$mm,$pid)
function calculate_height_shift(&$mm, $id, $shift = 0)
{
$mm['nodes'][$id]['yo'] += $shift;
$shift += max(0, round( ($mm['nodes'][$id]['lh'] - $mm['nodes'][$id]['clh'])/2 - 0.5 ));
$shift += max(0, floor( (($mm['nodes'][$id]['lh'] - $mm['nodes'][$id]['clh']))/2 - 0.9 ));
foreach ($mm['nodes'][$id]['children'] as $cid)
if (!$mm['nodes'][$id]['collapsed'])