2018-06-08 16:03:04 +02:00
|
|
|
// http://officeopenxml.com/drwPicFloating-position.php
|
2018-06-09 23:49:01 +01:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
2018-06-08 16:03:04 +02:00
|
|
|
|
2021-03-15 00:11:39 +00:00
|
|
|
class SimplePosAttributes extends XmlAttributeComponent<{
|
2018-11-02 02:51:57 +00:00
|
|
|
readonly x: number;
|
|
|
|
readonly y: number;
|
2021-03-15 00:11:39 +00:00
|
|
|
}> {
|
2018-11-02 02:51:57 +00:00
|
|
|
protected readonly xmlKeys = {
|
2018-06-08 16:03:04 +02:00
|
|
|
x: "x",
|
|
|
|
y: "y",
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export class SimplePos extends XmlComponent {
|
|
|
|
constructor() {
|
|
|
|
super("wp:simplePos");
|
|
|
|
|
|
|
|
// NOTE: It's not fully supported in Microsoft Word, but this element is needed anyway
|
|
|
|
this.root.push(
|
|
|
|
new SimplePosAttributes({
|
|
|
|
x: 0,
|
|
|
|
y: 0,
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|