2017-03-29 22:47:34 +01:00
|
|
|
import { IData } from "../../../../media/data";
|
2017-03-11 16:56:35 +00:00
|
|
|
import { XmlComponent } from "../../../xml-components";
|
2017-03-13 00:02:56 +00:00
|
|
|
import { Inline } from "./inline";
|
2017-03-11 16:56:35 +00:00
|
|
|
|
|
|
|
export class Drawing extends XmlComponent {
|
2017-03-12 21:30:46 +00:00
|
|
|
|
2017-03-29 22:47:34 +01: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");
|
|
|
|
}
|
|
|
|
|
2017-03-29 22:47:34 +01:00
|
|
|
this.root.push(new Inline(imageData.referenceId));
|
2017-03-11 18:21:31 +00:00
|
|
|
}
|
2017-03-12 21:30:46 +00:00
|
|
|
}
|