Files
docx-js/src/docx/drawing/index.ts
2017-12-20 00:06:08 +00:00

17 lines
417 B
TypeScript

import { XmlComponent } from "../../docx/xml-components";
import { IData } from "../media";
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));
}
}