* 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 "./delete";
export * from "./table"; export * from "./table";
export * from "./table-cell"; export * from "./table-cell";
export * from "./table-cell-border";
export * from "./table-cell-borders";
export * from "./table-row"; export * from "./table-row";
export * from "./run"; export * from "./run";
export * from "./text"; export * from "./text";

View File

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

View File

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

View File

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