Files
docx-js/src/file/drawing/inline/extent/extent.ts

25 lines
547 B
TypeScript
Raw Normal View History

import { XmlComponent } from "file/xml-components";
import { ExtentAttributes } from "./extent-attributes";
export class Extent extends XmlComponent {
2018-03-24 19:06:10 +00:00
private attributes: ExtentAttributes;
2018-01-22 20:42:57 +00:00
constructor(x: number, y: number) {
super("wp:extent");
2018-03-24 19:06:10 +00:00
this.attributes = new ExtentAttributes({
cx: x,
cy: y,
});
this.root.push(this.attributes);
}
public setXY(x: number, y: number): void {
this.attributes.set({
cx: x,
cy: y,
});
}
}