feature: generate pdf from actor

This commit is contained in:
Matthieu CAILLEAUX
2021-10-19 00:32:49 +02:00
parent c66feaf642
commit 338315eed6
6 changed files with 267 additions and 16 deletions

View File

@@ -28,14 +28,16 @@ export class Column extends AbstractElement {
}
public getHeight(doc): number {
return this.elements
.map((e) => e.getHeight(doc))
.reduce((p, c, i) => {
if (i === 0) {
return c;
}
return p + c + 2;
});
return this.elements.length > 0
? this.elements
.map((e) => e.getHeight(doc))
.reduce((p, c, i) => {
if (i === 0) {
return c;
}
return p + c + 2;
})
: 0;
}
public getCheckNewPageHeight(doc?: jsPDF): number {