Add more changes to table API and documentation
This commit is contained in:
@ -3,6 +3,7 @@ import { Paragraph } from "file/paragraph";
|
||||
import { IXmlableObject, XmlComponent } from "file/xml-components";
|
||||
|
||||
import { Table } from "../table";
|
||||
import { TableCellBorders, VerticalAlign } from "./table-cell-components";
|
||||
import { TableCellProperties } from "./table-cell-properties";
|
||||
|
||||
export class TableCell extends XmlComponent {
|
||||
@ -45,7 +46,19 @@ export class TableCell extends XmlComponent {
|
||||
return para;
|
||||
}
|
||||
|
||||
public get Properties(): TableCellProperties {
|
||||
return this.properties;
|
||||
public setVerticalAlign(type: VerticalAlign): TableCell {
|
||||
this.properties.setVerticalAlign(type);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public addGridSpan(cellSpan: number): TableCell {
|
||||
this.properties.addGridSpan(cellSpan);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public get Borders(): TableCellBorders {
|
||||
return this.properties.Borders;
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ export class TableRow extends XmlComponent {
|
||||
|
||||
public addGridSpan(index: number, cellSpan: number): TableCell {
|
||||
const remainCell = this.cells[index];
|
||||
remainCell.Properties.addGridSpan(cellSpan);
|
||||
remainCell.addGridSpan(cellSpan);
|
||||
this.cells.splice(index + 1, cellSpan - 1);
|
||||
this.root.splice(index + 2, cellSpan - 1);
|
||||
|
||||
|
Reference in New Issue
Block a user