@contrail/document-generation 2.0.62 → 2.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -33,7 +33,6 @@ class ComponentGridGenerator {
|
|
|
33
33
|
const rowGap = componentPadding * 3;
|
|
34
34
|
const colGap = componentPadding * 2;
|
|
35
35
|
const maxComponentHeight = (idealSize.height - template.gridDimensions.rows * colGap) / template.gridDimensions.rows;
|
|
36
|
-
startingPosition.y += componentPadding;
|
|
37
36
|
for (let row = 0; row < gridTemplate.gridDimensions.rows; row++) {
|
|
38
37
|
const remainingItems = data.length - dataIndex;
|
|
39
38
|
const itemsInRow = Math.min(remainingItems, gridTemplate.gridDimensions.cols);
|
|
@@ -51,7 +50,7 @@ class ComponentGridGenerator {
|
|
|
51
50
|
rowStartX = Math.round(rowStartX);
|
|
52
51
|
let componentPosition = {
|
|
53
52
|
x: rowStartX,
|
|
54
|
-
y: startingPosition.y + row *
|
|
53
|
+
y: startingPosition.y + row * Math.min(componentSize.height, maxComponentHeight) + (row > 0 ? rowGap : 0),
|
|
55
54
|
};
|
|
56
55
|
for (let col = 0; col < gridTemplate.gridDimensions.cols; col++) {
|
|
57
56
|
if (dataIndex >= data.length) {
|