#1303 Re-name methods to be full english words

This commit is contained in:
Dolan Miu
2021-11-26 15:07:15 +00:00
parent e8a8b73ad0
commit 0be6f31611
4 changed files with 11 additions and 11 deletions

View File

@ -1,12 +1,12 @@
import { expect } from "chai";
import { Formatter } from "export/formatter";
import { PageTDirection, PageTextDirection } from "./page-text-direction";
import { PageTextDirection, PageTextDirectionType } from "./page-text-direction";
describe("PageTextDirection", () => {
describe("#constructor()", () => {
it("should set the direction of the text flow to top-to-bottom-right-to-left", () => {
const textDirection = new PageTDirection(PageTextDirection.TOP_TO_BOTTOM_RIGHT_TO_LEFT);
const textDirection = new PageTextDirection(PageTextDirectionType.TOP_TO_BOTTOM_RIGHT_TO_LEFT);
const tree = new Formatter().format(textDirection);

View File

@ -1,16 +1,16 @@
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
export enum PageTextDirection {
export enum PageTextDirectionType {
LEFT_TO_RIGHT_TOP_TO_BOTTOM = "lrTb",
TOP_TO_BOTTOM_RIGHT_TO_LEFT = "tbRl",
}
class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val: PageTextDirection }> {
class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val: PageTextDirectionType }> {
protected readonly xmlKeys = { val: "w:val" };
}
export class PageTDirection extends XmlComponent {
constructor(value: PageTextDirection) {
export class PageTextDirection extends XmlComponent {
constructor(value: PageTextDirectionType) {
super("w:textDirection");
this.root.push(