add support for floating drawings
- added need elements and test for them
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
import { Drawing } from "../../drawing";
|
||||
import { IMediaData } from "../../media/data";
|
||||
import { Run } from "../run";
|
||||
import { DrawingOptions } from "../../drawing/drawing";
|
||||
|
||||
export class PictureRun extends Run {
|
||||
constructor(imageData: IMediaData) {
|
||||
constructor(imageData: IMediaData, drawingOptions?: DrawingOptions) {
|
||||
super();
|
||||
|
||||
if (imageData === undefined) {
|
||||
throw new Error("imageData cannot be undefined");
|
||||
}
|
||||
|
||||
this.root.push(new Drawing(imageData));
|
||||
this.root.push(new Drawing(imageData, drawingOptions));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user