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

25 lines
830 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 {
2022-08-31 07:52:27 +01:00
public constructor(accent: string, hasSuperScript: boolean, hasSubScript: boolean) {
2019-08-20 20:40:40 +01:00
super("m:naryPr");
this.root.push(new MathAccentCharacter(accent));
this.root.push(new MathLimitLocation());
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
}
}