2021-11-19 22:30:38 +09:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
|
|
|
|
2021-11-26 15:07:15 +00:00
|
|
|
export enum PageTextDirectionType {
|
2021-11-19 22:30:38 +09:00
|
|
|
LEFT_TO_RIGHT_TOP_TO_BOTTOM = "lrTb",
|
|
|
|
TOP_TO_BOTTOM_RIGHT_TO_LEFT = "tbRl",
|
|
|
|
}
|
|
|
|
|
2021-11-26 15:07:15 +00:00
|
|
|
class PageTextDirectionAttributes extends XmlAttributeComponent<{ readonly val: PageTextDirectionType }> {
|
2021-11-19 22:30:38 +09:00
|
|
|
protected readonly xmlKeys = { val: "w:val" };
|
|
|
|
}
|
|
|
|
|
2021-11-26 15:07:15 +00:00
|
|
|
export class PageTextDirection extends XmlComponent {
|
|
|
|
constructor(value: PageTextDirectionType) {
|
2021-11-19 22:30:38 +09:00
|
|
|
super("w:textDirection");
|
|
|
|
|
|
|
|
this.root.push(
|
|
|
|
new PageTextDirectionAttributes({
|
|
|
|
val: value,
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|