@@ -2146,21 +2146,22 @@ export class DomPainter {
21462146 return null ;
21472147 }
21482148 }
2149- private renderColumnSeparators ( pageEl : HTMLElement , page : Page , pageWidth : number , pageHeight : number ) : void {
2150- if ( ! this . doc ) return ;
2151- if ( ! page . columns ) return ;
2152- if ( ! page . columns . withSeparator ) return ;
2153- if ( page . columns . count <= 1 ) return ;
2154- if ( ! page . margins ) return ;
2155-
2156- const leftMargin = page . margins . left ?? 0 ;
2157- const rightMargin = page . margins . right ?? 0 ;
2158- const topMargin = page . margins . top ?? 0 ;
2159- const bottomMargin = page . margins . bottom ?? 0 ;
2160- const contentWidth = pageWidth - leftMargin - rightMargin ;
2161- const columnCount = page . columns . count ;
2162- const gap = page . columns . gap ;
2163- const columnWidth = ( contentWidth - gap * ( columnCount - 1 ) ) / columnCount ;
2149+
2150+ private renderColumnSeparators ( pageEl : HTMLElement , page : Page , pageWidth : number , pageHeight : number ) : void {
2151+ if ( ! this . doc ) return ;
2152+ if ( ! page . columns ) return ;
2153+ if ( ! page . columns . withSeparator ) return ;
2154+ if ( page . columns . count <= 1 ) return ;
2155+ if ( ! page . margins ) return ;
2156+
2157+ const leftMargin = page . margins . left ?? 0 ;
2158+ const rightMargin = page . margins . right ?? 0 ;
2159+ const topMargin = page . margins . top ?? 0 ;
2160+ const bottomMargin = page . margins . bottom ?? 0 ;
2161+ const contentWidth = pageWidth - leftMargin - rightMargin ;
2162+ const columnCount = page . columns . count ;
2163+ const gap = page . columns . gap ;
2164+ const columnWidth = ( contentWidth - gap * ( columnCount - 1 ) ) / columnCount ;
21642165
21652166 // Given the separator will have 1px width, ensure column has a larger width.
21662167 if ( columnWidth <= 1 ) {
@@ -2618,7 +2619,7 @@ export class DomPainter {
26182619 this . renderDecorationsForPage ( el , page , pageIndex ) ;
26192620 this . renderColumnSeparators ( el , page , pageSize . w , pageSize . h ) ;
26202621
2621- return { element : el , fragments : fragmentStates } ;
2622+ return { element : el , fragments : fragmentStates } ;
26222623 }
26232624
26242625 private applySemanticPageOverrides ( el : HTMLElement ) : void {
0 commit comments