diff --git a/ea-scripts/Expand rectangles horizontally.md b/ea-scripts/Expand rectangles horizontally.md index 710070e..5657409 100644 --- a/ea-scripts/Expand rectangles horizontally.md +++ b/ea-scripts/Expand rectangles horizontally.md @@ -52,9 +52,7 @@ for (var i = 0; i < topGroups.length; i++) { const rects = topGroups[i] .filter((el) => el.type === "rectangle") .sort((lha, rha) => lha.x - rha.x); - const texts = topGroups[i] - .filter((el) => el.type === "text") - .sort((lha, rha) => lha.x - rha.x); + const groupWith = groupWidths[i].width; if (groupWith < maxGroupWidth) { const distance = maxGroupWidth - groupWith; @@ -64,10 +62,6 @@ for (var i = 0; i < topGroups.length; i++) { rect.x = rect.x + perRectDistance * j; rect.width += perRectDistance; } - for (var j = 0; j < texts.length; j++) { - const text = texts[j]; - text.x = text.x + perRectDistance * j; - } } } diff --git a/ea-scripts/Expand rectangles vertically.md b/ea-scripts/Expand rectangles vertically.md index 6a45d34..afe0c40 100644 --- a/ea-scripts/Expand rectangles vertically.md +++ b/ea-scripts/Expand rectangles vertically.md @@ -49,9 +49,7 @@ for (var i = 0; i < topGroups.length; i++) { const rects = topGroups[i] .filter((el) => el.type === "rectangle") .sort((lha, rha) => lha.y - rha.y); - const texts = topGroups[i] - .filter((el) => el.type === "text") - .sort((lha, rha) => lha.y - rha.y); + const groupWith = groupHeights[i].height; if (groupWith < maxGroupHeight) { const distance = maxGroupHeight - groupWith; @@ -61,10 +59,6 @@ for (var i = 0; i < topGroups.length; i++) { rect.y = rect.y + perRectDistance * j; rect.height += perRectDistance; } - for (var j = 0; j < texts.length; j++) { - const text = texts[j]; - text.y = text.y + perRectDistance * j; - } } }