Clean up table with improved demo

This commit is contained in:
Dolan Miu
2021-03-05 03:03:02 +00:00
parent 9557015c6c
commit e5da573041
4 changed files with 114 additions and 36 deletions

View File

@ -61,7 +61,9 @@ export type SectionPropertiesOptions = IPageSizeAttributes &
// Need to decouple this from the attributes
export class SectionProperties extends XmlComponent {
private readonly options: SectionPropertiesOptions;
public readonly width: number;
public readonly rightMargin: number;
public readonly leftMargin: number;
constructor(options: SectionPropertiesOptions = { column: {} }) {
super("w:sectPr");
@ -98,7 +100,10 @@ export class SectionProperties extends XmlComponent {
type,
} = options;
this.options = options;
this.leftMargin = left;
this.rightMargin = right;
this.width = width;
this.root.push(new PageSize(width, height, orientation));
this.root.push(new PageMargin(top, right, bottom, left, header, footer, gutter, mirror));
this.root.push(new Columns(column.space ? column.space : 708, column.count ? column.count : 1, column.separate ?? false));
@ -201,8 +206,4 @@ export class SectionProperties extends XmlComponent {
}
}
}
public get Options(): SectionPropertiesOptions {
return this.options;
}
}