From b43ed12c8476e34cc56e33f097d85515405332ae Mon Sep 17 00:00:00 2001 From: Dolan Date: Sun, 29 Sep 2019 04:38:07 +0100 Subject: [PATCH] Fix tests --- demo/32-merge-and-shade-table-cells.ts | 24 ++++++++++++++++-------- demo/34-floating-tables.ts | 6 ++++-- demo/44-multiple-columns.ts | 4 ++-- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/demo/32-merge-and-shade-table-cells.ts b/demo/32-merge-and-shade-table-cells.ts index 1112931079..77d6815d1e 100644 --- a/demo/32-merge-and-shade-table-cells.ts +++ b/demo/32-merge-and-shade-table-cells.ts @@ -58,8 +58,10 @@ const table2 = new Table({ ], }), ], - width: 100, - widthUnitType: WidthType.AUTO, + width: { + size: 100, + type: WidthType.AUTO, + }, columnWidths: [1000, 1000, 1000], }); @@ -113,8 +115,10 @@ const table3 = new Table({ ], }), ], - width: 7000, - widthUnitType: WidthType.DXA, + width: { + size: 7000, + type: WidthType.DXA, + }, margins: { top: 400, bottom: 400, @@ -152,8 +156,10 @@ const table4 = new Table({ ], }), ], - width: 100, - widthUnitType: WidthType.PERCENTAGE, + width: { + size: 100, + type: WidthType.PERCENTAGE, + }, }); const table5 = new Table({ @@ -194,8 +200,10 @@ const table5 = new Table({ ], }), ], - width: 100, - widthUnitType: WidthType.PERCENTAGE, + width: { + size: 100, + type: WidthType.PERCENTAGE, + }, }); doc.addSection({ diff --git a/demo/34-floating-tables.ts b/demo/34-floating-tables.ts index 4a20ae2eee..dadf80f9da 100644 --- a/demo/34-floating-tables.ts +++ b/demo/34-floating-tables.ts @@ -44,8 +44,10 @@ const table = new Table({ relativeHorizontalPosition: RelativeHorizontalPosition.RIGHT, relativeVerticalPosition: RelativeVerticalPosition.BOTTOM, }, - width: 4535, - widthUnitType: WidthType.DXA, + width: { + size: 4535, + type: WidthType.DXA, + }, layout: TableLayoutType.FIXED, }); diff --git a/demo/44-multiple-columns.ts b/demo/44-multiple-columns.ts index 3fdf328461..3985486620 100644 --- a/demo/44-multiple-columns.ts +++ b/demo/44-multiple-columns.ts @@ -8,7 +8,7 @@ const doc = new Document(); doc.addSection({ properties: { column: { - width: 708, + space: 708, count: 2, }, }, @@ -23,7 +23,7 @@ doc.addSection({ doc.addSection({ properties: { column: { - width: 708, + space: 708, count: 3, }, },