Files
docx-js/src/file/paragraph/math/n-ary/math-n-ary-properties.ts

27 lines
911 B
TypeScript
Raw Normal View History

2019-08-20 20:40:40 +01:00
// http://www.datypic.com/sc/ooxml/e-m_naryPr-1.html
import { XmlComponent } from "@file/xml-components";
2019-08-20 20:40:40 +01:00
import { MathAccentCharacter } from "./math-accent-character";
import { MathLimitLocation } from "./math-limit-location";
2020-10-10 13:41:26 +01:00
import { MathSubScriptHide } from "./math-sub-script-hide";
import { MathSuperScriptHide } from "./math-super-script-hide";
2019-08-20 20:40:40 +01:00
2022-07-05 05:06:32 +01:00
export class MathNAryProperties extends XmlComponent {
public constructor(accent: string, hasSuperScript: boolean, hasSubScript: boolean, limitLocationVal?: string) {
2019-08-20 20:40:40 +01:00
super("m:naryPr");
2022-10-16 00:29:16 +01:00
if (!!accent) {
2022-10-08 12:56:35 +11:00
this.root.push(new MathAccentCharacter(accent));
}
this.root.push(new MathLimitLocation(limitLocationVal));
2020-10-10 13:41:26 +01:00
if (!hasSuperScript) {
this.root.push(new MathSuperScriptHide());
}
if (!hasSubScript) {
this.root.push(new MathSubScriptHide());
}
2019-08-20 20:40:40 +01:00
}
}