remove deprecated mutable drawing functions: scale, setXY

This commit is contained in:
Tom Hunkapiller
2021-05-24 09:25:52 +03:00
parent 56eecef1a8
commit a56119e7cd
12 changed files with 12 additions and 53 deletions

View File

@ -82,6 +82,11 @@ describe("Border", () => {
],
});
});
it("should not add empty borders element if there are no borders defined", () => {
const tb = new Border({});
expect(() => new Formatter().format(tb)).to.throw();
});
});
});

View File

@ -1,6 +1,6 @@
// http://officeopenxml.com/WPborders.php
import { BorderElement, BorderStyle, IBorderOptions } from "file/border";
import { XmlComponent } from "file/xml-components";
import { IgnoreIfEmptyXmlComponent, XmlComponent } from "file/xml-components";
export interface IBordersOptions {
readonly top?: IBorderOptions;
@ -9,7 +9,7 @@ export interface IBordersOptions {
readonly right?: IBorderOptions;
}
export class Border extends XmlComponent {
export class Border extends IgnoreIfEmptyXmlComponent {
constructor(options: IBordersOptions) {
super("w:pBdr");