Make Paragraph declaritive
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import { Attributes, XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
||||
import {
|
||||
Alignment,
|
||||
AlignmentOptions,
|
||||
AlignmentType,
|
||||
Indent,
|
||||
ISpacingProperties,
|
||||
KeepLines,
|
||||
@ -114,7 +114,7 @@ export class LevelBase extends XmlComponent {
|
||||
this.root.push(new LevelJc(lvlJc));
|
||||
}
|
||||
|
||||
this.paragraphProperties = new ParagraphProperties();
|
||||
this.paragraphProperties = new ParagraphProperties({});
|
||||
this.runProperties = new RunProperties();
|
||||
|
||||
this.root.push(this.paragraphProperties);
|
||||
@ -201,22 +201,22 @@ export class LevelBase extends XmlComponent {
|
||||
// --------------------- Paragraph formatting ------------------------ //
|
||||
|
||||
public center(): Level {
|
||||
this.addParagraphProperty(new Alignment(AlignmentOptions.CENTER));
|
||||
this.addParagraphProperty(new Alignment(AlignmentType.CENTER));
|
||||
return this;
|
||||
}
|
||||
|
||||
public left(): Level {
|
||||
this.addParagraphProperty(new Alignment(AlignmentOptions.LEFT));
|
||||
this.addParagraphProperty(new Alignment(AlignmentType.LEFT));
|
||||
return this;
|
||||
}
|
||||
|
||||
public right(): Level {
|
||||
this.addParagraphProperty(new Alignment(AlignmentOptions.RIGHT));
|
||||
this.addParagraphProperty(new Alignment(AlignmentType.RIGHT));
|
||||
return this;
|
||||
}
|
||||
|
||||
public justified(): Level {
|
||||
this.addParagraphProperty(new Alignment(AlignmentOptions.BOTH));
|
||||
this.addParagraphProperty(new Alignment(AlignmentType.BOTH));
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user