Change image API so that it now sends Images
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { Footer } from "./footer/footer";
|
||||
import { IMediaData, Media } from "./media";
|
||||
import { Paragraph } from "./paragraph";
|
||||
import { Media } from "./media";
|
||||
import { Image, Paragraph } from "./paragraph";
|
||||
import { Relationships } from "./relationships";
|
||||
import { Table } from "./table";
|
||||
|
||||
@ -32,10 +32,6 @@ export class FooterWrapper {
|
||||
return this.footer.createTable(rows, cols);
|
||||
}
|
||||
|
||||
public addDrawing(imageData: IMediaData): void {
|
||||
this.footer.addDrawing(imageData);
|
||||
}
|
||||
|
||||
public addChildElement(childElement: XmlComponent | string): void {
|
||||
this.footer.addChildElement(childElement);
|
||||
}
|
||||
@ -47,7 +43,12 @@ export class FooterWrapper {
|
||||
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",
|
||||
`media/${mediaData.fileName}`,
|
||||
);
|
||||
this.addDrawing(mediaData);
|
||||
this.insertImage(new Image(mediaData));
|
||||
}
|
||||
|
||||
public insertImage(image: Image): FooterWrapper {
|
||||
this.footer.addParagraph(image);
|
||||
return this;
|
||||
}
|
||||
|
||||
public get Footer(): Footer {
|
||||
|
Reference in New Issue
Block a user