added a attribute to graphic

This commit is contained in:
Dolan Miu
2017-03-13 00:40:39 +00:00
parent eeb2187db4
commit 66eace4a33
2 changed files with 17 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import { XmlAttributeComponent, XmlComponent } from "../../../../../../../../xml-components";
export interface IBlipProperties {
embed?: string;
interface IBlipProperties {
embed: string;
}
class BlipAttributes extends XmlAttributeComponent<IBlipProperties> {

View File

@ -1,10 +1,24 @@
import { XmlComponent } from "../../../../../xml-components";
import { XmlAttributeComponent, XmlComponent } from "../../../../../xml-components";
import { GraphicData } from "./graphic-data";
interface IGraphicProperties {
a: string;
}
class GraphicAttributes extends XmlAttributeComponent<IGraphicProperties> {
protected xmlKeys = {
a: "xmlns:a",
};
}
export class Graphic extends XmlComponent {
constructor(referenceId: number) {
super("a:graphic");
this.root.push(new GraphicAttributes({
a: "http://schemas.openxmlformats.org/drawingml/2006/main",
}));
this.root.push(new GraphicData(referenceId));
}
}