* 0.0.64

* 0.0.65
main
bokuweb 2020-04-30 14:38:56 +09:00 committed by GitHub
parent 245da8dcf1
commit 587d895fad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 31 deletions

View File

@ -406,6 +406,8 @@ export * from "./insert";
export * from "./delete";
export * from "./table";
export * from "./table-cell";
export * from "./table-cell-border";
export * from "./table-cell-borders";
export * from "./table-row";
export * from "./run";
export * from "./text";

View File

@ -11,12 +11,12 @@ export type BorderType =
| "Triple";
export type BorderPosition =
| "Left"
| "Right"
| "Top"
| "Bottom"
| "InsideH"
| "InsideV";
| "left"
| "right"
| "top"
| "bottom"
| "insideH"
| "insideV";
export class TableCellBorder {
_border_type: BorderType;

View File

@ -9,26 +9,26 @@ export type PositionKeys =
| "insideV";
export class TableCellBorders {
top: TableCellBorder | null = new TableCellBorder("Top");
left: TableCellBorder | null = new TableCellBorder("Left");
bottom: TableCellBorder | null = new TableCellBorder("Bottom");
right: TableCellBorder | null = new TableCellBorder("Right");
insideH: TableCellBorder | null = new TableCellBorder("InsideH");
insideV: TableCellBorder | null = new TableCellBorder("InsideV");
top: TableCellBorder | null = new TableCellBorder("top");
left: TableCellBorder | null = new TableCellBorder("left");
bottom: TableCellBorder | null = new TableCellBorder("bottom");
right: TableCellBorder | null = new TableCellBorder("right");
insideH: TableCellBorder | null = new TableCellBorder("insideH");
insideV: TableCellBorder | null = new TableCellBorder("insideV");
set(border: TableCellBorder) {
switch (border.position) {
case "Top":
case "top":
this.top = border;
case "Left":
case "left":
this.left = border;
case "Bottom":
case "bottom":
this.bottom = border;
case "Right":
case "right":
this.right = border;
case "InsideH":
case "insideH":
this.insideH = border;
case "InsideV":
case "insideV":
this.insideV = border;
}
return this;
@ -37,29 +37,29 @@ export class TableCellBorders {
clear(position: BorderPosition) {
let nil = new TableCellBorder(position).border_type("Nil");
switch (position) {
case "Top":
case "top":
this.top = nil;
case "Left":
case "left":
this.left = nil;
case "Bottom":
case "bottom":
this.bottom = nil;
case "Right":
case "right":
this.right = nil;
case "InsideH":
case "insideH":
this.insideH = nil;
case "InsideV":
case "insideV":
this.insideV = nil;
}
return this;
}
clearAll() {
this.top = new TableCellBorder("Top").border_type("Nil");
this.left = new TableCellBorder("Left").border_type("Nil");
this.bottom = new TableCellBorder("Bottom").border_type("Nil");
this.right = new TableCellBorder("Right").border_type("Nil");
this.insideH = new TableCellBorder("InsideH").border_type("Nil");
this.insideV = new TableCellBorder("InsideV").border_type("Nil");
this.top = new TableCellBorder("top").border_type("Nil");
this.left = new TableCellBorder("left").border_type("Nil");
this.bottom = new TableCellBorder("bottom").border_type("Nil");
this.right = new TableCellBorder("right").border_type("Nil");
this.insideH = new TableCellBorder("insideH").border_type("Nil");
this.insideV = new TableCellBorder("insideV").border_type("Nil");
return this;
}
}

View File

@ -1,6 +1,6 @@
{
"name": "docx-wasm",
"version": "0.0.63",
"version": "0.0.65",
"main": "dist/node/index.js",
"browser": "dist/web/index.js",
"author": "bokuweb <bokuweb12@gmail.com>",