Fix ordering of elements in table-cell-borders and section-properties

This commit is contained in:
Tom Hunkapiller
2021-05-20 02:18:17 +03:00
parent 56b18d3793
commit 30912e7aaf
6 changed files with 55 additions and 51 deletions

View File

@ -568,15 +568,6 @@ describe("TableCell", () => {
},
},
},
{
"w:bottom": {
_attr: {
"w:color": "blue",
"w:sz": 3,
"w:val": "double",
},
},
},
{
"w:left": {
_attr: {
@ -586,6 +577,15 @@ describe("TableCell", () => {
},
},
},
{
"w:bottom": {
_attr: {
"w:color": "blue",
"w:sz": 3,
"w:val": "double",
},
},
},
{
"w:right": {
_attr: {

View File

@ -77,12 +77,12 @@ export class TableCell extends XmlComponent {
if (options.borders.top) {
properties.Borders.addTopBorder(options.borders.top.style, options.borders.top.size, options.borders.top.color);
}
if (options.borders.bottom) {
properties.Borders.addBottomBorder(options.borders.bottom.style, options.borders.bottom.size, options.borders.bottom.color);
}
if (options.borders.left) {
properties.Borders.addLeftBorder(options.borders.left.style, options.borders.left.size, options.borders.left.color);
}
if (options.borders.bottom) {
properties.Borders.addBottomBorder(options.borders.bottom.style, options.borders.bottom.size, options.borders.bottom.color);
}
if (options.borders.right) {
properties.Borders.addRightBorder(options.borders.right.style, options.borders.right.size, options.borders.right.color);
}