@contrail/document-generation 2.0.65 → 2.0.66

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.
@@ -31,6 +31,7 @@ class ComponentGridGenerator {
31
31
  const componentPadding = gridTemplate.componentPadding || 20;
32
32
  const alignment = template.alignment || 'left';
33
33
  let startingY = componentPosition.y + componentPadding;
34
+ console.log('STARTING Y', startingY);
34
35
  const rowGap = componentPadding * 3;
35
36
  const colGap = componentPadding * 2;
36
37
  const maxComponentHeight = (idealSize.height - template.gridDimensions.rows * colGap) / template.gridDimensions.rows;
@@ -51,7 +52,7 @@ class ComponentGridGenerator {
51
52
  rowStartX = Math.round(rowStartX);
52
53
  let componentPosition = {
53
54
  x: rowStartX,
54
- y: startingY + row * Math.min(componentSize.height, maxComponentHeight) + (row > 0 ? rowGap : 0),
55
+ y: startingY + row * (Math.min(componentSize.height, maxComponentHeight) + (row > 0 ? rowGap : 0)),
55
56
  };
56
57
  for (let col = 0; col < gridTemplate.gridDimensions.cols; col++) {
57
58
  if (dataIndex >= data.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrail/document-generation",
3
- "version": "2.0.65",
3
+ "version": "2.0.66",
4
4
  "description": "Utilities for automatic generation of documents.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",