added tab stops

This commit is contained in:
Dolan Miu
2016-05-18 17:06:21 +01:00
parent 70a96d9d2f
commit af818df800
3 changed files with 40 additions and 8 deletions

View File

@ -3,7 +3,7 @@ import {ThematicBreak} from "./border";
import {PageBreak} from "./page-break";
import {TextRun} from "../run/text-run";
import {ParagraphProperties} from "./properties";
import {TabStop} from "../tab-stop";
import {MaxRightTabStop, LeftTabStop} from "./tab-stop";
import {Style} from "./style";
import {NumberProperties} from "./unordered-list";
@ -94,8 +94,13 @@ export class Paragraph extends XmlComponent {
return this;
}
addTabStop(tabStop: TabStop): Paragraph {
this.properties.push(tabStop);
maxRightTabStop(): Paragraph {
this.properties.push(new MaxRightTabStop());
return this;
}
leftTabStop(position: number): Paragraph {
this.properties.push(new LeftTabStop(position))
return this;
}