now extends XmlComponent

This commit is contained in:
Dolan Miu
2016-04-09 20:16:35 +01:00
parent 84610bd72f
commit f68a2aff56
33 changed files with 180 additions and 371 deletions

View File

@ -1,20 +1,15 @@
import {XmlComponent, Attributes} from "../../xml-components";
import {SectionProperties} from "./section-properties";
export class Body implements XmlComponent {
private body: Array<XmlComponent>;
xmlKeys = {
body: 'w:body'
}
export class Body extends XmlComponent {
constructor() {
this.body = new Array<XmlComponent>();
//this.body.push(new SectionProperties()); not actually needed
super("w:body");
//this.root.push(new SectionProperties()); not actually needed
}
push(component: XmlComponent) {
//this.body.splice(this.body.length - 1, 0, component);
this.body.push(component);
//this.root.splice(this.body.length - 1, 0, component);
this.root.push(component);
}
}