Text wrapping and borders for images

This commit is contained in:
Dolan
2019-01-10 02:10:20 +00:00
parent a37ff90bd7
commit 4541d7c977
11 changed files with 217 additions and 77 deletions

View File

@ -3,7 +3,7 @@ import { assert } from "chai";
import { Utility } from "tests/utility";
import { IDrawingOptions } from "../drawing";
import { TextWrapStyle } from "../text-wrap";
import { TextWrappingType } from "../text-wrap";
import { Anchor } from "./anchor";
function createAnchor(drawingOptions: IDrawingOptions): Anchor {
@ -123,9 +123,6 @@ describe("Anchor", () => {
it("should create a Drawing with square text wrapping", () => {
anchor = createAnchor({
textWrapping: {
textWrapStyle: TextWrapStyle.SQUARE,
},
floating: {
verticalPosition: {
offset: 0,
@ -133,6 +130,9 @@ describe("Anchor", () => {
horizontalPosition: {
offset: 0,
},
wrap: {
type: TextWrappingType.SQUARE,
},
},
});
const newJson = Utility.jsonify(anchor);
@ -145,9 +145,6 @@ describe("Anchor", () => {
it("should create a Drawing with no text wrapping", () => {
anchor = createAnchor({
textWrapping: {
textWrapStyle: TextWrapStyle.NONE,
},
floating: {
verticalPosition: {
offset: 0,
@ -155,6 +152,9 @@ describe("Anchor", () => {
horizontalPosition: {
offset: 0,
},
wrap: {
type: TextWrappingType.NONE,
},
},
});
const newJson = Utility.jsonify(anchor);
@ -166,9 +166,6 @@ describe("Anchor", () => {
it("should create a Drawing with tight text wrapping", () => {
anchor = createAnchor({
textWrapping: {
textWrapStyle: TextWrapStyle.TIGHT,
},
floating: {
horizontalPosition: {
offset: 0,
@ -176,6 +173,9 @@ describe("Anchor", () => {
verticalPosition: {
offset: 0,
},
wrap: {
type: TextWrappingType.TIGHT,
},
},
});
const newJson = Utility.jsonify(anchor);
@ -187,9 +187,6 @@ describe("Anchor", () => {
it("should create a Drawing with tight text wrapping", () => {
anchor = createAnchor({
textWrapping: {
textWrapStyle: TextWrapStyle.TOP_AND_BOTTOM,
},
floating: {
verticalPosition: {
offset: 0,
@ -197,6 +194,9 @@ describe("Anchor", () => {
horizontalPosition: {
offset: 0,
},
wrap: {
type: TextWrappingType.TOP_AND_BOTTOM,
},
},
});
const newJson = Utility.jsonify(anchor);