diff --git a/ea-scripts/Expand rectangles vertically.md b/ea-scripts/Expand rectangles vertically.md index c57982e..1345957 100644 --- a/ea-scripts/Expand rectangles vertically.md +++ b/ea-scripts/Expand rectangles vertically.md @@ -58,9 +58,9 @@ for (var i = 0; i < topGroups.length; i++) { .filter((el) => el.type === "rectangle") .sort((lha, rha) => lha.y - rha.y); - const groupWith = groupHeights[i].height; - if (groupWith < maxGroupHeight) { - const distance = maxGroupHeight - groupWith; + const groupWidth = groupHeights[i].height; + if (groupWidth < maxGroupHeight) { + const distance = maxGroupHeight - groupWidth; const perRectDistance = distance / rects.length; for (var j = 0; j < rects.length; j++) { const rect = rects[j]; @@ -128,4 +128,4 @@ function recalculateEndPointOfLine(line, el) { if(intersectA.length > 0) { line.points[line.points.length - 1] = [intersectA[0][0] - line.x, intersectA[0][1] - line.y]; } -} \ No newline at end of file +}