@wcardinal/wcardinal-ui 0.323.0 → 0.324.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor-edge-type.d.ts +6 -0
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor-edge.d.ts +2 -2
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor-impl.d.ts +6 -5
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor-type.d.ts +6 -0
- package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
- package/dist/wcardinal/ui/shape/e-shape-acceptor-edge-type.js +10 -0
- package/dist/wcardinal/ui/shape/e-shape-acceptor-edge-type.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-acceptor-edge.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js +24 -2
- package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-acceptor-type.js +5 -5
- package/dist/wcardinal/ui/shape/e-shape-acceptor-type.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-acceptors.js +10 -10
- package/dist/wcardinal/ui/shape/e-shape-acceptors.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +1 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal-ui-theme-dark.js +1 -1
- package/dist/wcardinal-ui-theme-dark.min.js +1 -1
- package/dist/wcardinal-ui-theme-white.js +1 -1
- package/dist/wcardinal-ui-theme-white.min.js +1 -1
- package/dist/wcardinal-ui.cjs.js +50 -22
- package/dist/wcardinal-ui.js +50 -22
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EShapeAcceptorEdgeNormal } from "./e-shape-acceptor-edge-normal";
|
|
2
2
|
import { EShapeAcceptorEdgeSide } from "./e-shape-acceptor-edge-side";
|
|
3
3
|
import { EShapeAcceptorEdgeSize } from "./e-shape-acceptor-edge-size";
|
|
4
|
-
import {
|
|
4
|
+
import { EShapeAcceptorEdgeType } from "./e-shape-acceptor-edge-type";
|
|
5
5
|
export interface EShapeAcceptorEdge {
|
|
6
|
-
type:
|
|
6
|
+
type: EShapeAcceptorEdgeType;
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
9
9
|
normal: EShapeAcceptorEdgeNormal;
|
|
@@ -3,15 +3,16 @@ import { EShapeAcceptor } from "./e-shape-acceptor";
|
|
|
3
3
|
import { EShapeAcceptorEdge } from "./e-shape-acceptor-edge";
|
|
4
4
|
import { EShapeAcceptorEdgeNormal } from "./e-shape-acceptor-edge-normal";
|
|
5
5
|
import { EShapeAcceptorEdgeSide } from "./e-shape-acceptor-edge-side";
|
|
6
|
-
import {
|
|
6
|
+
import { EShapeAcceptorEdgeType } from "./e-shape-acceptor-edge-type";
|
|
7
7
|
export declare class EShapeAcceptorImpl implements EShapeAcceptor {
|
|
8
8
|
protected _edges: Map<string, EShapeAcceptorEdge>;
|
|
9
9
|
constructor();
|
|
10
|
-
add(id: string, type:
|
|
11
|
-
add(id: string, type:
|
|
12
|
-
add(id: string, type:
|
|
13
|
-
add(id: string, type:
|
|
10
|
+
add(id: string, type: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType, x: number, y: number): boolean;
|
|
11
|
+
add(id: string, type: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType, x: number, y: number, nx: number, ny: number): boolean;
|
|
12
|
+
add(id: string, type: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType, x: number, y: number, nx: number, ny: number, sx: number, sy: number): boolean;
|
|
13
|
+
add(id: string, type: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType, x: number, y: number, nx: number, ny: number, sx: number, sy: number, side: EShapeAcceptorEdgeSide | keyof typeof EShapeAcceptorEdgeSide | Array<keyof typeof EShapeAcceptorEdgeSide>): boolean;
|
|
14
14
|
protected toNormal(x: number, y: number, nx?: number, ny?: number): EShapeAcceptorEdgeNormal;
|
|
15
|
+
protected toSide(side?: EShapeAcceptorEdgeSide | keyof typeof EShapeAcceptorEdgeSide | Array<keyof typeof EShapeAcceptorEdgeSide>): EShapeAcceptorEdgeSide;
|
|
15
16
|
remove(id: string): EShapeAcceptorEdge | null;
|
|
16
17
|
size(): number;
|
|
17
18
|
get(shape: EShape, id: string): EShapeAcceptorEdge | null;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated in favor of {@link EShapeAcceptorEdgeType}.
|
|
3
|
+
*/
|
|
1
4
|
export declare const EShapeAcceptorType: {
|
|
2
5
|
readonly TAIL: 1;
|
|
3
6
|
readonly HEAD: 2;
|
|
4
7
|
readonly ALL: 3;
|
|
5
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated in favor of {@link EShapeAcceptorEdgeType}.
|
|
11
|
+
*/
|
|
6
12
|
export declare type EShapeAcceptorType = typeof EShapeAcceptorType[keyof typeof EShapeAcceptorType];
|
|
@@ -4,6 +4,7 @@ export * from "./variant";
|
|
|
4
4
|
export * from "./e-shape-acceptor-edge-normal";
|
|
5
5
|
export * from "./e-shape-acceptor-edge-side";
|
|
6
6
|
export * from "./e-shape-acceptor-edge-size";
|
|
7
|
+
export * from "./e-shape-acceptor-edge-type";
|
|
7
8
|
export * from "./e-shape-acceptor-edge";
|
|
8
9
|
export * from "./e-shape-acceptor-impl";
|
|
9
10
|
export * from "./e-shape-acceptor-type";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-acceptor-edge-type.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-edge-type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,IAAM,sBAAsB,GAAG;IACrC,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,GAAG,EAAE,CAAC;CACG,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport const EShapeAcceptorEdgeType = {\n\tTAIL: 1,\n\tHEAD: 2,\n\tALL: 3\n} as const;\n\nexport type EShapeAcceptorEdgeType =\n\ttypeof EShapeAcceptorEdgeType[keyof typeof EShapeAcceptorEdgeType];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-acceptor-edge.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-edge.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeAcceptorEdgeNormal } from \"./e-shape-acceptor-edge-normal\";\nimport { EShapeAcceptorEdgeSide } from \"./e-shape-acceptor-edge-side\";\nimport { EShapeAcceptorEdgeSize } from \"./e-shape-acceptor-edge-size\";\nimport {
|
|
1
|
+
{"version":3,"file":"e-shape-acceptor-edge.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-edge.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeAcceptorEdgeNormal } from \"./e-shape-acceptor-edge-normal\";\nimport { EShapeAcceptorEdgeSide } from \"./e-shape-acceptor-edge-side\";\nimport { EShapeAcceptorEdgeSize } from \"./e-shape-acceptor-edge-size\";\nimport { EShapeAcceptorEdgeType } from \"./e-shape-acceptor-edge-type\";\n\nexport interface EShapeAcceptorEdge {\n\ttype: EShapeAcceptorEdgeType;\n\tx: number;\n\ty: number;\n\tnormal: EShapeAcceptorEdgeNormal;\n\tsize: EShapeAcceptorEdgeSize;\n\tside: EShapeAcceptorEdgeSide;\n}\n"]}
|
|
@@ -2,14 +2,18 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
import { isNumber } from "../util/is-number";
|
|
6
|
+
import { isString } from "../util/is-string";
|
|
7
|
+
import { toEnum } from "../util/to-enum";
|
|
5
8
|
import { EShapeAcceptorEdgeSide } from "./e-shape-acceptor-edge-side";
|
|
9
|
+
import { EShapeAcceptorEdgeType } from "./e-shape-acceptor-edge-type";
|
|
6
10
|
var EShapeAcceptorImpl = /** @class */ (function () {
|
|
7
11
|
function EShapeAcceptorImpl() {
|
|
8
12
|
this._edges = new Map();
|
|
9
13
|
}
|
|
10
14
|
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy, side) {
|
|
11
15
|
this._edges.set(id, {
|
|
12
|
-
type: type,
|
|
16
|
+
type: toEnum(type, EShapeAcceptorEdgeType),
|
|
13
17
|
x: x,
|
|
14
18
|
y: y,
|
|
15
19
|
normal: this.toNormal(x, y, nx, ny),
|
|
@@ -17,7 +21,7 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
17
21
|
x: sx !== null && sx !== void 0 ? sx : 0,
|
|
18
22
|
y: sy !== null && sy !== void 0 ? sy : 0
|
|
19
23
|
},
|
|
20
|
-
side: side
|
|
24
|
+
side: this.toSide(side)
|
|
21
25
|
});
|
|
22
26
|
return true;
|
|
23
27
|
};
|
|
@@ -45,6 +49,24 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
45
49
|
}
|
|
46
50
|
}
|
|
47
51
|
};
|
|
52
|
+
EShapeAcceptorImpl.prototype.toSide = function (side) {
|
|
53
|
+
if (side == null) {
|
|
54
|
+
return EShapeAcceptorEdgeSide.TOP;
|
|
55
|
+
}
|
|
56
|
+
else if (isNumber(side)) {
|
|
57
|
+
return side;
|
|
58
|
+
}
|
|
59
|
+
else if (isString(side)) {
|
|
60
|
+
return toEnum(side, EShapeAcceptorEdgeSide);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
var result = EShapeAcceptorEdgeSide.NONE;
|
|
64
|
+
for (var i = 0, imax = side.length; i < imax; ++i) {
|
|
65
|
+
result |= toEnum(side[i], EShapeAcceptorEdgeSide);
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
};
|
|
48
70
|
EShapeAcceptorImpl.prototype.remove = function (id) {
|
|
49
71
|
var edges = this._edges;
|
|
50
72
|
var result = edges.get(id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-acceptor-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"e-shape-acceptor-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKzC,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE;IAGC;QACC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;IACrD,CAAC;IAwCD,gCAAG,GAAH,UACC,EAAU,EACV,IAAkE,EAClE,CAAS,EACT,CAAS,EACT,EAAW,EACX,EAAW,EACX,EAAW,EACX,EAAW,EACX,IAG6C;QAE7C,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;YACnB,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,sBAAsB,CAAC;YAC1C,CAAC,GAAA;YACD,C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ACd,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACF,yBAAC;AAAD,CAAC,AAxJD,IAwJC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { isNumber } from \"../util/is-number\";\nimport { isString } from \"../util/is-string\";\nimport { toEnum } from \"../util/to-enum\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptor } from \"./e-shape-acceptor\";\nimport { EShapeAcceptorEdge } from \"./e-shape-acceptor-edge\";\nimport { EShapeAcceptorEdgeNormal } from \"./e-shape-acceptor-edge-normal\";\nimport { EShapeAcceptorEdgeSide } from \"./e-shape-acceptor-edge-side\";\nimport { EShapeAcceptorEdgeType } from \"./e-shape-acceptor-edge-type\";\n\nexport class EShapeAcceptorImpl implements EShapeAcceptor {\n\tprotected _edges: Map<string, EShapeAcceptorEdge>;\n\n\tconstructor() {\n\t\tthis._edges = new Map<string, EShapeAcceptorEdge>();\n\t}\n\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType,\n\t\tx: number,\n\t\ty: number\n\t): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx: number,\n\t\tny: number\n\t): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx: number,\n\t\tny: number,\n\t\tsx: number,\n\t\tsy: number\n\t): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx: number,\n\t\tny: number,\n\t\tsx: number,\n\t\tsy: number,\n\t\tside:\n\t\t\t| EShapeAcceptorEdgeSide\n\t\t\t| keyof typeof EShapeAcceptorEdgeSide\n\t\t\t| Array<keyof typeof EShapeAcceptorEdgeSide>\n\t): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorEdgeType | keyof typeof EShapeAcceptorEdgeType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx?: number,\n\t\tny?: number,\n\t\tsx?: number,\n\t\tsy?: number,\n\t\tside?:\n\t\t\t| EShapeAcceptorEdgeSide\n\t\t\t| keyof typeof EShapeAcceptorEdgeSide\n\t\t\t| Array<keyof typeof EShapeAcceptorEdgeSide>\n\t): boolean {\n\t\tthis._edges.set(id, {\n\t\t\ttype: toEnum(type, EShapeAcceptorEdgeType),\n\t\t\tx,\n\t\t\ty,\n\t\t\tnormal: this.toNormal(x, y, nx, ny),\n\t\t\tsize: {\n\t\t\t\tx: sx ?? 0,\n\t\t\t\ty: sy ?? 0\n\t\t\t},\n\t\t\tside: this.toSide(side)\n\t\t});\n\t\treturn true;\n\t}\n\n\tprotected toNormal(x: number, y: number, nx?: number, ny?: number): EShapeAcceptorEdgeNormal {\n\t\tif (nx != null && ny != null) {\n\t\t\treturn {\n\t\t\t\tx: nx,\n\t\t\t\ty: ny\n\t\t\t};\n\t\t} else {\n\t\t\tconst d = x * x + y * y;\n\t\t\tif (0.00001 < d) {\n\t\t\t\tconst m = 1 / Math.sqrt(d);\n\t\t\t\treturn {\n\t\t\t\t\tx: x * m,\n\t\t\t\t\ty: y * m\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected toSide(\n\t\tside?:\n\t\t\t| EShapeAcceptorEdgeSide\n\t\t\t| keyof typeof EShapeAcceptorEdgeSide\n\t\t\t| Array<keyof typeof EShapeAcceptorEdgeSide>\n\t): EShapeAcceptorEdgeSide {\n\t\tif (side == null) {\n\t\t\treturn EShapeAcceptorEdgeSide.TOP;\n\t\t} else if (isNumber(side)) {\n\t\t\treturn side;\n\t\t} else if (isString(side)) {\n\t\t\treturn toEnum(side, EShapeAcceptorEdgeSide);\n\t\t} else {\n\t\t\tlet result: EShapeAcceptorEdgeSide = EShapeAcceptorEdgeSide.NONE;\n\t\t\tfor (let i = 0, imax = side.length; i < imax; ++i) {\n\t\t\t\tresult |= toEnum(side[i], EShapeAcceptorEdgeSide);\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tremove(id: string): EShapeAcceptorEdge | null {\n\t\tconst edges = this._edges;\n\t\tconst result = edges.get(id);\n\t\tif (result != null) {\n\t\t\tedges.delete(id);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tsize(): number {\n\t\treturn this._edges.size;\n\t}\n\n\tget(shape: EShape, id: string): EShapeAcceptorEdge | null {\n\t\treturn this._edges.get(id) || null;\n\t}\n\n\teach(shape: EShape, iteratee: (edge: EShapeAcceptorEdge, id: string) => void): this {\n\t\tthis._edges.forEach(iteratee);\n\t\treturn this;\n\t}\n\n\tcontains(id: string): boolean {\n\t\treturn this._edges.has(id);\n\t}\n\n\tclear(): boolean {\n\t\tconst edges = this._edges;\n\t\tif (0 < edges.size) {\n\t\t\tedges.clear();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n}\n"]}
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import { EShapeAcceptorEdgeType } from "./e-shape-acceptor-edge-type";
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated in favor of {@link EShapeAcceptorEdgeType}.
|
|
8
|
+
*/
|
|
9
|
+
export var EShapeAcceptorType = EShapeAcceptorEdgeType;
|
|
10
10
|
//# sourceMappingURL=e-shape-acceptor-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-acceptor-type.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,
|
|
1
|
+
{"version":3,"file":"e-shape-acceptor-type.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-type.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAEtE;;GAEG;AACH,MAAM,CAAC,IAAM,kBAAkB,GAAG,sBAAsB,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeAcceptorEdgeType } from \"./e-shape-acceptor-edge-type\";\n\n/**\n * @deprecated in favor of {@link EShapeAcceptorEdgeType}.\n */\nexport const EShapeAcceptorType = EShapeAcceptorEdgeType;\n\n/**\n * @deprecated in favor of {@link EShapeAcceptorEdgeType}.\n */\nexport type EShapeAcceptorType = typeof EShapeAcceptorType[keyof typeof EShapeAcceptorType];\n"]}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
import { EShapeAcceptorEdgeType } from "./e-shape-acceptor-edge-type";
|
|
5
6
|
import { EShapeAcceptorImpl } from "./e-shape-acceptor-impl";
|
|
6
|
-
import { EShapeAcceptorType } from "./e-shape-acceptor-type";
|
|
7
7
|
var EShapeAcceptors = /** @class */ (function () {
|
|
8
8
|
function EShapeAcceptors() {
|
|
9
9
|
}
|
|
@@ -30,15 +30,15 @@ var EShapeAcceptors = /** @class */ (function () {
|
|
|
30
30
|
EShapeAcceptors.newDefault = function () {
|
|
31
31
|
var result = new EShapeAcceptorImpl();
|
|
32
32
|
var s = 1 / Math.sqrt(2);
|
|
33
|
-
result.add("TOP",
|
|
34
|
-
result.add("LEFT",
|
|
35
|
-
result.add("RIGHT",
|
|
36
|
-
result.add("BOTTOM",
|
|
37
|
-
result.add("CENTER",
|
|
38
|
-
result.add("TOP_LEFT",
|
|
39
|
-
result.add("TOP_RIGHT",
|
|
40
|
-
result.add("BOTTOM_LEFT",
|
|
41
|
-
result.add("BOTTOM_RIGHT",
|
|
33
|
+
result.add("TOP", EShapeAcceptorEdgeType.ALL, 0, -0.5, 0, -1);
|
|
34
|
+
result.add("LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0, -1, 0);
|
|
35
|
+
result.add("RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0, 1, 0);
|
|
36
|
+
result.add("BOTTOM", EShapeAcceptorEdgeType.ALL, 0, 0.5, 0, 1);
|
|
37
|
+
result.add("CENTER", EShapeAcceptorEdgeType.ALL, 0, 0, 0, 0);
|
|
38
|
+
result.add("TOP_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, -0.5, -s, -s);
|
|
39
|
+
result.add("TOP_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, -0.5, s, -s);
|
|
40
|
+
result.add("BOTTOM_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0.5, -s, s);
|
|
41
|
+
result.add("BOTTOM_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0.5, s, s);
|
|
42
42
|
return result;
|
|
43
43
|
};
|
|
44
44
|
return EShapeAcceptors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-acceptors.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"e-shape-acceptors.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,sBAAsB,EAA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AC,GAAG,CAAC,OAAO,EAAE,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9D,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,sBAAsB,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/D,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,sBAAsB,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7D,MAAM,CAAC,GAAG,CAAC,UAAU,EAAE,sBAAsB,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACvE,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACtE,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE,sBAAsB,CAAC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACxE,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,sBAAsB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACvE,OAAO,MAAM,CAAC;IACf,CAAC;IACF,sBAAC;AAAD,CAAC,AAxCD,IAwCC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeAcceptor } from \"./e-shape-acceptor\";\nimport { EShapeAcceptorEdgeType } from \"./e-shape-acceptor-edge-type\";\nimport { EShapeAcceptorImpl } from \"./e-shape-acceptor-impl\";\nimport { EShapeType } from \"./e-shape-type\";\n\nexport class EShapeAcceptors {\n\tprotected static _default?: EShapeAcceptor;\n\tprotected static _typeToAcceptor?: Map<EShapeType, EShapeAcceptor>;\n\n\tstatic set(type: EShapeType, acceptor: EShapeAcceptor): void {\n\t\tlet typeToAcceptor = this._typeToAcceptor;\n\t\tif (typeToAcceptor == null) {\n\t\t\ttypeToAcceptor = new Map<EShapeType, EShapeAcceptor>();\n\t\t\tthis._typeToAcceptor = typeToAcceptor;\n\t\t}\n\t\ttypeToAcceptor.set(type, acceptor);\n\t}\n\n\tstatic get(type: EShapeType): EShapeAcceptor {\n\t\treturn this._typeToAcceptor?.get(type) || this.getDefault();\n\t}\n\n\tprotected static getDefault(): EShapeAcceptor {\n\t\tlet result = this._default;\n\t\tif (result == null) {\n\t\t\tresult = this.newDefault();\n\t\t\tthis._default = result;\n\t\t}\n\t\treturn result;\n\t}\n\n\tprotected static newDefault(): EShapeAcceptor {\n\t\tconst result = new EShapeAcceptorImpl();\n\t\tconst s = 1 / Math.sqrt(2);\n\t\tresult.add(\"TOP\", EShapeAcceptorEdgeType.ALL, 0, -0.5, 0, -1);\n\t\tresult.add(\"LEFT\", EShapeAcceptorEdgeType.ALL, -0.5, 0, -1, 0);\n\t\tresult.add(\"RIGHT\", EShapeAcceptorEdgeType.ALL, 0.5, 0, 1, 0);\n\t\tresult.add(\"BOTTOM\", EShapeAcceptorEdgeType.ALL, 0, 0.5, 0, 1);\n\t\tresult.add(\"CENTER\", EShapeAcceptorEdgeType.ALL, 0, 0, 0, 0);\n\t\tresult.add(\"TOP_LEFT\", EShapeAcceptorEdgeType.ALL, -0.5, -0.5, -s, -s);\n\t\tresult.add(\"TOP_RIGHT\", EShapeAcceptorEdgeType.ALL, 0.5, -0.5, s, -s);\n\t\tresult.add(\"BOTTOM_LEFT\", EShapeAcceptorEdgeType.ALL, -0.5, 0.5, -s, s);\n\t\tresult.add(\"BOTTOM_RIGHT\", EShapeAcceptorEdgeType.ALL, 0.5, 0.5, s, s);\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -8,6 +8,7 @@ export * from "./variant";
|
|
|
8
8
|
export * from "./e-shape-acceptor-edge-normal";
|
|
9
9
|
export * from "./e-shape-acceptor-edge-side";
|
|
10
10
|
export * from "./e-shape-acceptor-edge-size";
|
|
11
|
+
export * from "./e-shape-acceptor-edge-type";
|
|
11
12
|
export * from "./e-shape-acceptor-edge";
|
|
12
13
|
export * from "./e-shape-acceptor-impl";
|
|
13
14
|
export * from "./e-shape-acceptor-type";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACr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8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-edge-normal\";\nexport * from \"./e-shape-acceptor-edge-side\";\nexport * from \"./e-shape-acceptor-edge-size\";\nexport * from \"./e-shape-acceptor-edge\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability-container-impl\";\nexport * from \"./e-shape-capability-container\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-impl\";\nexport * from \"./e-shape-data-mapper-impl\";\nexport * from \"./e-shape-data-mapper\";\nexport * from \"./e-shape-data-mapping-impl\";\nexport * from \"./e-shape-data-mapping\";\nexport * from \"./e-shape-data-scoped-impl\";\nexport * from \"./e-shape-data-scoped\";\nexport * from \"./e-shape-data-system-impl\";\nexport * from \"./e-shape-data-system\";\nexport * from \"./e-shape-data-value-extension\";\nexport * from \"./e-shape-data-value-extensions\";\nexport * from \"./e-shape-data-value-formatter\";\nexport * from \"./e-shape-data-value-impl\";\nexport * from \"./e-shape-data-value-order\";\nexport * from \"./e-shape-data-value-range-impl\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value-scope\";\nexport * from \"./e-shape-data-value-state\";\nexport * from \"./e-shape-data-value-type\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deleter\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-formatters\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization-mode\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime-impl\";\nexport * from \"./e-shape-runtime-reset\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-transforms\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AACnD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAA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BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iDAAiD,CAAC;AAChE,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qCAAqC,CAAC;AACpD,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,WAAW,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport * from \"./action\";\nexport * from \"./load\";\nexport * from \"./variant\";\nexport * from \"./e-shape-acceptor-edge-normal\";\nexport * from \"./e-shape-acceptor-edge-side\";\nexport * from \"./e-shape-acceptor-edge-size\";\nexport * from \"./e-shape-acceptor-edge-type\";\nexport * from \"./e-shape-acceptor-edge\";\nexport * from \"./e-shape-acceptor-impl\";\nexport * from \"./e-shape-acceptor-type\";\nexport * from \"./e-shape-acceptor\";\nexport * from \"./e-shape-acceptors\";\nexport * from \"./e-shape-buffer-unit-builder\";\nexport * from \"./e-shape-buffer-unit\";\nexport * from \"./e-shape-buffer\";\nexport * from \"./e-shape-capabilities\";\nexport * from \"./e-shape-capability-container-impl\";\nexport * from \"./e-shape-capability-container\";\nexport * from \"./e-shape-capability\";\nexport * from \"./e-shape-connector-bodies\";\nexport * from \"./e-shape-connector-body-impl\";\nexport * from \"./e-shape-connector-body\";\nexport * from \"./e-shape-connector-container-impl\";\nexport * from \"./e-shape-connector-container\";\nexport * from \"./e-shape-connector-edge-acceptor-impl\";\nexport * from \"./e-shape-connector-edge-acceptor\";\nexport * from \"./e-shape-connector-edge-container-impl\";\nexport * from \"./e-shape-connector-edge-container\";\nexport * from \"./e-shape-connector-edge-impl\";\nexport * from \"./e-shape-connector-edge\";\nexport * from \"./e-shape-connector\";\nexport * from \"./e-shape-connectors\";\nexport * from \"./e-shape-container\";\nexport * from \"./e-shape-copy-part\";\nexport * from \"./e-shape-corner\";\nexport * from \"./e-shape-data-impl\";\nexport * from \"./e-shape-data-mapper-impl\";\nexport * from \"./e-shape-data-mapper\";\nexport * from \"./e-shape-data-mapping-impl\";\nexport * from \"./e-shape-data-mapping\";\nexport * from \"./e-shape-data-scoped-impl\";\nexport * from \"./e-shape-data-scoped\";\nexport * from \"./e-shape-data-system-impl\";\nexport * from \"./e-shape-data-system\";\nexport * from \"./e-shape-data-value-extension\";\nexport * from \"./e-shape-data-value-extensions\";\nexport * from \"./e-shape-data-value-formatter\";\nexport * from \"./e-shape-data-value-impl\";\nexport * from \"./e-shape-data-value-order\";\nexport * from \"./e-shape-data-value-range-impl\";\nexport * from \"./e-shape-data-value-range\";\nexport * from \"./e-shape-data-value-scope\";\nexport * from \"./e-shape-data-value-state\";\nexport * from \"./e-shape-data-value-type\";\nexport * from \"./e-shape-data-value\";\nexport * from \"./e-shape-data\";\nexport * from \"./e-shape-defaults\";\nexport * from \"./e-shape-deleter\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-layer-container\";\nexport * from \"./e-shape-layer-state\";\nexport * from \"./e-shape-layer\";\nexport * from \"./e-shape-layout\";\nexport * from \"./e-shape-points-formatted\";\nexport * from \"./e-shape-points-formatter-curve\";\nexport * from \"./e-shape-points-formatter\";\nexport * from \"./e-shape-points-formatters\";\nexport * from \"./e-shape-points-marker-base\";\nexport * from \"./e-shape-points-marker-container-impl-noop\";\nexport * from \"./e-shape-points-marker-container-impl\";\nexport * from \"./e-shape-points-marker-container\";\nexport * from \"./e-shape-points-marker-head\";\nexport * from \"./e-shape-points-marker-noop\";\nexport * from \"./e-shape-points-marker-tail\";\nexport * from \"./e-shape-points-marker-type\";\nexport * from \"./e-shape-points-marker\";\nexport * from \"./e-shape-points-style\";\nexport * from \"./e-shape-points-styles\";\nexport * from \"./e-shape-points\";\nexport * from \"./e-shape-renderer-iterator-datum\";\nexport * from \"./e-shape-renderer-iterator\";\nexport * from \"./e-shape-renderer\";\nexport * from \"./e-shape-resource-manager-deserialization-mode\";\nexport * from \"./e-shape-resource-manager-deserialization\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime-impl\";\nexport * from \"./e-shape-runtime-reset\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-state-set-impl-observable\";\nexport * from \"./e-shape-state-set\";\nexport * from \"./e-shape-state\";\nexport * from \"./e-shape-stroke-side\";\nexport * from \"./e-shape-stroke-style\";\nexport * from \"./e-shape-stroke\";\nexport * from \"./e-shape-text-align-horizontal\";\nexport * from \"./e-shape-text-align-vertical\";\nexport * from \"./e-shape-text-align\";\nexport * from \"./e-shape-text-direction\";\nexport * from \"./e-shape-text-offset\";\nexport * from \"./e-shape-text-outline\";\nexport * from \"./e-shape-text\";\nexport * from \"./e-shape-transform-parent\";\nexport * from \"./e-shape-transform\";\nexport * from \"./e-shape-transforms\";\nexport * from \"./e-shape-type\";\nexport * from \"./e-shape-uploaded-constructor\";\nexport * from \"./e-shape-uploaded\";\nexport * from \"./e-shape-uploadeds\";\nexport * from \"./e-shape-uuid-mapping-impl\";\nexport * from \"./e-shape-uuid-mapping\";\nexport * from \"./e-shape\";\n"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.324.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -17614,6 +17614,16 @@ var EShapeEmbeddedDatum = /** @class */ (function () {
|
|
|
17614
17614
|
return EShapeEmbeddedDatum;
|
|
17615
17615
|
}());
|
|
17616
17616
|
|
|
17617
|
+
/*
|
|
17618
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
17619
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
17620
|
+
*/
|
|
17621
|
+
var EShapeAcceptorEdgeType = {
|
|
17622
|
+
TAIL: 1,
|
|
17623
|
+
HEAD: 2,
|
|
17624
|
+
ALL: 3
|
|
17625
|
+
};
|
|
17626
|
+
|
|
17617
17627
|
/*
|
|
17618
17628
|
* Copyright (C) 2019 Toshiba Corporation
|
|
17619
17629
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -17637,7 +17647,7 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
17637
17647
|
}
|
|
17638
17648
|
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy, side) {
|
|
17639
17649
|
this._edges.set(id, {
|
|
17640
|
-
type: type,
|
|
17650
|
+
type: toEnum(type, EShapeAcceptorEdgeType),
|
|
17641
17651
|
x: x,
|
|
17642
17652
|
y: y,
|
|
17643
17653
|
normal: this.toNormal(x, y, nx, ny),
|
|
@@ -17645,7 +17655,7 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
17645
17655
|
x: sx !== null && sx !== void 0 ? sx : 0,
|
|
17646
17656
|
y: sy !== null && sy !== void 0 ? sy : 0
|
|
17647
17657
|
},
|
|
17648
|
-
side: side
|
|
17658
|
+
side: this.toSide(side)
|
|
17649
17659
|
});
|
|
17650
17660
|
return true;
|
|
17651
17661
|
};
|
|
@@ -17673,6 +17683,24 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
17673
17683
|
}
|
|
17674
17684
|
}
|
|
17675
17685
|
};
|
|
17686
|
+
EShapeAcceptorImpl.prototype.toSide = function (side) {
|
|
17687
|
+
if (side == null) {
|
|
17688
|
+
return EShapeAcceptorEdgeSide.TOP;
|
|
17689
|
+
}
|
|
17690
|
+
else if (isNumber(side)) {
|
|
17691
|
+
return side;
|
|
17692
|
+
}
|
|
17693
|
+
else if (isString(side)) {
|
|
17694
|
+
return toEnum(side, EShapeAcceptorEdgeSide);
|
|
17695
|
+
}
|
|
17696
|
+
else {
|
|
17697
|
+
var result = EShapeAcceptorEdgeSide.NONE;
|
|
17698
|
+
for (var i = 0, imax = side.length; i < imax; ++i) {
|
|
17699
|
+
result |= toEnum(side[i], EShapeAcceptorEdgeSide);
|
|
17700
|
+
}
|
|
17701
|
+
return result;
|
|
17702
|
+
}
|
|
17703
|
+
};
|
|
17676
17704
|
EShapeAcceptorImpl.prototype.remove = function (id) {
|
|
17677
17705
|
var edges = this._edges;
|
|
17678
17706
|
var result = edges.get(id);
|
|
@@ -17706,16 +17734,6 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
17706
17734
|
return EShapeAcceptorImpl;
|
|
17707
17735
|
}());
|
|
17708
17736
|
|
|
17709
|
-
/*
|
|
17710
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
17711
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
17712
|
-
*/
|
|
17713
|
-
var EShapeAcceptorType = {
|
|
17714
|
-
TAIL: 1,
|
|
17715
|
-
HEAD: 2,
|
|
17716
|
-
ALL: 3
|
|
17717
|
-
};
|
|
17718
|
-
|
|
17719
17737
|
/*
|
|
17720
17738
|
* Copyright (C) 2019 Toshiba Corporation
|
|
17721
17739
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -17746,15 +17764,15 @@ var EShapeAcceptors = /** @class */ (function () {
|
|
|
17746
17764
|
EShapeAcceptors.newDefault = function () {
|
|
17747
17765
|
var result = new EShapeAcceptorImpl();
|
|
17748
17766
|
var s = 1 / Math.sqrt(2);
|
|
17749
|
-
result.add("TOP",
|
|
17750
|
-
result.add("LEFT",
|
|
17751
|
-
result.add("RIGHT",
|
|
17752
|
-
result.add("BOTTOM",
|
|
17753
|
-
result.add("CENTER",
|
|
17754
|
-
result.add("TOP_LEFT",
|
|
17755
|
-
result.add("TOP_RIGHT",
|
|
17756
|
-
result.add("BOTTOM_LEFT",
|
|
17757
|
-
result.add("BOTTOM_RIGHT",
|
|
17767
|
+
result.add("TOP", EShapeAcceptorEdgeType.ALL, 0, -0.5, 0, -1);
|
|
17768
|
+
result.add("LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0, -1, 0);
|
|
17769
|
+
result.add("RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0, 1, 0);
|
|
17770
|
+
result.add("BOTTOM", EShapeAcceptorEdgeType.ALL, 0, 0.5, 0, 1);
|
|
17771
|
+
result.add("CENTER", EShapeAcceptorEdgeType.ALL, 0, 0, 0, 0);
|
|
17772
|
+
result.add("TOP_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, -0.5, -s, -s);
|
|
17773
|
+
result.add("TOP_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, -0.5, s, -s);
|
|
17774
|
+
result.add("BOTTOM_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0.5, -s, s);
|
|
17775
|
+
result.add("BOTTOM_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0.5, s, s);
|
|
17758
17776
|
return result;
|
|
17759
17777
|
};
|
|
17760
17778
|
return EShapeAcceptors;
|
|
@@ -45108,6 +45126,15 @@ var toResized = function (shape, from, to, centerMode, isPerfect) {
|
|
|
45108
45126
|
shape.allowUploadedUpdate();
|
|
45109
45127
|
};
|
|
45110
45128
|
|
|
45129
|
+
/*
|
|
45130
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
45131
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
45132
|
+
*/
|
|
45133
|
+
/**
|
|
45134
|
+
* @deprecated in favor of {@link EShapeAcceptorEdgeType}.
|
|
45135
|
+
*/
|
|
45136
|
+
var EShapeAcceptorType = EShapeAcceptorEdgeType;
|
|
45137
|
+
|
|
45111
45138
|
/*
|
|
45112
45139
|
* Copyright (C) 2019 Toshiba Corporation
|
|
45113
45140
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -93773,6 +93800,7 @@ exports.DynamicSDFFontAtlas = DynamicSDFFontAtlas;
|
|
|
93773
93800
|
exports.DynamicSDFFontAtlases = DynamicSDFFontAtlases;
|
|
93774
93801
|
exports.DynamicSDFFontGenerator = DynamicSDFFontGenerator;
|
|
93775
93802
|
exports.EShapeAcceptorEdgeSide = EShapeAcceptorEdgeSide;
|
|
93803
|
+
exports.EShapeAcceptorEdgeType = EShapeAcceptorEdgeType;
|
|
93776
93804
|
exports.EShapeAcceptorImpl = EShapeAcceptorImpl;
|
|
93777
93805
|
exports.EShapeAcceptorType = EShapeAcceptorType;
|
|
93778
93806
|
exports.EShapeAcceptors = EShapeAcceptors;
|
package/dist/wcardinal-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.324.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -17611,6 +17611,16 @@
|
|
|
17611
17611
|
return EShapeEmbeddedDatum;
|
|
17612
17612
|
}());
|
|
17613
17613
|
|
|
17614
|
+
/*
|
|
17615
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
17616
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
17617
|
+
*/
|
|
17618
|
+
var EShapeAcceptorEdgeType = {
|
|
17619
|
+
TAIL: 1,
|
|
17620
|
+
HEAD: 2,
|
|
17621
|
+
ALL: 3
|
|
17622
|
+
};
|
|
17623
|
+
|
|
17614
17624
|
/*
|
|
17615
17625
|
* Copyright (C) 2019 Toshiba Corporation
|
|
17616
17626
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -17634,7 +17644,7 @@
|
|
|
17634
17644
|
}
|
|
17635
17645
|
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy, side) {
|
|
17636
17646
|
this._edges.set(id, {
|
|
17637
|
-
type: type,
|
|
17647
|
+
type: toEnum(type, EShapeAcceptorEdgeType),
|
|
17638
17648
|
x: x,
|
|
17639
17649
|
y: y,
|
|
17640
17650
|
normal: this.toNormal(x, y, nx, ny),
|
|
@@ -17642,7 +17652,7 @@
|
|
|
17642
17652
|
x: sx !== null && sx !== void 0 ? sx : 0,
|
|
17643
17653
|
y: sy !== null && sy !== void 0 ? sy : 0
|
|
17644
17654
|
},
|
|
17645
|
-
side: side
|
|
17655
|
+
side: this.toSide(side)
|
|
17646
17656
|
});
|
|
17647
17657
|
return true;
|
|
17648
17658
|
};
|
|
@@ -17670,6 +17680,24 @@
|
|
|
17670
17680
|
}
|
|
17671
17681
|
}
|
|
17672
17682
|
};
|
|
17683
|
+
EShapeAcceptorImpl.prototype.toSide = function (side) {
|
|
17684
|
+
if (side == null) {
|
|
17685
|
+
return EShapeAcceptorEdgeSide.TOP;
|
|
17686
|
+
}
|
|
17687
|
+
else if (isNumber(side)) {
|
|
17688
|
+
return side;
|
|
17689
|
+
}
|
|
17690
|
+
else if (isString(side)) {
|
|
17691
|
+
return toEnum(side, EShapeAcceptorEdgeSide);
|
|
17692
|
+
}
|
|
17693
|
+
else {
|
|
17694
|
+
var result = EShapeAcceptorEdgeSide.NONE;
|
|
17695
|
+
for (var i = 0, imax = side.length; i < imax; ++i) {
|
|
17696
|
+
result |= toEnum(side[i], EShapeAcceptorEdgeSide);
|
|
17697
|
+
}
|
|
17698
|
+
return result;
|
|
17699
|
+
}
|
|
17700
|
+
};
|
|
17673
17701
|
EShapeAcceptorImpl.prototype.remove = function (id) {
|
|
17674
17702
|
var edges = this._edges;
|
|
17675
17703
|
var result = edges.get(id);
|
|
@@ -17703,16 +17731,6 @@
|
|
|
17703
17731
|
return EShapeAcceptorImpl;
|
|
17704
17732
|
}());
|
|
17705
17733
|
|
|
17706
|
-
/*
|
|
17707
|
-
* Copyright (C) 2019 Toshiba Corporation
|
|
17708
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
17709
|
-
*/
|
|
17710
|
-
var EShapeAcceptorType = {
|
|
17711
|
-
TAIL: 1,
|
|
17712
|
-
HEAD: 2,
|
|
17713
|
-
ALL: 3
|
|
17714
|
-
};
|
|
17715
|
-
|
|
17716
17734
|
/*
|
|
17717
17735
|
* Copyright (C) 2019 Toshiba Corporation
|
|
17718
17736
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -17743,15 +17761,15 @@
|
|
|
17743
17761
|
EShapeAcceptors.newDefault = function () {
|
|
17744
17762
|
var result = new EShapeAcceptorImpl();
|
|
17745
17763
|
var s = 1 / Math.sqrt(2);
|
|
17746
|
-
result.add("TOP",
|
|
17747
|
-
result.add("LEFT",
|
|
17748
|
-
result.add("RIGHT",
|
|
17749
|
-
result.add("BOTTOM",
|
|
17750
|
-
result.add("CENTER",
|
|
17751
|
-
result.add("TOP_LEFT",
|
|
17752
|
-
result.add("TOP_RIGHT",
|
|
17753
|
-
result.add("BOTTOM_LEFT",
|
|
17754
|
-
result.add("BOTTOM_RIGHT",
|
|
17764
|
+
result.add("TOP", EShapeAcceptorEdgeType.ALL, 0, -0.5, 0, -1);
|
|
17765
|
+
result.add("LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0, -1, 0);
|
|
17766
|
+
result.add("RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0, 1, 0);
|
|
17767
|
+
result.add("BOTTOM", EShapeAcceptorEdgeType.ALL, 0, 0.5, 0, 1);
|
|
17768
|
+
result.add("CENTER", EShapeAcceptorEdgeType.ALL, 0, 0, 0, 0);
|
|
17769
|
+
result.add("TOP_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, -0.5, -s, -s);
|
|
17770
|
+
result.add("TOP_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, -0.5, s, -s);
|
|
17771
|
+
result.add("BOTTOM_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0.5, -s, s);
|
|
17772
|
+
result.add("BOTTOM_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0.5, s, s);
|
|
17755
17773
|
return result;
|
|
17756
17774
|
};
|
|
17757
17775
|
return EShapeAcceptors;
|
|
@@ -45105,6 +45123,15 @@
|
|
|
45105
45123
|
shape.allowUploadedUpdate();
|
|
45106
45124
|
};
|
|
45107
45125
|
|
|
45126
|
+
/*
|
|
45127
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
45128
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
45129
|
+
*/
|
|
45130
|
+
/**
|
|
45131
|
+
* @deprecated in favor of {@link EShapeAcceptorEdgeType}.
|
|
45132
|
+
*/
|
|
45133
|
+
var EShapeAcceptorType = EShapeAcceptorEdgeType;
|
|
45134
|
+
|
|
45108
45135
|
/*
|
|
45109
45136
|
* Copyright (C) 2019 Toshiba Corporation
|
|
45110
45137
|
* SPDX-License-Identifier: Apache-2.0
|
|
@@ -74996,6 +75023,7 @@
|
|
|
74996
75023
|
toSizeRounded: toSizeRounded,
|
|
74997
75024
|
toThresholdDefault: toThresholdDefault,
|
|
74998
75025
|
EShapeAcceptorEdgeSide: EShapeAcceptorEdgeSide,
|
|
75026
|
+
EShapeAcceptorEdgeType: EShapeAcceptorEdgeType,
|
|
74999
75027
|
EShapeAcceptorImpl: EShapeAcceptorImpl,
|
|
75000
75028
|
EShapeAcceptorType: EShapeAcceptorType,
|
|
75001
75029
|
EShapeAcceptors: EShapeAcceptors,
|