2017-12-30 21:18:55 +00:00
|
|
|
import { IMediaData } from "file/media";
|
2017-12-30 20:59:05 +00:00
|
|
|
import { XmlComponent } from "file/xml-components";
|
|
|
|
import { Inline } from "./inline";
|
|
|
|
|
|
|
|
export class Drawing extends XmlComponent {
|
2017-12-30 21:18:55 +00:00
|
|
|
constructor(imageData: IMediaData) {
|
2017-12-30 20:59:05 +00:00
|
|
|
super("w:drawing");
|
|
|
|
|
|
|
|
if (imageData === undefined) {
|
|
|
|
throw new Error("imageData cannot be undefined");
|
|
|
|
}
|
|
|
|
|
2018-01-22 20:42:57 +00:00
|
|
|
this.root.push(new Inline(imageData.referenceId, imageData.dimensions));
|
2017-12-30 20:59:05 +00:00
|
|
|
}
|
|
|
|
}
|