Skip to content

Commit

Permalink
first improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
stu241636 authored and tobias committed Nov 8, 2024
1 parent 099fd0d commit bc1d189
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ private KVector placeBoxes(final List<ElkNode> sortedBoxes, final double minSpac
double stddev = areaStdDev(sortedBoxes, mean);

totalArea += (sortedBoxes.size() * 1 * stddev);
// add padding to total area
totalArea += Math.sqrt(totalArea) * (padding.getBottom() + padding.getTop());

// calculate the required row width w to achieve the desired aspect ratio,
// i.e.: w*h=area s.t. w/h=dar -> w=sqrt(area * dar)
Expand Down

0 comments on commit bc1d189

Please sign in to comment.