2018-06-08 16:03:04 +02:00
|
|
|
// http://officeopenxml.com/drwPicFloating-textWrap.php
|
2018-06-09 23:49:01 +01:00
|
|
|
import { XmlAttributeComponent, XmlComponent } from "file/xml-components";
|
|
|
|
import { IDistance } from "../drawing";
|
2018-06-08 16:03:04 +02:00
|
|
|
|
|
|
|
interface IWrapTopAndBottomAttributes {
|
|
|
|
distT?: number;
|
|
|
|
distB?: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
class WrapTopAndBottomAttributes extends XmlAttributeComponent<IWrapTopAndBottomAttributes> {
|
|
|
|
protected xmlKeys = {
|
|
|
|
distT: "distT",
|
|
|
|
distB: "distB",
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export class WrapTopAndBottom extends XmlComponent {
|
2018-06-09 23:49:01 +01:00
|
|
|
constructor(distanceFromText?: IDistance) {
|
2018-06-08 16:03:04 +02:00
|
|
|
super("wp:wrapTopAndBottom");
|
|
|
|
|
|
|
|
distanceFromText = distanceFromText || {
|
|
|
|
distT: 0,
|
|
|
|
distB: 0,
|
|
|
|
};
|
|
|
|
|
|
|
|
this.root.push(
|
|
|
|
new WrapTopAndBottomAttributes({
|
|
|
|
distT: distanceFromText.distT,
|
|
|
|
distB: distanceFromText.distB,
|
|
|
|
}),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|