2017-09-21 14:56:46 +01:00
|
|
|
// http://officeopenxml.com/WPspacing.php
|
2017-09-30 01:52:37 +01:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "../../xml-components";
|
2017-03-09 12:12:33 +01:00
|
|
|
|
|
|
|
export interface ISpacingProperties {
|
|
|
|
after?: number;
|
|
|
|
before?: number;
|
|
|
|
line?: number;
|
|
|
|
}
|
|
|
|
|
2017-03-10 10:42:24 +01:00
|
|
|
class SpacingAttributes extends XmlAttributeComponent<ISpacingProperties> {
|
|
|
|
protected xmlKeys = {
|
|
|
|
after: "w:after",
|
|
|
|
before: "w:before",
|
|
|
|
line: "w:line",
|
|
|
|
};
|
2017-03-09 12:12:33 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export class Spacing extends XmlComponent {
|
|
|
|
constructor(opts: ISpacingProperties) {
|
|
|
|
super("w:spacing");
|
|
|
|
this.root.push(new SpacingAttributes(opts));
|
|
|
|
}
|
|
|
|
}
|