2022-06-26 23:26:42 +01:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "@file/xml-components";
|
2021-05-24 21:06:34 +03:00
|
|
|
|
|
|
|
// <xsd:complexType name="CT_VerticalJc">
|
|
|
|
// <xsd:attribute name="val" type="ST_VerticalJc" use="required"/>
|
|
|
|
// </xsd:complexType>
|
|
|
|
|
|
|
|
// <xsd:simpleType name="ST_VerticalJc">
|
|
|
|
// <xsd:restriction base="xsd:string">
|
|
|
|
// <xsd:enumeration value="top"/>
|
|
|
|
// <xsd:enumeration value="center"/>
|
|
|
|
// <xsd:enumeration value="bottom"/>
|
|
|
|
// </xsd:restriction>
|
|
|
|
// </xsd:simpleType>
|
|
|
|
export enum VerticalAlign {
|
|
|
|
BOTTOM = "bottom",
|
|
|
|
CENTER = "center",
|
|
|
|
TOP = "top",
|
|
|
|
}
|
|
|
|
export class VerticalAlignAttributes extends XmlAttributeComponent<{
|
|
|
|
readonly verticalAlign?: VerticalAlign;
|
|
|
|
}> {
|
|
|
|
protected readonly xmlKeys = {
|
|
|
|
verticalAlign: "w:val",
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export class VerticalAlignElement extends XmlComponent {
|
2022-08-31 07:52:27 +01:00
|
|
|
public constructor(value: VerticalAlign) {
|
2021-05-24 21:06:34 +03:00
|
|
|
super("w:vAlign");
|
|
|
|
this.root.push(new VerticalAlignAttributes({ verticalAlign: value }));
|
|
|
|
}
|
|
|
|
}
|