diff --git a/demo/31-tables.ts b/demo/31-tables.ts index 601e216c49..24fc6030f8 100644 --- a/demo/31-tables.ts +++ b/demo/31-tables.ts @@ -18,12 +18,12 @@ const table = new Table({ verticalAlign: VerticalAlign.CENTER, }), new TableCell({ - children: [new Paragraph({text: "bottom to top"}), new Paragraph({})], - textDirection: TextDirection.BOTTOMTOTOPLEFTTORIGHT + children: [new Paragraph({ text: "bottom to top" }), new Paragraph({})], + textDirection: TextDirection.BOTTOM_TO_TOP_LEFT_TO_RIGHT, }), new TableCell({ - children: [new Paragraph({text: "top to bottom"}), new Paragraph({})], - textDirection: TextDirection.TOPTOBOTTOMRIGHTTOLEFT + children: [new Paragraph({ text: "top to bottom" }), new Paragraph({})], + textDirection: TextDirection.TOP_TO_BOTTOM_RIGHT_TO_LEFT, }), ], }), diff --git a/src/file/table/table-cell/table-cell-components.ts b/src/file/table/table-cell/table-cell-components.ts index 0afe1cd291..f3ebe570e9 100644 --- a/src/file/table/table-cell/table-cell-components.ts +++ b/src/file/table/table-cell/table-cell-components.ts @@ -159,9 +159,9 @@ export class VAlign extends XmlComponent { } export enum TextDirection { - BOTTOMTOTOPLEFTTORIGHT = "btLr", - LEFTTORIGHTTOPTOBOTTOM = "lrTb", - TOPTOBOTTOMRIGHTTOLEFT = "tbRl", + BOTTOM_TO_TOP_LEFT_TO_RIGHT = "btLr", + LEFT_TO_RIGHT_TOP_TO_BOTTOM = "lrTb", + TOP_TO_BOTTOM_RIGHT_TO_LEFT = "tbRl", } class TDirectionAttributes extends XmlAttributeComponent<{ readonly val: TextDirection }> { diff --git a/src/file/table/table-cell/table-cell.spec.ts b/src/file/table/table-cell/table-cell.spec.ts index b22538978b..2ba34bc9d4 100644 --- a/src/file/table/table-cell/table-cell.spec.ts +++ b/src/file/table/table-cell/table-cell.spec.ts @@ -274,7 +274,7 @@ describe("TableCell", () => { it("should create with text direction", () => { const cell = new TableCell({ children: [], - textDirection: TextDirection.BOTTOMTOTOPLEFTTORIGHT, + textDirection: TextDirection.BOTTOM_TO_TOP_LEFT_TO_RIGHT, }); const tree = new Formatter().format(cell);