Fix some linting errors
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
import { IMediaData } from "file/media";
|
||||
import { XmlComponent } from "file/xml-components";
|
||||
import { Header } from "./header/header";
|
||||
import { Image, Media } from "./media";
|
||||
import { ImageParagraph, Paragraph } from "./paragraph";
|
||||
import { Relationships } from "./relationships";
|
||||
import { Table } from "./table";
|
||||
import { IMediaData } from 'file/media';
|
||||
|
||||
|
||||
export class HeaderWrapper {
|
||||
private readonly header: Header;
|
||||
@ -13,7 +12,7 @@ export class HeaderWrapper {
|
||||
public readonly media = new Media();
|
||||
|
||||
// constructor(private readonly media: Media, referenceId: number, initContent? : XmlComponent) {
|
||||
constructor(referenceId: number, initContent? : XmlComponent) {
|
||||
constructor(referenceId: number, initContent?: XmlComponent) {
|
||||
this.header = new Header(referenceId, initContent);
|
||||
this.relationships = new Relationships();
|
||||
}
|
||||
@ -40,7 +39,7 @@ export class HeaderWrapper {
|
||||
this.header.addChildElement(childElement);
|
||||
}
|
||||
|
||||
public addImageRelation(image: Buffer, refId : number, width?: number, height?: number) : IMediaData {
|
||||
public addImageRelation(image: Buffer, refId: number, width?: number, height?: number): IMediaData {
|
||||
const mediaData = this.media.addMedia(image, refId, width, height);
|
||||
this.relationships.createRelationship(
|
||||
refId,
|
||||
@ -49,9 +48,9 @@ export class HeaderWrapper {
|
||||
);
|
||||
return mediaData;
|
||||
}
|
||||
|
||||
|
||||
public createImage(image: Buffer, width?: number, height?: number): void {
|
||||
let mediaData = this.addImageRelation(image, this.relationships.RelationshipCount, width, height);
|
||||
const mediaData = this.addImageRelation(image, this.relationships.RelationshipCount, width, height);
|
||||
this.addImage(new Image(new ImageParagraph(mediaData)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user