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,18 +1,13 @@
import {XmlComponent, Attributes} from "../xml-components";
import {Run} from "../run";
class Break implements XmlComponent {
private br: Array<XmlComponent>;
xmlKeys = {
br: 'w:br'
}
class Break extends XmlComponent {
constructor() {
this.br = new Array<XmlComponent>();
this.br.push(new Attributes({
super("w:br");
this.root.push(new Attributes({
type: "page"
}))
}));
}
}
@ -20,6 +15,6 @@ export class PageBreak extends Run {
constructor() {
super();
this.r.push(new Break());
this.root.push(new Break());
}
}