Merge pull request #4876 from tsiegleauq/refactor-PDF-TOC

Fix PDF TOC header
This commit is contained in:
Sean 2019-07-25 09:42:42 +02:00 committed by GitHub
commit d330a4ca97
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -132,7 +132,7 @@ export class MotionPdfCatalogService {
body: [
[
{
text: category.getTitle(),
text: category.nameWithParentAbove,
style: !!category.parent ? 'tocSubcategoryTitle' : 'tocCategoryTitle'
}
]
@ -158,7 +158,12 @@ export class MotionPdfCatalogService {
}
catTocBody.push(
this.pdfService.createTocTableDef(tocBody, StyleType.CATEGORY_SECTION, layout, header)
this.pdfService.createTocTableDef(
tocBody,
StyleType.CATEGORY_SECTION,
layout,
header ? JSON.parse(JSON.stringify(header)) : null
)
);
catTocBody.push(this.pdfService.getPageBreak());