@softwear/latestcollectioncore 1.0.181 → 1.0.182
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.
- package/dist/reports.js +17 -2
- package/package.json +1 -1
- package/src/reports.ts +17 -2
- package/test/reports.spec.ts +2 -2
package/dist/reports.js
CHANGED
|
@@ -405,9 +405,24 @@ function addPage(originX, originY, doc, layout, rootPrintBuffer, paperSize, opti
|
|
|
405
405
|
originY = containerChain[0].object.y;
|
|
406
406
|
absoluteLowerRightHandSide.x = originX / 10;
|
|
407
407
|
absoluteLowerRightHandSide.y = originY / 10;
|
|
408
|
-
containerChain.forEach((link) => {
|
|
408
|
+
containerChain.forEach((link, linkIdx) => {
|
|
409
|
+
var _a;
|
|
410
|
+
const chainChild = (_a = containerChain[linkIdx + 1]) === null || _a === void 0 ? void 0 : _a.object;
|
|
409
411
|
link.object.children.forEach((child) => {
|
|
410
|
-
if (
|
|
412
|
+
if (child.snapToBottom)
|
|
413
|
+
return;
|
|
414
|
+
// Advance past bound repeat containers on the overflow path (they are not redrawn here; the
|
|
415
|
+
// innermost link draws their leaves). Without this, nested x/y offsets are lost on page 2+.
|
|
416
|
+
if (child.type === 'container' &&
|
|
417
|
+
chainChild &&
|
|
418
|
+
child === chainChild &&
|
|
419
|
+
!containerRedrawsAfterContinuationPage(child)) {
|
|
420
|
+
const c = child;
|
|
421
|
+
originX += c.x;
|
|
422
|
+
originY += c.y;
|
|
423
|
+
return;
|
|
424
|
+
}
|
|
425
|
+
if (child.type != 'container' || containerRedrawsAfterContinuationPage(child)) {
|
|
411
426
|
const childLowerRightHandSide = addObjectToPDF(originX, originY, doc, child, link.printBuffer, paperSize, layout, options, rootPrintBuffer, [], context);
|
|
412
427
|
absoluteLowerRightHandSide.x = Math.max(absoluteLowerRightHandSide.x, childLowerRightHandSide.x);
|
|
413
428
|
absoluteLowerRightHandSide.y = Math.max(absoluteLowerRightHandSide.y, childLowerRightHandSide.y);
|
package/package.json
CHANGED
package/src/reports.ts
CHANGED
|
@@ -477,9 +477,24 @@ function addPage(
|
|
|
477
477
|
originY = containerChain[0].object.y
|
|
478
478
|
absoluteLowerRightHandSide.x = originX / 10
|
|
479
479
|
absoluteLowerRightHandSide.y = originY / 10
|
|
480
|
-
containerChain.forEach((link) => {
|
|
480
|
+
containerChain.forEach((link, linkIdx) => {
|
|
481
|
+
const chainChild = containerChain[linkIdx + 1]?.object
|
|
481
482
|
link.object.children.forEach((child) => {
|
|
482
|
-
if (
|
|
483
|
+
if (child.snapToBottom) return
|
|
484
|
+
// Advance past bound repeat containers on the overflow path (they are not redrawn here; the
|
|
485
|
+
// innermost link draws their leaves). Without this, nested x/y offsets are lost on page 2+.
|
|
486
|
+
if (
|
|
487
|
+
child.type === 'container' &&
|
|
488
|
+
chainChild &&
|
|
489
|
+
child === chainChild &&
|
|
490
|
+
!containerRedrawsAfterContinuationPage(child)
|
|
491
|
+
) {
|
|
492
|
+
const c = child as ContainerLayoutObject
|
|
493
|
+
originX += c.x
|
|
494
|
+
originY += c.y
|
|
495
|
+
return
|
|
496
|
+
}
|
|
497
|
+
if (child.type != 'container' || containerRedrawsAfterContinuationPage(child)) {
|
|
483
498
|
const childLowerRightHandSide = addObjectToPDF(originX, originY, doc, child, link.printBuffer, paperSize, layout, options, rootPrintBuffer, [], context)
|
|
484
499
|
absoluteLowerRightHandSide.x = Math.max(absoluteLowerRightHandSide.x, childLowerRightHandSide.x)
|
|
485
500
|
absoluteLowerRightHandSide.y = Math.max(absoluteLowerRightHandSide.y, childLowerRightHandSide.y)
|