fix: optimize separator + missing css

This commit is contained in:
Matthieu CAILLEAUX
2021-10-19 01:43:48 +02:00
parent e28eb3cd12
commit b35284768e
10 changed files with 274 additions and 182 deletions

View File

@@ -18,7 +18,9 @@ export class Column extends AbstractElement {
element.x = Math.max(element.x, this.x);
element.y = currentY;
element.prepareRender(doc);
currentY += element.getHeight(doc) + 2;
const elementHeight = element.getHeight(doc);
currentY +=
elementHeight > 0 ? element.getHeight(doc) + 2 : elementHeight;
}
return doc;
}
@@ -53,4 +55,8 @@ export class Column extends AbstractElement {
}
return elements;
}
public isEmpty(): boolean {
return this.elements.length === 0;
}
}