@wcardinal/wcardinal-ui 0.315.0 → 0.317.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-impl.d.ts +1 -0
- package/dist/types/wcardinal/ui/shape/e-shape-acceptor.d.ts +5 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.d.ts +7 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-acceptor.d.ts +3 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-impl.d.ts +1 -1
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge.d.ts +4 -2
- package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js +6 -2
- package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-acceptor.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.js +32 -2
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-acceptor.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js +9 -5
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge.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 +48 -10
- package/dist/wcardinal-ui.js +48 -10
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ export declare class EShapeAcceptorImpl implements EShapeAcceptor {
|
|
|
6
6
|
constructor();
|
|
7
7
|
add(id: string, type: EShapeAcceptorType, x: number, y: number): boolean;
|
|
8
8
|
add(id: string, type: EShapeAcceptorType, x: number, y: number, nx: number, ny: number): boolean;
|
|
9
|
+
add(id: string, type: EShapeAcceptorType, x: number, y: number, nx: number, ny: number, sx: number, sy: number): boolean;
|
|
9
10
|
protected toNormal(x: number, y: number, nx?: number, ny?: number): EShapeAcceptorEdgeNormal;
|
|
10
11
|
remove(id: string): EShapeAcceptorEdge | null;
|
|
11
12
|
size(): number;
|
|
@@ -4,11 +4,16 @@ export interface EShapeAcceptorEdgeNormal {
|
|
|
4
4
|
x: number;
|
|
5
5
|
y: number;
|
|
6
6
|
}
|
|
7
|
+
export interface EShapeAcceptorEdgeSize {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
}
|
|
7
11
|
export interface EShapeAcceptorEdge {
|
|
8
12
|
type: EShapeAcceptorType;
|
|
9
13
|
x: number;
|
|
10
14
|
y: number;
|
|
11
15
|
normal: EShapeAcceptorEdgeNormal;
|
|
16
|
+
size: EShapeAcceptorEdgeSize;
|
|
12
17
|
}
|
|
13
18
|
export interface EShapeAcceptor {
|
|
14
19
|
get(shape: EShape, id: string): EShapeAcceptorEdge | null;
|
|
@@ -7,11 +7,17 @@ export declare class EShapeConnectorEdgeAcceptorImpl implements EShapeConnectorE
|
|
|
7
7
|
protected _parent: EShapeConnectorEdgeAcceptorImplParent;
|
|
8
8
|
protected _shape: EShape | null;
|
|
9
9
|
protected _edge: string | null;
|
|
10
|
+
protected _x: number | null;
|
|
11
|
+
protected _y: number | null;
|
|
10
12
|
constructor(parent: EShapeConnectorEdgeAcceptorImplParent);
|
|
11
13
|
get shape(): EShape | null;
|
|
12
14
|
set shape(shape: EShape | null);
|
|
13
15
|
get edge(): string | null;
|
|
14
16
|
set edge(edge: string | null);
|
|
17
|
+
get x(): number | null;
|
|
18
|
+
set x(x: number | null);
|
|
19
|
+
get y(): number | null;
|
|
20
|
+
set y(y: number | null);
|
|
15
21
|
copy(source: EShapeConnectorEdgeAcceptor): this;
|
|
16
|
-
set(shape?: EShape | null, edge?: string | null): this;
|
|
22
|
+
set(shape?: EShape | null, edge?: string | null, x?: number | null, y?: number | null): this;
|
|
17
23
|
}
|
|
@@ -2,6 +2,8 @@ import { EShape } from "./e-shape";
|
|
|
2
2
|
export interface EShapeConnectorEdgeAcceptor {
|
|
3
3
|
shape: EShape | null;
|
|
4
4
|
edge: string | null;
|
|
5
|
+
x: number | null;
|
|
6
|
+
y: number | null;
|
|
5
7
|
copy(source: EShapeConnectorEdgeAcceptor): this;
|
|
6
|
-
set(shape?: EShape | null, edge?: string | null): this;
|
|
8
|
+
set(shape?: EShape | null, edge?: string | null, x?: number | null, y?: number | null): this;
|
|
7
9
|
}
|
|
@@ -34,7 +34,7 @@ export declare class EShapeConnectorEdgeImpl implements EShapeConnectorEdge {
|
|
|
34
34
|
get normalId(): number;
|
|
35
35
|
get margin(): number;
|
|
36
36
|
set margin(margin: number);
|
|
37
|
-
set(
|
|
37
|
+
set(acceptorShape?: EShape | null, acceptorEdge?: string | null, acceptorX?: number, acceptorY?: number, margin?: number, x?: number, y?: number, nx?: number, ny?: number): this;
|
|
38
38
|
copy(source: EShapeConnectorEdge): this;
|
|
39
39
|
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
40
40
|
deserialize(resourceId: number, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization): void;
|
|
@@ -12,7 +12,9 @@ export declare type EShapeConnectorEdgeSerialized = [
|
|
|
12
12
|
number,
|
|
13
13
|
number,
|
|
14
14
|
number?,
|
|
15
|
-
number
|
|
15
|
+
number?,
|
|
16
|
+
(number | null)?,
|
|
17
|
+
(number | null)?
|
|
16
18
|
];
|
|
17
19
|
export interface EShapeConnectorEdge {
|
|
18
20
|
readonly parent: EShapeConnector;
|
|
@@ -24,7 +26,7 @@ export interface EShapeConnectorEdge {
|
|
|
24
26
|
margin: number;
|
|
25
27
|
lock(): void;
|
|
26
28
|
unlock(): void;
|
|
27
|
-
set(
|
|
29
|
+
set(acceptorShape?: EShape | null, acceptorEdge?: string | null, acceptorX?: number | null, acceptorY?: number | null, margin?: number, x?: number, y?: number, nx?: number, ny?: number): this;
|
|
28
30
|
copy(source: EShapeConnectorEdge): this;
|
|
29
31
|
fit(forcibly?: boolean): this;
|
|
30
32
|
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
@@ -6,12 +6,16 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
6
6
|
function EShapeAcceptorImpl() {
|
|
7
7
|
this._edges = new Map();
|
|
8
8
|
}
|
|
9
|
-
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny) {
|
|
9
|
+
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy) {
|
|
10
10
|
this._edges.set(id, {
|
|
11
11
|
type: type,
|
|
12
12
|
x: x,
|
|
13
13
|
y: y,
|
|
14
|
-
normal: this.toNormal(x, y, nx, ny)
|
|
14
|
+
normal: this.toNormal(x, y, nx, ny),
|
|
15
|
+
size: {
|
|
16
|
+
x: sx !== null && sx !== void 0 ? sx : 0,
|
|
17
|
+
y: sy !== null && sy !== void 0 ? sy : 0
|
|
18
|
+
}
|
|
15
19
|
});
|
|
16
20
|
return true;
|
|
17
21
|
};
|
|
@@ -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;AAMH;IAGC;QACC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;IACrD,CAAC;
|
|
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;AAMH;IAGC;QACC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;IAC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AAG,CAAC,EAAE,CAAC,CAAC;QAC7B,IAAI,MAAM,IAAI,IAAI,EAAE;YACnB,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACjB,OAAO,MAAM,CAAC;SACd;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,iCAAI,GAAJ;QACC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,gCAAG,GAAH,UAAI,KAAa,EAAE,EAAU;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;IACpC,CAAC;IAED,iCAAI,GAAJ,UAAK,KAAa,EAAE,QAAwD;QAC3E,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,qCAAQ,GAAR,UAAS,EAAU;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,kCAAK,GAAL;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE;YACnB,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACF,yBAAC;AAAD,CAAC,AA3GD,IA2GC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptor, EShapeAcceptorEdge, EShapeAcceptorEdgeNormal } from \"./e-shape-acceptor\";\nimport { EShapeAcceptorType } from \"./e-shape-acceptor-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(id: string, type: EShapeAcceptorType, x: number, y: number): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorType,\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: EShapeAcceptorType,\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: EShapeAcceptorType,\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\t\tthis._edges.set(id, {\n\t\t\ttype,\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});\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\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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-acceptor.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptorType } from \"./e-shape-acceptor-type\";\n\nexport interface EShapeAcceptorEdgeNormal {\n\tx: number;\n\ty: number;\n}\n\nexport interface EShapeAcceptorEdge {\n\ttype: EShapeAcceptorType;\n\tx: number;\n\ty: number;\n\tnormal: EShapeAcceptorEdgeNormal;\n}\n\nexport interface EShapeAcceptor {\n\tget(shape: EShape, id: string): EShapeAcceptorEdge | null;\n\teach(shape: EShape, iteratee: (edge: EShapeAcceptorEdge, id: string) => void): this;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-acceptor.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptorType } from \"./e-shape-acceptor-type\";\n\nexport interface EShapeAcceptorEdgeNormal {\n\tx: number;\n\ty: number;\n}\n\nexport interface EShapeAcceptorEdgeSize {\n\tx: number;\n\ty: number;\n}\n\nexport interface EShapeAcceptorEdge {\n\ttype: EShapeAcceptorType;\n\tx: number;\n\ty: number;\n\tnormal: EShapeAcceptorEdgeNormal;\n\tsize: EShapeAcceptorEdgeSize;\n}\n\nexport interface EShapeAcceptor {\n\tget(shape: EShape, id: string): EShapeAcceptorEdge | null;\n\teach(shape: EShape, iteratee: (edge: EShapeAcceptorEdge, id: string) => void): this;\n}\n"]}
|
|
@@ -7,6 +7,8 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
|
|
|
7
7
|
this._parent = parent;
|
|
8
8
|
this._shape = null;
|
|
9
9
|
this._edge = null;
|
|
10
|
+
this._x = null;
|
|
11
|
+
this._y = null;
|
|
10
12
|
}
|
|
11
13
|
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "shape", {
|
|
12
14
|
get: function () {
|
|
@@ -28,10 +30,30 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
|
|
|
28
30
|
enumerable: false,
|
|
29
31
|
configurable: true
|
|
30
32
|
});
|
|
33
|
+
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "x", {
|
|
34
|
+
get: function () {
|
|
35
|
+
return this._x;
|
|
36
|
+
},
|
|
37
|
+
set: function (x) {
|
|
38
|
+
this.set(undefined, undefined, x);
|
|
39
|
+
},
|
|
40
|
+
enumerable: false,
|
|
41
|
+
configurable: true
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "y", {
|
|
44
|
+
get: function () {
|
|
45
|
+
return this._y;
|
|
46
|
+
},
|
|
47
|
+
set: function (y) {
|
|
48
|
+
this.set(undefined, undefined, undefined, y);
|
|
49
|
+
},
|
|
50
|
+
enumerable: false,
|
|
51
|
+
configurable: true
|
|
52
|
+
});
|
|
31
53
|
EShapeConnectorEdgeAcceptorImpl.prototype.copy = function (source) {
|
|
32
|
-
return this.set(source.shape, source.edge);
|
|
54
|
+
return this.set(source.shape, source.edge, source.x, source.y);
|
|
33
55
|
};
|
|
34
|
-
EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge) {
|
|
56
|
+
EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge, x, y) {
|
|
35
57
|
var isChanged = false;
|
|
36
58
|
if (shape !== undefined && this._shape !== shape) {
|
|
37
59
|
this._shape = shape;
|
|
@@ -41,6 +63,14 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
|
|
|
41
63
|
this._edge = edge;
|
|
42
64
|
isChanged = true;
|
|
43
65
|
}
|
|
66
|
+
if (x !== undefined && this._x !== x) {
|
|
67
|
+
this._x = x;
|
|
68
|
+
isChanged = true;
|
|
69
|
+
}
|
|
70
|
+
if (y !== undefined && this._y !== y) {
|
|
71
|
+
this._y = y;
|
|
72
|
+
isChanged = true;
|
|
73
|
+
}
|
|
44
74
|
if (isChanged) {
|
|
45
75
|
this._parent.onAcceptorChange();
|
|
46
76
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-acceptor-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH;
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-acceptor-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-acceptor-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH;IAOC,yCAAY,MAA6C;QACxD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;QACf,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC;IAChB,CAAC;IAED,sBAAI,kDAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM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GAAG,IAAI,CAAC;SACjB;QAED,IAAI,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE;YACrC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YACZ,SAAS,GAAG,IAAI,CAAC;SACjB;QAED,IAAI,CAAC,KAAK,SAAS,IAAI,IAAI,CAAC,EAAE,KAAK,CAAC,EAAE;YACrC,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC;YACZ,SAAS,GAAG,IAAI,CAAC;SACjB;QAED,IAAI,SAAS,EAAE;YACd,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;SAChC;QAED,OAAO,IAAI,CAAC;IACb,CAAC;IACF,sCAAC;AAAD,CAAC,AAhFD,IAgFC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\nimport { EShapeConnectorEdgeAcceptor } from \"./e-shape-connector-edge-acceptor\";\n\nexport interface EShapeConnectorEdgeAcceptorImplParent {\n\tonAcceptorChange(): void;\n}\n\nexport class EShapeConnectorEdgeAcceptorImpl implements EShapeConnectorEdgeAcceptor {\n\tprotected _parent: EShapeConnectorEdgeAcceptorImplParent;\n\tprotected _shape: EShape | null;\n\tprotected _edge: string | null;\n\tprotected _x: number | null;\n\tprotected _y: number | null;\n\n\tconstructor(parent: EShapeConnectorEdgeAcceptorImplParent) {\n\t\tthis._parent = parent;\n\t\tthis._shape = null;\n\t\tthis._edge = null;\n\t\tthis._x = null;\n\t\tthis._y = null;\n\t}\n\n\tget shape(): EShape | null {\n\t\treturn this._shape;\n\t}\n\n\tset shape(shape: EShape | null) {\n\t\tthis.set(shape);\n\t}\n\n\tget edge(): string | null {\n\t\treturn this._edge;\n\t}\n\n\tset edge(edge: string | null) {\n\t\tthis.set(undefined, edge);\n\t}\n\n\tget x(): number | null {\n\t\treturn this._x;\n\t}\n\n\tset x(x: number | null) {\n\t\tthis.set(undefined, undefined, x);\n\t}\n\n\tget y(): number | null {\n\t\treturn this._y;\n\t}\n\n\tset y(y: number | null) {\n\t\tthis.set(undefined, undefined, undefined, y);\n\t}\n\n\tcopy(source: EShapeConnectorEdgeAcceptor): this {\n\t\treturn this.set(source.shape, source.edge, source.x, source.y);\n\t}\n\n\tset(shape?: EShape | null, edge?: string | null, x?: number | null, y?: number | null): this {\n\t\tlet isChanged = false;\n\n\t\tif (shape !== undefined && this._shape !== shape) {\n\t\t\tthis._shape = shape;\n\t\t\tisChanged = true;\n\t\t}\n\n\t\tif (edge !== undefined && this._edge !== edge) {\n\t\t\tthis._edge = edge;\n\t\t\tisChanged = true;\n\t\t}\n\n\t\tif (x !== undefined && this._x !== x) {\n\t\t\tthis._x = x;\n\t\t\tisChanged = true;\n\t\t}\n\n\t\tif (y !== undefined && this._y !== y) {\n\t\t\tthis._y = y;\n\t\t\tisChanged = true;\n\t\t}\n\n\t\tif (isChanged) {\n\t\t\tthis._parent.onAcceptorChange();\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-acceptor.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-acceptor.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\n\nexport interface EShapeConnectorEdgeAcceptor {\n\tshape: EShape | null;\n\tedge: string | null;\n\n\tcopy(source: EShapeConnectorEdgeAcceptor): this;\n\tset(shape?: EShape | null, edge?: string | null): this;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-acceptor.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-acceptor.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\n\nexport interface EShapeConnectorEdgeAcceptor {\n\tshape: EShape | null;\n\tedge: string | null;\n\tx: number | null;\n\ty: number | null;\n\n\tcopy(source: EShapeConnectorEdgeAcceptor): this;\n\tset(shape?: EShape | null, edge?: string | null, x?: number | null, y?: number | null): this;\n}\n"]}
|
|
@@ -125,9 +125,9 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
125
125
|
enumerable: false,
|
|
126
126
|
configurable: true
|
|
127
127
|
});
|
|
128
|
-
EShapeConnectorEdgeImpl.prototype.set = function (
|
|
128
|
+
EShapeConnectorEdgeImpl.prototype.set = function (acceptorShape, acceptorEdge, acceptorX, acceptorY, margin, x, y, nx, ny) {
|
|
129
129
|
this.lock();
|
|
130
|
-
this._acceptor.set(
|
|
130
|
+
this._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);
|
|
131
131
|
var local = this._local;
|
|
132
132
|
if (x != null && y != null) {
|
|
133
133
|
local.set(x, y);
|
|
@@ -171,9 +171,10 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
171
171
|
var edgeId = edge != null ? manager.addResource(edge) : -1;
|
|
172
172
|
var local = this._local;
|
|
173
173
|
var normal = this._normal;
|
|
174
|
-
return manager.addResource("[".concat(shapeUuid, ",").concat(edgeId, ",").concat(local.x, ",").concat(local.y, ",").concat(this._margin, ",").concat(normal.x, ",").concat(normal.y, "]"));
|
|
174
|
+
return manager.addResource("[".concat(shapeUuid, ",").concat(edgeId, ",").concat(local.x, ",").concat(local.y, ",").concat(this._margin, ",").concat(normal.x, ",").concat(normal.y, ",").concat(acceptor.x, ",").concat(acceptor.y, "]"));
|
|
175
175
|
};
|
|
176
176
|
EShapeConnectorEdgeImpl.prototype.deserialize = function (resourceId, mapping, manager) {
|
|
177
|
+
var _a, _b;
|
|
177
178
|
var resources = manager.resources;
|
|
178
179
|
if (0 <= resourceId && resourceId < resources.length) {
|
|
179
180
|
var parsed = manager.getExtension(resourceId);
|
|
@@ -191,6 +192,8 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
191
192
|
acceptor.shape = shape;
|
|
192
193
|
var edgeId = parsed[1];
|
|
193
194
|
acceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;
|
|
195
|
+
acceptor.x = (_a = parsed[7]) !== null && _a !== void 0 ? _a : null;
|
|
196
|
+
acceptor.y = (_b = parsed[8]) !== null && _b !== void 0 ? _b : null;
|
|
194
197
|
this._local.set(parsed[2], parsed[3]);
|
|
195
198
|
var normalX = parsed[5];
|
|
196
199
|
var normalY = parsed[6];
|
|
@@ -217,6 +220,7 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
217
220
|
return this;
|
|
218
221
|
};
|
|
219
222
|
EShapeConnectorEdgeImpl.prototype.doFit = function () {
|
|
223
|
+
var _a, _b;
|
|
220
224
|
var localIdRequired = this._localIdRequired;
|
|
221
225
|
var isLocalDirty = this._localId !== localIdRequired;
|
|
222
226
|
var normalIdRequired = this._normalIdRequired;
|
|
@@ -241,8 +245,8 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
241
245
|
if (isLocalDirty) {
|
|
242
246
|
var size = acceptorShape.size;
|
|
243
247
|
var pivot = acceptorShape.transform.pivot;
|
|
244
|
-
var lx = pivot.x + size.x * edge.x;
|
|
245
|
-
var ly = pivot.y + size.y * edge.y;
|
|
248
|
+
var lx = pivot.x + size.x * ((_a = acceptor.x) !== null && _a !== void 0 ? _a : edge.x);
|
|
249
|
+
var ly = pivot.y + size.y * ((_b = acceptor.y) !== null && _b !== void 0 ? _b : edge.y);
|
|
246
250
|
this._local.set(a * lx + c * ly + tx, b * lx + d * ly + ty);
|
|
247
251
|
}
|
|
248
252
|
if (isNormalDirty) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-impl.js","sourceRoot":"","sources":["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,GAAG,IAAI,CAAC,iBAAiB,CAAC;QACxC,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IAES,+CAAa,GAAvB;QACC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;YAC5B,OAAO;SACP;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC1B;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IACF,8BAAC;AAAD,CAAC,AA5WD,IA4WC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Matrix, ObservablePoint } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptors } from \"./e-shape-acceptors\";\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdge, EShapeConnectorEdgeSerialized } from \"./e-shape-connector-edge\";\nimport { EShapeConnectorEdgeAcceptor } from \"./e-shape-connector-edge-acceptor\";\nimport { EShapeConnectorEdgeAcceptorImpl } from \"./e-shape-connector-edge-acceptor-impl\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport class EShapeConnectorEdgeImpl implements EShapeConnectorEdge {\n\tprotected static WORK_MATRIX?: Matrix;\n\n\tprotected _parent: EShapeConnector;\n\tprotected _onChange: () => void;\n\tprotected _acceptor: EShapeConnectorEdgeAcceptor;\n\tprotected _localIdRequired: number;\n\tprotected _localId: number;\n\tprotected _local: IPoint;\n\tprotected _normalIdRequired: number;\n\tprotected _normalId: number;\n\tprotected _normal: IPoint;\n\tprotected _margin: number;\n\tprotected _lockCount: number;\n\tprotected _isAcceptorChanged: boolean;\n\tprotected _isLocalChanged: boolean;\n\tprotected _isNormalChanged: boolean;\n\tprotected _isOtherChanged: boolean;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._onChange = onChange;\n\t\tthis._acceptor = new EShapeConnectorEdgeAcceptorImpl(this);\n\n\t\tthis._local = new ObservablePoint((): void => {\n\t\t\tthis.onLocalChange();\n\t\t}, undefined);\n\t\tthis._localIdRequired = 0;\n\t\tthis._localId = 0;\n\n\t\tthis._normal = new ObservablePoint((): void => {\n\t\t\tthis.onNormalChange();\n\t\t}, undefined);\n\t\tthis._normalIdRequired = 0;\n\t\tthis._normalId = 0;\n\n\t\tthis._margin = 0;\n\n\t\tthis._lockCount = 0;\n\t\tthis._isAcceptorChanged = false;\n\t\tthis._isLocalChanged = false;\n\t\tthis._isNormalChanged = false;\n\t\tthis._isOtherChanged = false;\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isAcceptorChanged = false;\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isOtherChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tlet isChanged = false;\n\n\t\t\tif (this._isLocalChanged) {\n\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\tthis._localId = this._localIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isNormalChanged) {\n\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\tthis._normalId = this._normalIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isOtherChanged) {\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isAcceptorChanged) {\n\t\t\t\tif (!this._isLocalChanged) {\n\t\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (!this._isNormalChanged) {\n\t\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (this.doFit()) {\n\t\t\t\t\tisChanged = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isChanged) {\n\t\t\t\tthis._onChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tget parent(): EShapeConnector {\n\t\treturn this._parent;\n\t}\n\n\tget acceptor(): EShapeConnectorEdgeAcceptor {\n\t\treturn this._acceptor;\n\t}\n\n\tget local(): IPoint {\n\t\treturn this._local;\n\t}\n\n\tget localId(): number {\n\t\treturn this._localId;\n\t}\n\n\tget normal(): IPoint {\n\t\treturn this._normal;\n\t}\n\n\tget normalId(): number {\n\t\treturn this._normalId;\n\t}\n\n\tget margin(): number {\n\t\treturn this._margin;\n\t}\n\n\tset margin(margin: number) {\n\t\tif (this._margin !== margin) {\n\t\t\tthis._margin = margin;\n\t\t\tthis.onOtherChange();\n\t\t}\n\t}\n\n\tset(\n\t\tshape?: EShape | null,\n\t\tedge?: string | null,\n\t\tmargin?: number,\n\t\tx?: number,\n\t\ty?: number,\n\t\tnx?: number,\n\t\tny?: number\n\t): this {\n\t\tthis.lock();\n\t\tthis._acceptor.set(shape, edge);\n\n\t\tconst local = this._local;\n\t\tif (x != null && y != null) {\n\t\t\tlocal.set(x, y);\n\t\t} else if (x != null) {\n\t\t\tlocal.x = x;\n\t\t} else if (y != null) {\n\t\t\tlocal.y = y;\n\t\t}\n\n\t\tconst normal = this._normal;\n\t\tif (nx != null && ny != null) {\n\t\t\tnormal.set(nx, ny);\n\t\t} else if (nx != null) {\n\t\t\tnormal.x = nx;\n\t\t} else if (ny != null) {\n\t\t\tnormal.y = ny;\n\t\t}\n\n\t\tif (margin != null) {\n\t\t\tthis.margin = margin;\n\t\t}\n\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tcopy(source: EShapeConnectorEdge): this {\n\t\tthis.lock();\n\t\tthis._acceptor.copy(source.acceptor);\n\t\tthis._local.copyFrom(source.local);\n\t\tthis._normal.copyFrom(source.normal);\n\t\tthis.margin = source.margin;\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\tconst acceptor = this._acceptor;\n\t\tconst shape = acceptor.shape;\n\t\tconst shapeUuid = shape ? shape.uuid : null;\n\t\tconst edge = acceptor.edge;\n\t\tconst edgeId = edge != null ? manager.addResource(edge) : -1;\n\t\tconst local = this._local;\n\t\tconst normal = this._normal;\n\t\treturn manager.addResource(\n\t\t\t`[${shapeUuid},${edgeId},${local.x},${local.y},${this._margin},${normal.x},${normal.y}]`\n\t\t);\n\t}\n\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void {\n\t\tconst resources = manager.resources;\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<EShapeConnectorEdgeSerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as EShapeConnectorEdgeSerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tlet shape: EShape | null = null;\n\t\t\tconst shapeUuid = parsed[0];\n\t\t\tif (shapeUuid != null) {\n\t\t\t\tshape = mapping.find(shapeUuid) || null;\n\t\t\t}\n\t\t\tthis.lock();\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tacceptor.shape = shape;\n\t\t\tconst edgeId = parsed[1];\n\t\t\tacceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;\n\t\t\tthis._local.set(parsed[2], parsed[3]);\n\t\t\tconst normalX = parsed[5];\n\t\t\tconst normalY = parsed[6];\n\t\t\tconst normal = this._normal;\n\t\t\tif (normalX != null && normalY != null) {\n\t\t\t\tnormal.set(normalX, normalY);\n\t\t\t} else {\n\t\t\t\tnormal.set(1, 0);\n\t\t\t}\n\t\t\tthis.margin = parsed[4] || 0;\n\t\t\tthis.unlock();\n\t\t\tif (shape) {\n\t\t\t\tshape.connector.add(this);\n\t\t\t}\n\t\t}\n\t}\n\n\tfit(forcibly?: boolean): this {\n\t\tif (forcibly) {\n\t\t\tthis._localIdRequired += 1;\n\t\t\tthis._normalIdRequired += 1;\n\t\t}\n\t\tthis.doFit();\n\t\treturn this;\n\t}\n\n\tprotected doFit(): boolean {\n\t\tconst localIdRequired = this._localIdRequired;\n\t\tconst isLocalDirty = this._localId !== localIdRequired;\n\t\tconst normalIdRequired = this._normalIdRequired;\n\t\tconst isNormalDirty = this._normalId !== normalIdRequired;\n\t\tif (isLocalDirty || isNormalDirty) {\n\t\t\tthis._localId = localIdRequired;\n\t\t\tthis._normalId = normalIdRequired;\n\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tconst acceptorShape = acceptor.shape;\n\t\t\tconst acceptorEdge = acceptor.edge;\n\t\t\tif (acceptorShape != null && acceptorEdge != null) {\n\t\t\t\tconst edge = EShapeAcceptors.get(acceptorShape.type).get(\n\t\t\t\t\tacceptorShape,\n\t\t\t\t\tacceptorEdge\n\t\t\t\t);\n\t\t\t\tif (edge) {\n\t\t\t\t\tconst transform = this.toAcceptorTransform(acceptorShape);\n\t\t\t\t\tconst a = transform.a;\n\t\t\t\t\tconst b = transform.b;\n\t\t\t\t\tconst c = transform.c;\n\t\t\t\t\tconst d = transform.d;\n\t\t\t\t\tconst tx = transform.tx;\n\t\t\t\t\tconst ty = transform.ty;\n\n\t\t\t\t\tthis.lock();\n\t\t\t\t\tif (isLocalDirty) {\n\t\t\t\t\t\tconst size = acceptorShape.size;\n\t\t\t\t\t\tconst pivot = acceptorShape.transform.pivot;\n\t\t\t\t\t\tconst lx = pivot.x + size.x * edge.x;\n\t\t\t\t\t\tconst ly = pivot.y + size.y * edge.y;\n\t\t\t\t\t\tthis._local.set(a * lx + c * ly + tx, b * lx + d * ly + ty);\n\t\t\t\t\t}\n\t\t\t\t\tif (isNormalDirty) {\n\t\t\t\t\t\tconst edgeNormal = edge.normal;\n\t\t\t\t\t\tconst nx = edgeNormal.x;\n\t\t\t\t\t\tconst ny = edgeNormal.y;\n\t\t\t\t\t\tconst x = a * nx + c * ny;\n\t\t\t\t\t\tconst y = b * nx + d * ny;\n\t\t\t\t\t\tconst l = x * x + y * y;\n\t\t\t\t\t\tconst normal = this._normal;\n\t\t\t\t\t\tif (0.000001 < l) {\n\t\t\t\t\t\t\tconst f = 1 / Math.sqrt(l);\n\t\t\t\t\t\t\tnormal.set(x * f, y * f);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnormal.set(nx, ny);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst result = this._isLocalChanged || this._isNormalChanged;\n\t\t\t\t\tthis.unlock();\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected toAcceptorTransform(shape: EShape): Matrix {\n\t\tshape.updateTransform();\n\t\tconst parent = this._parent;\n\t\tconst parentParent = parent.parent;\n\t\tif (parentParent) {\n\t\t\tparent.updateTransform();\n\t\t\treturn (EShapeConnectorEdgeImpl.WORK_MATRIX ??= new Matrix())\n\t\t\t\t.copyFrom(parentParent.transform.worldTransform)\n\t\t\t\t.invert()\n\t\t\t\t.append(shape.transform.worldTransform);\n\t\t} else {\n\t\t\treturn shape.transform.worldTransform;\n\t\t}\n\t}\n\n\tonAcceptorChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isAcceptorChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis.fit(true);\n\t}\n\n\tprotected onLocalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._localIdRequired += 1;\n\t\tthis._localId = this._localIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onNormalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isNormalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._normalIdRequired += 1;\n\t\tthis._normalId = this._normalIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onOtherChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isOtherChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n\n\tattach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tshape.connector.add(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\tdetach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tshape.connector.remove(this);\n\t\t}\n\t\treturn this;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAU,MAAM,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAItD,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;AAKzF;IAmBC,iCAAY,MAAuB,EAAE,QAAoB;QAAzD,iBAwBC;QAvBA,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;QAC1B,IAAI,CA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,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IAES,+CAAa,GAAvB;QACC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;YAC5B,OAAO;SACP;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAC1B;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,wCAAM,GAAN;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;QACnC,IAAI,KAAK,EAAE;YACV,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IACF,8BAAC;AAAD,CAAC,AAhXD,IAgXC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint, Matrix, ObservablePoint } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptors } from \"./e-shape-acceptors\";\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdge, EShapeConnectorEdgeSerialized } from \"./e-shape-connector-edge\";\nimport { EShapeConnectorEdgeAcceptor } from \"./e-shape-connector-edge-acceptor\";\nimport { EShapeConnectorEdgeAcceptorImpl } from \"./e-shape-connector-edge-acceptor-impl\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport class EShapeConnectorEdgeImpl implements EShapeConnectorEdge {\n\tprotected static WORK_MATRIX?: Matrix;\n\n\tprotected _parent: EShapeConnector;\n\tprotected _onChange: () => void;\n\tprotected _acceptor: EShapeConnectorEdgeAcceptor;\n\tprotected _localIdRequired: number;\n\tprotected _localId: number;\n\tprotected _local: IPoint;\n\tprotected _normalIdRequired: number;\n\tprotected _normalId: number;\n\tprotected _normal: IPoint;\n\tprotected _margin: number;\n\tprotected _lockCount: number;\n\tprotected _isAcceptorChanged: boolean;\n\tprotected _isLocalChanged: boolean;\n\tprotected _isNormalChanged: boolean;\n\tprotected _isOtherChanged: boolean;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._onChange = onChange;\n\t\tthis._acceptor = new EShapeConnectorEdgeAcceptorImpl(this);\n\n\t\tthis._local = new ObservablePoint((): void => {\n\t\t\tthis.onLocalChange();\n\t\t}, undefined);\n\t\tthis._localIdRequired = 0;\n\t\tthis._localId = 0;\n\n\t\tthis._normal = new ObservablePoint((): void => {\n\t\t\tthis.onNormalChange();\n\t\t}, undefined);\n\t\tthis._normalIdRequired = 0;\n\t\tthis._normalId = 0;\n\n\t\tthis._margin = 0;\n\n\t\tthis._lockCount = 0;\n\t\tthis._isAcceptorChanged = false;\n\t\tthis._isLocalChanged = false;\n\t\tthis._isNormalChanged = false;\n\t\tthis._isOtherChanged = false;\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isAcceptorChanged = false;\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isOtherChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tlet isChanged = false;\n\n\t\t\tif (this._isLocalChanged) {\n\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\tthis._localId = this._localIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isNormalChanged) {\n\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\tthis._normalId = this._normalIdRequired;\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isOtherChanged) {\n\t\t\t\tisChanged = true;\n\t\t\t}\n\n\t\t\tif (this._isAcceptorChanged) {\n\t\t\t\tif (!this._isLocalChanged) {\n\t\t\t\t\tthis._localIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (!this._isNormalChanged) {\n\t\t\t\t\tthis._normalIdRequired += 1;\n\t\t\t\t}\n\t\t\t\tif (this.doFit()) {\n\t\t\t\t\tisChanged = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (isChanged) {\n\t\t\t\tthis._onChange();\n\t\t\t}\n\t\t}\n\t}\n\n\tget parent(): EShapeConnector {\n\t\treturn this._parent;\n\t}\n\n\tget acceptor(): EShapeConnectorEdgeAcceptor {\n\t\treturn this._acceptor;\n\t}\n\n\tget local(): IPoint {\n\t\treturn this._local;\n\t}\n\n\tget localId(): number {\n\t\treturn this._localId;\n\t}\n\n\tget normal(): IPoint {\n\t\treturn this._normal;\n\t}\n\n\tget normalId(): number {\n\t\treturn this._normalId;\n\t}\n\n\tget margin(): number {\n\t\treturn this._margin;\n\t}\n\n\tset margin(margin: number) {\n\t\tif (this._margin !== margin) {\n\t\t\tthis._margin = margin;\n\t\t\tthis.onOtherChange();\n\t\t}\n\t}\n\n\tset(\n\t\tacceptorShape?: EShape | null,\n\t\tacceptorEdge?: string | null,\n\t\tacceptorX?: number,\n\t\tacceptorY?: number,\n\t\tmargin?: number,\n\t\tx?: number,\n\t\ty?: number,\n\t\tnx?: number,\n\t\tny?: number\n\t): this {\n\t\tthis.lock();\n\t\tthis._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);\n\n\t\tconst local = this._local;\n\t\tif (x != null && y != null) {\n\t\t\tlocal.set(x, y);\n\t\t} else if (x != null) {\n\t\t\tlocal.x = x;\n\t\t} else if (y != null) {\n\t\t\tlocal.y = y;\n\t\t}\n\n\t\tconst normal = this._normal;\n\t\tif (nx != null && ny != null) {\n\t\t\tnormal.set(nx, ny);\n\t\t} else if (nx != null) {\n\t\t\tnormal.x = nx;\n\t\t} else if (ny != null) {\n\t\t\tnormal.y = ny;\n\t\t}\n\n\t\tif (margin != null) {\n\t\t\tthis.margin = margin;\n\t\t}\n\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tcopy(source: EShapeConnectorEdge): this {\n\t\tthis.lock();\n\t\tthis._acceptor.copy(source.acceptor);\n\t\tthis._local.copyFrom(source.local);\n\t\tthis._normal.copyFrom(source.normal);\n\t\tthis.margin = source.margin;\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\tconst acceptor = this._acceptor;\n\t\tconst shape = acceptor.shape;\n\t\tconst shapeUuid = shape ? shape.uuid : null;\n\t\tconst edge = acceptor.edge;\n\t\tconst edgeId = edge != null ? manager.addResource(edge) : -1;\n\t\tconst local = this._local;\n\t\tconst normal = this._normal;\n\t\treturn manager.addResource(\n\t\t\t`[${shapeUuid},${edgeId},${local.x},${local.y},${this._margin},${normal.x},${normal.y},${acceptor.x},${acceptor.y}]`\n\t\t);\n\t}\n\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void {\n\t\tconst resources = manager.resources;\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<EShapeConnectorEdgeSerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as EShapeConnectorEdgeSerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tlet shape: EShape | null = null;\n\t\t\tconst shapeUuid = parsed[0];\n\t\t\tif (shapeUuid != null) {\n\t\t\t\tshape = mapping.find(shapeUuid) || null;\n\t\t\t}\n\t\t\tthis.lock();\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tacceptor.shape = shape;\n\t\t\tconst edgeId = parsed[1];\n\t\t\tacceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;\n\t\t\tacceptor.x = parsed[7] ?? null;\n\t\t\tacceptor.y = parsed[8] ?? null;\n\t\t\tthis._local.set(parsed[2], parsed[3]);\n\t\t\tconst normalX = parsed[5];\n\t\t\tconst normalY = parsed[6];\n\t\t\tconst normal = this._normal;\n\t\t\tif (normalX != null && normalY != null) {\n\t\t\t\tnormal.set(normalX, normalY);\n\t\t\t} else {\n\t\t\t\tnormal.set(1, 0);\n\t\t\t}\n\t\t\tthis.margin = parsed[4] || 0;\n\t\t\tthis.unlock();\n\t\t\tif (shape) {\n\t\t\t\tshape.connector.add(this);\n\t\t\t}\n\t\t}\n\t}\n\n\tfit(forcibly?: boolean): this {\n\t\tif (forcibly) {\n\t\t\tthis._localIdRequired += 1;\n\t\t\tthis._normalIdRequired += 1;\n\t\t}\n\t\tthis.doFit();\n\t\treturn this;\n\t}\n\n\tprotected doFit(): boolean {\n\t\tconst localIdRequired = this._localIdRequired;\n\t\tconst isLocalDirty = this._localId !== localIdRequired;\n\t\tconst normalIdRequired = this._normalIdRequired;\n\t\tconst isNormalDirty = this._normalId !== normalIdRequired;\n\t\tif (isLocalDirty || isNormalDirty) {\n\t\t\tthis._localId = localIdRequired;\n\t\t\tthis._normalId = normalIdRequired;\n\n\t\t\tconst acceptor = this._acceptor;\n\t\t\tconst acceptorShape = acceptor.shape;\n\t\t\tconst acceptorEdge = acceptor.edge;\n\t\t\tif (acceptorShape != null && acceptorEdge != null) {\n\t\t\t\tconst edge = EShapeAcceptors.get(acceptorShape.type).get(\n\t\t\t\t\tacceptorShape,\n\t\t\t\t\tacceptorEdge\n\t\t\t\t);\n\t\t\t\tif (edge) {\n\t\t\t\t\tconst transform = this.toAcceptorTransform(acceptorShape);\n\t\t\t\t\tconst a = transform.a;\n\t\t\t\t\tconst b = transform.b;\n\t\t\t\t\tconst c = transform.c;\n\t\t\t\t\tconst d = transform.d;\n\t\t\t\t\tconst tx = transform.tx;\n\t\t\t\t\tconst ty = transform.ty;\n\n\t\t\t\t\tthis.lock();\n\t\t\t\t\tif (isLocalDirty) {\n\t\t\t\t\t\tconst size = acceptorShape.size;\n\t\t\t\t\t\tconst pivot = acceptorShape.transform.pivot;\n\t\t\t\t\t\tconst lx = pivot.x + size.x * (acceptor.x ?? edge.x);\n\t\t\t\t\t\tconst ly = pivot.y + size.y * (acceptor.y ?? edge.y);\n\t\t\t\t\t\tthis._local.set(a * lx + c * ly + tx, b * lx + d * ly + ty);\n\t\t\t\t\t}\n\t\t\t\t\tif (isNormalDirty) {\n\t\t\t\t\t\tconst edgeNormal = edge.normal;\n\t\t\t\t\t\tconst nx = edgeNormal.x;\n\t\t\t\t\t\tconst ny = edgeNormal.y;\n\t\t\t\t\t\tconst x = a * nx + c * ny;\n\t\t\t\t\t\tconst y = b * nx + d * ny;\n\t\t\t\t\t\tconst l = x * x + y * y;\n\t\t\t\t\t\tconst normal = this._normal;\n\t\t\t\t\t\tif (0.000001 < l) {\n\t\t\t\t\t\t\tconst f = 1 / Math.sqrt(l);\n\t\t\t\t\t\t\tnormal.set(x * f, y * f);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnormal.set(nx, ny);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tconst result = this._isLocalChanged || this._isNormalChanged;\n\t\t\t\t\tthis.unlock();\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\tprotected toAcceptorTransform(shape: EShape): Matrix {\n\t\tshape.updateTransform();\n\t\tconst parent = this._parent;\n\t\tconst parentParent = parent.parent;\n\t\tif (parentParent) {\n\t\t\tparent.updateTransform();\n\t\t\treturn (EShapeConnectorEdgeImpl.WORK_MATRIX ??= new Matrix())\n\t\t\t\t.copyFrom(parentParent.transform.worldTransform)\n\t\t\t\t.invert()\n\t\t\t\t.append(shape.transform.worldTransform);\n\t\t} else {\n\t\t\treturn shape.transform.worldTransform;\n\t\t}\n\t}\n\n\tonAcceptorChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = false;\n\t\t\tthis._isNormalChanged = false;\n\t\t\tthis._isAcceptorChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis.fit(true);\n\t}\n\n\tprotected onLocalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isLocalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._localIdRequired += 1;\n\t\tthis._localId = this._localIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onNormalChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isNormalChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._normalIdRequired += 1;\n\t\tthis._normalId = this._normalIdRequired;\n\t\tthis._onChange();\n\t}\n\n\tprotected onOtherChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isOtherChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n\n\tattach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tshape.connector.add(this);\n\t\t}\n\t\treturn this;\n\t}\n\n\tdetach(): this {\n\t\tconst shape = this._acceptor.shape;\n\t\tif (shape) {\n\t\t\tshape.connector.remove(this);\n\t\t}\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdgeAcceptor } from \"./e-shape-connector-edge-acceptor\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport type EShapeConnectorEdgeSerialized = [\n\tnumber | null,\n\tnumber,\n\tnumber,\n\tnumber,\n\tnumber,\n\tnumber?,\n\tnumber?\n];\n\nexport interface EShapeConnectorEdge {\n\treadonly parent: EShapeConnector;\n\treadonly acceptor: EShapeConnectorEdgeAcceptor;\n\treadonly local: IPoint;\n\treadonly localId: number;\n\treadonly normal: IPoint;\n\treadonly normalId: number;\n\tmargin: number;\n\n\tlock(): void;\n\tunlock(): void;\n\tset(\n\t\
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { IPoint } from \"pixi.js\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdgeAcceptor } from \"./e-shape-connector-edge-acceptor\";\nimport { EShapeResourceManagerDeserialization } from \"./e-shape-resource-manager-deserialization\";\nimport { EShapeResourceManagerSerialization } from \"./e-shape-resource-manager-serialization\";\nimport { EShapeUuidMapping } from \"./e-shape-uuid-mapping\";\n\nexport type EShapeConnectorEdgeSerialized = [\n\tnumber | null,\n\tnumber,\n\tnumber,\n\tnumber,\n\tnumber,\n\tnumber?,\n\tnumber?,\n\t(number | null)?,\n\t(number | null)?\n];\n\nexport interface EShapeConnectorEdge {\n\treadonly parent: EShapeConnector;\n\treadonly acceptor: EShapeConnectorEdgeAcceptor;\n\treadonly local: IPoint;\n\treadonly localId: number;\n\treadonly normal: IPoint;\n\treadonly normalId: number;\n\tmargin: number;\n\n\tlock(): void;\n\tunlock(): void;\n\tset(\n\t\tacceptorShape?: EShape | null,\n\t\tacceptorEdge?: string | null,\n\t\tacceptorX?: number | null,\n\t\tacceptorY?: number | null,\n\t\tmargin?: number,\n\t\tx?: number,\n\t\ty?: number,\n\t\tnx?: number,\n\t\tny?: number\n\t): this;\n\tcopy(source: EShapeConnectorEdge): this;\n\tfit(forcibly?: boolean): this;\n\tserialize(manager: EShapeResourceManagerSerialization): number;\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void;\n\tattach(): this;\n\tdetach(): this;\n}\n"]}
|
package/dist/wcardinal-ui.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Winter Cardinal UI v0.
|
|
2
|
+
Winter Cardinal UI v0.317.0
|
|
3
3
|
Copyright (C) 2019 Toshiba Corporation
|
|
4
4
|
SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
|
|
@@ -17622,12 +17622,16 @@ var EShapeAcceptorImpl = /** @class */ (function () {
|
|
|
17622
17622
|
function EShapeAcceptorImpl() {
|
|
17623
17623
|
this._edges = new Map();
|
|
17624
17624
|
}
|
|
17625
|
-
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny) {
|
|
17625
|
+
EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy) {
|
|
17626
17626
|
this._edges.set(id, {
|
|
17627
17627
|
type: type,
|
|
17628
17628
|
x: x,
|
|
17629
17629
|
y: y,
|
|
17630
|
-
normal: this.toNormal(x, y, nx, ny)
|
|
17630
|
+
normal: this.toNormal(x, y, nx, ny),
|
|
17631
|
+
size: {
|
|
17632
|
+
x: sx !== null && sx !== void 0 ? sx : 0,
|
|
17633
|
+
y: sy !== null && sy !== void 0 ? sy : 0
|
|
17634
|
+
}
|
|
17631
17635
|
});
|
|
17632
17636
|
return true;
|
|
17633
17637
|
};
|
|
@@ -17751,6 +17755,8 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
|
|
|
17751
17755
|
this._parent = parent;
|
|
17752
17756
|
this._shape = null;
|
|
17753
17757
|
this._edge = null;
|
|
17758
|
+
this._x = null;
|
|
17759
|
+
this._y = null;
|
|
17754
17760
|
}
|
|
17755
17761
|
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "shape", {
|
|
17756
17762
|
get: function () {
|
|
@@ -17772,10 +17778,30 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
|
|
|
17772
17778
|
enumerable: false,
|
|
17773
17779
|
configurable: true
|
|
17774
17780
|
});
|
|
17781
|
+
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "x", {
|
|
17782
|
+
get: function () {
|
|
17783
|
+
return this._x;
|
|
17784
|
+
},
|
|
17785
|
+
set: function (x) {
|
|
17786
|
+
this.set(undefined, undefined, x);
|
|
17787
|
+
},
|
|
17788
|
+
enumerable: false,
|
|
17789
|
+
configurable: true
|
|
17790
|
+
});
|
|
17791
|
+
Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "y", {
|
|
17792
|
+
get: function () {
|
|
17793
|
+
return this._y;
|
|
17794
|
+
},
|
|
17795
|
+
set: function (y) {
|
|
17796
|
+
this.set(undefined, undefined, undefined, y);
|
|
17797
|
+
},
|
|
17798
|
+
enumerable: false,
|
|
17799
|
+
configurable: true
|
|
17800
|
+
});
|
|
17775
17801
|
EShapeConnectorEdgeAcceptorImpl.prototype.copy = function (source) {
|
|
17776
|
-
return this.set(source.shape, source.edge);
|
|
17802
|
+
return this.set(source.shape, source.edge, source.x, source.y);
|
|
17777
17803
|
};
|
|
17778
|
-
EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge) {
|
|
17804
|
+
EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge, x, y) {
|
|
17779
17805
|
var isChanged = false;
|
|
17780
17806
|
if (shape !== undefined && this._shape !== shape) {
|
|
17781
17807
|
this._shape = shape;
|
|
@@ -17785,6 +17811,14 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
|
|
|
17785
17811
|
this._edge = edge;
|
|
17786
17812
|
isChanged = true;
|
|
17787
17813
|
}
|
|
17814
|
+
if (x !== undefined && this._x !== x) {
|
|
17815
|
+
this._x = x;
|
|
17816
|
+
isChanged = true;
|
|
17817
|
+
}
|
|
17818
|
+
if (y !== undefined && this._y !== y) {
|
|
17819
|
+
this._y = y;
|
|
17820
|
+
isChanged = true;
|
|
17821
|
+
}
|
|
17788
17822
|
if (isChanged) {
|
|
17789
17823
|
this._parent.onAcceptorChange();
|
|
17790
17824
|
}
|
|
@@ -17917,9 +17951,9 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
17917
17951
|
enumerable: false,
|
|
17918
17952
|
configurable: true
|
|
17919
17953
|
});
|
|
17920
|
-
EShapeConnectorEdgeImpl.prototype.set = function (
|
|
17954
|
+
EShapeConnectorEdgeImpl.prototype.set = function (acceptorShape, acceptorEdge, acceptorX, acceptorY, margin, x, y, nx, ny) {
|
|
17921
17955
|
this.lock();
|
|
17922
|
-
this._acceptor.set(
|
|
17956
|
+
this._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);
|
|
17923
17957
|
var local = this._local;
|
|
17924
17958
|
if (x != null && y != null) {
|
|
17925
17959
|
local.set(x, y);
|
|
@@ -17963,9 +17997,10 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
17963
17997
|
var edgeId = edge != null ? manager.addResource(edge) : -1;
|
|
17964
17998
|
var local = this._local;
|
|
17965
17999
|
var normal = this._normal;
|
|
17966
|
-
return manager.addResource("[".concat(shapeUuid, ",").concat(edgeId, ",").concat(local.x, ",").concat(local.y, ",").concat(this._margin, ",").concat(normal.x, ",").concat(normal.y, "]"));
|
|
18000
|
+
return manager.addResource("[".concat(shapeUuid, ",").concat(edgeId, ",").concat(local.x, ",").concat(local.y, ",").concat(this._margin, ",").concat(normal.x, ",").concat(normal.y, ",").concat(acceptor.x, ",").concat(acceptor.y, "]"));
|
|
17967
18001
|
};
|
|
17968
18002
|
EShapeConnectorEdgeImpl.prototype.deserialize = function (resourceId, mapping, manager) {
|
|
18003
|
+
var _a, _b;
|
|
17969
18004
|
var resources = manager.resources;
|
|
17970
18005
|
if (0 <= resourceId && resourceId < resources.length) {
|
|
17971
18006
|
var parsed = manager.getExtension(resourceId);
|
|
@@ -17983,6 +18018,8 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
17983
18018
|
acceptor.shape = shape;
|
|
17984
18019
|
var edgeId = parsed[1];
|
|
17985
18020
|
acceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;
|
|
18021
|
+
acceptor.x = (_a = parsed[7]) !== null && _a !== void 0 ? _a : null;
|
|
18022
|
+
acceptor.y = (_b = parsed[8]) !== null && _b !== void 0 ? _b : null;
|
|
17986
18023
|
this._local.set(parsed[2], parsed[3]);
|
|
17987
18024
|
var normalX = parsed[5];
|
|
17988
18025
|
var normalY = parsed[6];
|
|
@@ -18009,6 +18046,7 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
18009
18046
|
return this;
|
|
18010
18047
|
};
|
|
18011
18048
|
EShapeConnectorEdgeImpl.prototype.doFit = function () {
|
|
18049
|
+
var _a, _b;
|
|
18012
18050
|
var localIdRequired = this._localIdRequired;
|
|
18013
18051
|
var isLocalDirty = this._localId !== localIdRequired;
|
|
18014
18052
|
var normalIdRequired = this._normalIdRequired;
|
|
@@ -18033,8 +18071,8 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
|
|
|
18033
18071
|
if (isLocalDirty) {
|
|
18034
18072
|
var size = acceptorShape.size;
|
|
18035
18073
|
var pivot = acceptorShape.transform.pivot;
|
|
18036
|
-
var lx = pivot.x + size.x * edge.x;
|
|
18037
|
-
var ly = pivot.y + size.y * edge.y;
|
|
18074
|
+
var lx = pivot.x + size.x * ((_a = acceptor.x) !== null && _a !== void 0 ? _a : edge.x);
|
|
18075
|
+
var ly = pivot.y + size.y * ((_b = acceptor.y) !== null && _b !== void 0 ? _b : edge.y);
|
|
18038
18076
|
this._local.set(a * lx + c * ly + tx, b * lx + d * ly + ty);
|
|
18039
18077
|
}
|
|
18040
18078
|
if (isNormalDirty) {
|