@@ -619,9 +619,9 @@ LayoutBuilder.prototype.processRow = function ({ marginX = [0, 0], dontBreakRows
619
619
// Reference to the last cell of the rowspan
620
620
endingSpanCell = startingSpanCell . _endingCell ;
621
621
// Store if we are in an unbreakable block when we save the context and the originalX
622
- if ( this . writer . transactionLevel > 0 ) {
622
+ if ( self . writer . transactionLevel > 0 ) {
623
623
endingSpanCell . _isUnbreakableContext = true ;
624
- endingSpanCell . _originalXOffset = this . writer . originalX ;
624
+ endingSpanCell . _originalXOffset = self . writer . originalX ;
625
625
}
626
626
}
627
627
@@ -635,13 +635,13 @@ LayoutBuilder.prototype.processRow = function ({ marginX = [0, 0], dontBreakRows
635
635
var discountY = 0 ;
636
636
if ( dontBreakRows ) {
637
637
// Calculate how many points we have to discount to Y when dontBreakRows and rowSpan are combined
638
- const ctxBeforeRowSpanLastRow = this . writer . contextStack [ this . writer . contextStack . length - 1 ] ;
638
+ const ctxBeforeRowSpanLastRow = self . writer . contextStack [ self . writer . contextStack . length - 1 ] ;
639
639
discountY = ctxBeforeRowSpanLastRow . y - column . _startingRowSpanY ;
640
640
}
641
641
var originalXOffset = 0 ;
642
642
// If context was saved from an unbreakable block and we are not in an unbreakable block anymore
643
643
// We have to sum the originalX (X before starting unbreakable block) to X
644
- if ( column . _isUnbreakableContext && ! this . writer . transactionLevel ) {
644
+ if ( column . _isUnbreakableContext && ! self . writer . transactionLevel ) {
645
645
originalXOffset = column . _originalXOffset ;
646
646
}
647
647
// row-span ending
@@ -665,9 +665,9 @@ LayoutBuilder.prototype.processRow = function ({ marginX = [0, 0], dontBreakRows
665
665
// Context will be stored here (ending cell)
666
666
endingSpanCell = startingSpanCell . _endingCell ;
667
667
// Store if we are in an unbreakable block when we save the context and the originalX
668
- if ( this . writer . transactionLevel > 0 ) {
668
+ if ( self . writer . transactionLevel > 0 ) {
669
669
endingSpanCell . _isUnbreakableContext = true ;
670
- endingSpanCell . _originalXOffset = this . writer . originalX ;
670
+ endingSpanCell . _originalXOffset = self . writer . originalX ;
671
671
}
672
672
}
673
673
}
@@ -678,7 +678,7 @@ LayoutBuilder.prototype.processRow = function ({ marginX = [0, 0], dontBreakRows
678
678
679
679
// If content did not break page, check if we should break by height
680
680
if ( ! isUnbreakableRow && pageBreaks . length === 0 && willBreakByHeight ) {
681
- self . writer . context ( ) . moveDown ( this . writer . context ( ) . availableHeight ) ;
681
+ self . writer . context ( ) . moveDown ( self . writer . context ( ) . availableHeight ) ;
682
682
self . writer . moveToNextPage ( ) ;
683
683
}
684
684
0 commit comments