mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-05-16 22:36:32 +02:00
fixed the single-child Y alignement issue
This commit is contained in:
parent
d53c923049
commit
5e216d6dad
2
h-m-m
2
h-m-m
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue