Fix spelling of "margin"

This commit is contained in:
Nick Georgiou
2019-04-18 13:55:18 +10:00
parent b0f8f8ddbd
commit 29f890918c
11 changed files with 80 additions and 80 deletions

View File

@ -22,8 +22,8 @@ export interface ITableOptions {
readonly width?: number;
readonly widthUnitType?: WidthType;
readonly columnWidths?: number[];
readonly margains?: {
readonly margainUnitType?: WidthType;
readonly margins?: {
readonly marginUnitType?: WidthType;
readonly top?: number;
readonly bottom?: number;
readonly right?: number;
@ -42,7 +42,7 @@ export class Table extends XmlComponent {
width = 100,
widthUnitType = WidthType.AUTO,
columnWidths = Array<number>(columns).fill(100),
margains: { margainUnitType, top, bottom, right, left } = { margainUnitType: WidthType.AUTO, top: 0, bottom: 0, right: 0, left: 0 },
margins: { marginUnitType, top, bottom, right, left } = { marginUnitType: WidthType.AUTO, top: 0, bottom: 0, right: 0, left: 0 },
float,
}: ITableOptions) {
super("w:tbl");
@ -50,10 +50,10 @@ export class Table extends XmlComponent {
this.root.push(this.properties);
this.properties.setBorder();
this.properties.setWidth(width, widthUnitType);
this.properties.CellMargin.addBottomMargin(bottom || 0, margainUnitType);
this.properties.CellMargin.addTopMargin(top || 0, margainUnitType);
this.properties.CellMargin.addLeftMargin(left || 0, margainUnitType);
this.properties.CellMargin.addRightMargin(right || 0, margainUnitType);
this.properties.CellMargin.addBottomMargin(bottom || 0, marginUnitType);
this.properties.CellMargin.addTopMargin(top || 0, marginUnitType);
this.properties.CellMargin.addLeftMargin(left || 0, marginUnitType);
this.properties.CellMargin.addRightMargin(right || 0, marginUnitType);
const grid = new TableGrid(columnWidths);
this.root.push(grid);