Update Expand rectangles vertically.md

fix typo
This commit is contained in:
Berlian Gur
2022-07-24 16:54:42 +08:00
committed by GitHub
parent b041088b59
commit 43176e59c3

View File

@@ -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];
}
}
}