fix: regression generate pdf

This commit is contained in:
Matthieu CAILLEAUX
2022-04-29 13:38:39 +02:00
parent 049c77a004
commit 851bc738e5
19 changed files with 485 additions and 184 deletions

View File

@@ -2,20 +2,22 @@ import { AbstractElement } from './abstract-element';
import jsPDF from 'jspdf';
import { Box } from './box';
import { IContext } from './context';
import { GenerateTypeEnum } from './generate-type.enum';
export class Blank extends Box {
constructor(
globalType: GenerateTypeEnum,
x: number,
y: number,
w: number,
h: number,
context: Partial<IContext> = AbstractElement.DEFAULT_CONTEXT
) {
super(x, y, w, h, context);
super(globalType, x, y, w, h, context);
}
public static heightBlank(h: number) {
return new Blank(0, 0, 0, h);
public static heightBlank(globalType: GenerateTypeEnum, h: number) {
return new Blank(globalType, 0, 0, 0, h);
}
public getCheckNewPageHeight(doc?: jsPDF): number {