2017-04-01 12:18:23 +01:00
|
|
|
import { IData } from "../../media/data";
|
2017-03-12 23:31:43 +00:00
|
|
|
import { Run } from "../run";
|
|
|
|
import { Drawing } from "./run-components/drawing";
|
|
|
|
|
|
|
|
export class PictureRun extends Run {
|
|
|
|
|
2017-04-01 12:18:23 +01:00
|
|
|
constructor(imageData: IData) {
|
2017-03-12 23:31:43 +00:00
|
|
|
super();
|
2017-04-01 12:18:23 +01:00
|
|
|
|
|
|
|
if (imageData === undefined) {
|
|
|
|
throw new Error("imageData cannot be undefined");
|
|
|
|
}
|
|
|
|
|
|
|
|
this.root.push(new Drawing(imageData));
|
2017-03-12 23:31:43 +00:00
|
|
|
}
|
|
|
|
}
|