Files
docx-js/ts/docx/run/run-components/drawing/index.ts

17 lines
429 B
TypeScript
Raw Normal View History

import { IData } from "../../../../media/data";
import { XmlComponent } from "../../../xml-components";
2017-03-13 00:02:56 +00:00
import { Inline } from "./inline";
export class Drawing extends XmlComponent {
2017-03-12 21:30:46 +00:00
constructor(imageData: IData) {
2017-03-11 18:21:31 +00:00
super("w:drawing");
2017-03-13 00:02:56 +00:00
2017-03-29 22:57:52 +01:00
if (imageData === undefined) {
throw new Error("imageData cannot be undefined");
}
this.root.push(new Inline(imageData.referenceId));
2017-03-11 18:21:31 +00:00
}
2017-03-12 21:30:46 +00:00
}