Files
docx-js/ts/docx/run/run-components/drawing/index.ts
2017-03-29 22:57:52 +01:00

17 lines
429 B
TypeScript

import { IData } from "../../../../media/data";
import { XmlComponent } from "../../../xml-components";
import { Inline } from "./inline";
export class Drawing extends XmlComponent {
constructor(imageData: IData) {
super("w:drawing");
if (imageData === undefined) {
throw new Error("imageData cannot be undefined");
}
this.root.push(new Inline(imageData.referenceId));
}
}