Improve API

This commit is contained in:
Dolan
2018-10-23 20:03:29 +01:00
parent 54697ab6b1
commit 4633592711
3 changed files with 32 additions and 45 deletions

View File

@ -14,7 +14,7 @@ import { IXmlableObject, XmlComponent } from "file/xml-components";
import { Paragraph } from "../paragraph";
import { TableGrid } from "./grid";
import { TableProperties } from "./properties";
import { TableFloatProperties } from "./table-float-properties";
import { ITableFloatOptions, TableFloatProperties } from "./table-float-properties";
export class Table extends XmlComponent {
private readonly properties: TableProperties;
@ -85,13 +85,13 @@ export class Table extends XmlComponent {
return this;
}
public get Properties(): TableProperties {
return this.properties;
public float(tableFloatProperties: ITableFloatOptions): Table {
this.properties.setTableFloatProperties(new TableFloatProperties(tableFloatProperties));
return this;
}
public setTableFloatProperties(tableFloatProperties: TableFloatProperties): Table {
this.properties.setTableFloatProperties(tableFloatProperties);
return this;
public get Properties(): TableProperties {
return this.properties;
}
}