@wcardinal/wcardinal-ui 0.148.0 → 0.149.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-connector-bodies.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body-impl.d.ts +24 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-body.d.ts +14 -0
- package/dist/types/wcardinal/ui/shape/e-shape-connector-edge-container.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/index.d.ts +3 -0
- package/dist/types/wcardinal/ui/shape/variant/e-shape-connector-line.d.ts +9 -2
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js +36 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-bodies.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js +88 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body-impl.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js +6 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-body.js.map +1 -0
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container-impl.js.map +1 -1
- package/dist/wcardinal/ui/shape/e-shape-connector-edge-container.js.map +1 -1
- package/dist/wcardinal/ui/shape/index.js +3 -0
- package/dist/wcardinal/ui/shape/index.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js +19 -1
- package/dist/wcardinal/ui/shape/variant/deserialize-connector-line.js.map +1 -1
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.js +104 -81
- package/dist/wcardinal/ui/shape/variant/e-shape-connector-line.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 +246 -83
- package/dist/wcardinal-ui.js +246 -83
- package/dist/wcardinal-ui.min.js +2 -2
- package/dist/wcardinal-ui.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { EShapeConnector } from "./e-shape-connector";
|
|
2
|
+
import { EShapeConnectorBody } from "./e-shape-connector-body";
|
|
3
|
+
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
4
|
+
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
5
|
+
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
6
|
+
export declare class EShapeConnectorBodyImpl implements EShapeConnectorBody {
|
|
7
|
+
protected _parent: EShapeConnector;
|
|
8
|
+
protected _id: number;
|
|
9
|
+
protected _values: number[];
|
|
10
|
+
protected _lockCount: number;
|
|
11
|
+
protected _isChanged: boolean;
|
|
12
|
+
protected _onChange: () => void;
|
|
13
|
+
constructor(parent: EShapeConnector, onChange: () => void);
|
|
14
|
+
lock(): void;
|
|
15
|
+
unlock(): void;
|
|
16
|
+
get id(): number;
|
|
17
|
+
get values(): number[];
|
|
18
|
+
set values(newValues: number[]);
|
|
19
|
+
set(newValues?: number[]): this;
|
|
20
|
+
copy(source: EShapeConnectorBody): this;
|
|
21
|
+
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
22
|
+
deserialize(resourceId: number, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization): void;
|
|
23
|
+
protected onChange(): void;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
2
|
+
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
3
|
+
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
4
|
+
export declare type EShapeConnectorBodySerialized = number[];
|
|
5
|
+
export interface EShapeConnectorBody {
|
|
6
|
+
readonly id: number;
|
|
7
|
+
values: number[];
|
|
8
|
+
lock(): void;
|
|
9
|
+
unlock(): void;
|
|
10
|
+
set(values?: number[]): this;
|
|
11
|
+
copy(source: EShapeConnectorBody): this;
|
|
12
|
+
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
13
|
+
deserialize(resourceId: number, mapping: EShapeUuidMapping, manager: EShapeResourceManagerDeserialization): void;
|
|
14
|
+
}
|
|
@@ -2,9 +2,12 @@ import { EShapeConnectorEdge } from "./e-shape-connector-edge";
|
|
|
2
2
|
import { EShapeResourceManagerDeserialization } from "./e-shape-resource-manager-deserialization";
|
|
3
3
|
import { EShapeResourceManagerSerialization } from "./e-shape-resource-manager-serialization";
|
|
4
4
|
import { EShapeUuidMapping } from "./e-shape-uuid-mapping";
|
|
5
|
+
export declare type EShapeConnectorEdgeContainerSerialized = [number, number];
|
|
5
6
|
export interface EShapeConnectorEdgeContainer {
|
|
6
7
|
tail: EShapeConnectorEdge;
|
|
7
8
|
head: EShapeConnectorEdge;
|
|
9
|
+
lock(): void;
|
|
10
|
+
unlock(): void;
|
|
8
11
|
copy(source: EShapeConnectorEdgeContainer): this;
|
|
9
12
|
fit(forcibly?: boolean): this;
|
|
10
13
|
serialize(manager: EShapeResourceManagerSerialization): number;
|
|
@@ -10,6 +10,9 @@ export * from "./e-shape-buffer-unit";
|
|
|
10
10
|
export * from "./e-shape-buffer";
|
|
11
11
|
export * from "./e-shape-capabilities";
|
|
12
12
|
export * from "./e-shape-capability";
|
|
13
|
+
export * from "./e-shape-connector-bodies";
|
|
14
|
+
export * from "./e-shape-connector-body-impl";
|
|
15
|
+
export * from "./e-shape-connector-body";
|
|
13
16
|
export * from "./e-shape-connector-container-impl";
|
|
14
17
|
export * from "./e-shape-connector-container";
|
|
15
18
|
export * from "./e-shape-connector-edge-acceptor-impl";
|
|
@@ -7,21 +7,28 @@ import { EShapeCopyPart } from "../e-shape-copy-part";
|
|
|
7
7
|
import { DDiagramSerializedItem } from "../../d-diagram-serialized";
|
|
8
8
|
import { EShapeResourceManagerSerialization } from "../e-shape-resource-manager-serialization";
|
|
9
9
|
import { EShape } from "../e-shape";
|
|
10
|
+
import { EShapeConnectorBody } from "../e-shape-connector-body";
|
|
10
11
|
export declare class EShapeConnectorLine extends EShapeLineBase implements EShapeConnector {
|
|
11
12
|
protected static WORK_BOUNDARY: [number, number, number, number];
|
|
12
13
|
protected _edge: EShapeConnectorEdgeContainer;
|
|
14
|
+
protected _body: EShapeConnectorBody;
|
|
13
15
|
protected _points: EShapeLinePoints;
|
|
14
16
|
protected _tailLocalId: number;
|
|
15
17
|
protected _tailMargin: number;
|
|
16
18
|
protected _headLocalId: number;
|
|
17
19
|
protected _headMargin: number;
|
|
20
|
+
protected _bodyId: number;
|
|
21
|
+
protected _lockCount: number;
|
|
22
|
+
protected _isChanged: boolean;
|
|
18
23
|
constructor(type?: EShapeType);
|
|
24
|
+
lock(): void;
|
|
25
|
+
unlock(): void;
|
|
19
26
|
get points(): EShapeLinePoints;
|
|
20
27
|
get edge(): EShapeConnectorEdgeContainer;
|
|
28
|
+
get body(): EShapeConnectorBody;
|
|
21
29
|
onAttach(): void;
|
|
22
30
|
onDetach(): void;
|
|
23
|
-
protected
|
|
24
|
-
protected toValues(x0: number, y0: number, x1: number, y1: number, margin0: number, margin1: number, result: number[]): number[];
|
|
31
|
+
protected onChange(): void;
|
|
25
32
|
copy(source: EShape, part?: EShapeCopyPart): this;
|
|
26
33
|
clone(): EShapeConnectorLine;
|
|
27
34
|
serialize(manager: EShapeResourceManagerSerialization): DDiagramSerializedItem;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
var EShapeConnectorBodies = /** @class */ (function () {
|
|
6
|
+
function EShapeConnectorBodies() {
|
|
7
|
+
}
|
|
8
|
+
EShapeConnectorBodies.from = function (values) {
|
|
9
|
+
var result = [];
|
|
10
|
+
var length = values.length;
|
|
11
|
+
if (4 < length) {
|
|
12
|
+
var x0 = values[0];
|
|
13
|
+
var y0 = values[1];
|
|
14
|
+
var x1 = values[length - 2];
|
|
15
|
+
var y1 = values[length - 1];
|
|
16
|
+
var cx = (x1 + x0) * 0.5;
|
|
17
|
+
var cy = (y1 + y0) * 0.5;
|
|
18
|
+
var dx = x1 - x0;
|
|
19
|
+
var dy = y1 - y0;
|
|
20
|
+
var a = Math.atan2(dy, dx);
|
|
21
|
+
var c = Math.cos(a);
|
|
22
|
+
var s = Math.sin(a);
|
|
23
|
+
var l = dx * dx + dy * dy;
|
|
24
|
+
var m = 0.000001 < l ? 1 / Math.sqrt(l) : 1;
|
|
25
|
+
for (var i = 2, imax = length - 2; i < imax; i += 2) {
|
|
26
|
+
var x = values[i + 0] - cx;
|
|
27
|
+
var y = values[i + 1] - cy;
|
|
28
|
+
result.push((c * x - s * y) * m, (c * y + s * x) * m);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
return EShapeConnectorBodies;
|
|
34
|
+
}());
|
|
35
|
+
export { EShapeConnectorBodies };
|
|
36
|
+
//# sourceMappingURL=e-shape-connector-bodies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-connector-bodies.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-bodies.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;IAAA;IA0BA,CAAC;IAzBO,0BAAI,GAAX,UAAY,MAAgB;QAC3B,IAAM,MAAM,GAAa,EAAE,CAAC;QAC5B,IAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC7B,IAAI,CAAC,GAAG,MAAM,EAAE;YACf,IAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,IAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,IAAM,EAAE,GAAG,MAAM,CAAC,MAAM,GAAG,CA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;QACD,OAAO,MAAM,CAAC;IACf,CAAC;IACF,4BAAC;AAAD,CAAC,AA1BD,IA0BC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport class EShapeConnectorBodies {\n\tstatic from(values: number[]): number[] {\n\t\tconst result: number[] = [];\n\t\tconst length = values.length;\n\t\tif (4 < length) {\n\t\t\tconst x0 = values[0];\n\t\t\tconst y0 = values[1];\n\t\t\tconst x1 = values[length - 2];\n\t\t\tconst y1 = values[length - 1];\n\t\t\tconst cx = (x1 + x0) * 0.5;\n\t\t\tconst cy = (y1 + y0) * 0.5;\n\t\t\tconst dx = x1 - x0;\n\t\t\tconst dy = y1 - y0;\n\t\t\tconst a = Math.atan2(dy, dx);\n\t\t\tconst c = Math.cos(a);\n\t\t\tconst s = Math.sin(a);\n\t\t\tconst l = dx * dx + dy * dy;\n\t\t\tconst m = 0.000001 < l ? 1 / Math.sqrt(l) : 1;\n\t\t\tfor (let i = 2, imax = length - 2; i < imax; i += 2) {\n\t\t\t\tconst x = values[i + 0] - cx;\n\t\t\t\tconst y = values[i + 1] - cy;\n\t\t\t\tresult.push((c * x - s * y) * m, (c * y + s * x) * m);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n}\n"]}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2019 Toshiba Corporation
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
var EShapeConnectorBodyImpl = /** @class */ (function () {
|
|
6
|
+
function EShapeConnectorBodyImpl(parent, onChange) {
|
|
7
|
+
this._parent = parent;
|
|
8
|
+
this._id = 0;
|
|
9
|
+
this._values = [];
|
|
10
|
+
this._lockCount = 0;
|
|
11
|
+
this._isChanged = false;
|
|
12
|
+
this._onChange = onChange;
|
|
13
|
+
}
|
|
14
|
+
EShapeConnectorBodyImpl.prototype.lock = function () {
|
|
15
|
+
this._lockCount += 1;
|
|
16
|
+
if (this._lockCount === 1) {
|
|
17
|
+
this._isChanged = false;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
EShapeConnectorBodyImpl.prototype.unlock = function () {
|
|
21
|
+
this._lockCount -= 1;
|
|
22
|
+
if (this._lockCount === 0) {
|
|
23
|
+
if (this._isChanged) {
|
|
24
|
+
this.onChange();
|
|
25
|
+
}
|
|
26
|
+
this._isChanged = false;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(EShapeConnectorBodyImpl.prototype, "id", {
|
|
30
|
+
get: function () {
|
|
31
|
+
return this._id;
|
|
32
|
+
},
|
|
33
|
+
enumerable: false,
|
|
34
|
+
configurable: true
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(EShapeConnectorBodyImpl.prototype, "values", {
|
|
37
|
+
get: function () {
|
|
38
|
+
return this._values;
|
|
39
|
+
},
|
|
40
|
+
set: function (newValues) {
|
|
41
|
+
this.set(newValues);
|
|
42
|
+
},
|
|
43
|
+
enumerable: false,
|
|
44
|
+
configurable: true
|
|
45
|
+
});
|
|
46
|
+
EShapeConnectorBodyImpl.prototype.set = function (newValues) {
|
|
47
|
+
if (newValues != null) {
|
|
48
|
+
this._id += 1;
|
|
49
|
+
if (this._values !== newValues) {
|
|
50
|
+
var length_1 = newValues.length;
|
|
51
|
+
var values = this._values;
|
|
52
|
+
for (var i = 0; i < length_1; ++i) {
|
|
53
|
+
values[i] = newValues[i];
|
|
54
|
+
}
|
|
55
|
+
values.length = length_1;
|
|
56
|
+
}
|
|
57
|
+
this.onChange();
|
|
58
|
+
}
|
|
59
|
+
return this;
|
|
60
|
+
};
|
|
61
|
+
EShapeConnectorBodyImpl.prototype.copy = function (source) {
|
|
62
|
+
return this.set(source.values);
|
|
63
|
+
};
|
|
64
|
+
EShapeConnectorBodyImpl.prototype.serialize = function (manager) {
|
|
65
|
+
return manager.addResource(JSON.stringify(this._values));
|
|
66
|
+
};
|
|
67
|
+
EShapeConnectorBodyImpl.prototype.deserialize = function (resourceId, mapping, manager) {
|
|
68
|
+
var resources = manager.resources;
|
|
69
|
+
if (0 <= resourceId && resourceId < resources.length) {
|
|
70
|
+
var parsed = manager.getExtension(resourceId);
|
|
71
|
+
if (parsed == null) {
|
|
72
|
+
parsed = JSON.parse(resources[resourceId]);
|
|
73
|
+
manager.setExtension(resourceId, parsed);
|
|
74
|
+
}
|
|
75
|
+
this.set(parsed);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
EShapeConnectorBodyImpl.prototype.onChange = function () {
|
|
79
|
+
if (0 < this._lockCount) {
|
|
80
|
+
this._isChanged = true;
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this._onChange();
|
|
84
|
+
};
|
|
85
|
+
return EShapeConnectorBodyImpl;
|
|
86
|
+
}());
|
|
87
|
+
export { EShapeConnectorBodyImpl };
|
|
88
|
+
//# sourceMappingURL=e-shape-connector-body-impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-connector-body-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-body-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;IAQC,iCAAY,MAAuB,EAAE,QAAoB;QACxD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;QACb,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,sCAAI,GAAJ;QACC,IAAI,CAAC,UAAU,IAAI,CAAC,CAAC;QACrB,IAAI,IAAI,CAAC,UAAU,KAAK,CAAC,EAAE;YAC1B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACxB;IACF,CAA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AC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,6CAAW,GAAX,UACC,UAAkB,EAClB,OAA0B,EAC1B,OAA6C;QAE7C,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;YACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,CAAgC,UAAU,CAAC,CAAC;YAC7E,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAAkC,CAAC;gBAC5E,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;aACzC;YACD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;SACjB;IACF,CAAC;IAES,0CAAQ,GAAlB;QACC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;YACvB,OAAO;SACP;QACD,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IACF,8BAAC;AAAD,CAAC,AA7FD,IA6FC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorBody, EShapeConnectorBodySerialized } from \"./e-shape-connector-body\";\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 EShapeConnectorBodyImpl implements EShapeConnectorBody {\n\tprotected _parent: EShapeConnector;\n\tprotected _id: number;\n\tprotected _values: number[];\n\tprotected _lockCount: number;\n\tprotected _isChanged: boolean;\n\tprotected _onChange: () => void;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._id = 0;\n\t\tthis._values = [];\n\t\tthis._lockCount = 0;\n\t\tthis._isChanged = false;\n\t\tthis._onChange = onChange;\n\t}\n\n\tlock(): void {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tunlock(): void {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tif (this._isChanged) {\n\t\t\t\tthis.onChange();\n\t\t\t}\n\t\t\tthis._isChanged = false;\n\t\t}\n\t}\n\n\tget id(): number {\n\t\treturn this._id;\n\t}\n\n\tget values(): number[] {\n\t\treturn this._values;\n\t}\n\n\tset values(newValues: number[]) {\n\t\tthis.set(newValues);\n\t}\n\n\tset(newValues?: number[]): this {\n\t\tif (newValues != null) {\n\t\t\tthis._id += 1;\n\t\t\tif (this._values !== newValues) {\n\t\t\t\tconst length = newValues.length;\n\t\t\t\tconst values = this._values;\n\t\t\t\tfor (let i = 0; i < length; ++i) {\n\t\t\t\t\tvalues[i] = newValues[i];\n\t\t\t\t}\n\t\t\t\tvalues.length = length;\n\t\t\t}\n\t\t\tthis.onChange();\n\t\t}\n\t\treturn this;\n\t}\n\n\tcopy(source: EShapeConnectorBody): this {\n\t\treturn this.set(source.values);\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\treturn manager.addResource(JSON.stringify(this._values));\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<EShapeConnectorBodySerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as EShapeConnectorBodySerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tthis.set(parsed);\n\t\t}\n\t}\n\n\tprotected onChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"e-shape-connector-body.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-body.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\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 EShapeConnectorBodySerialized = number[];\n\nexport interface EShapeConnectorBody {\n\treadonly id: number;\n\tvalues: number[];\n\n\tlock(): void;\n\tunlock(): void;\n\tset(values?: number[]): this;\n\tcopy(source: EShapeConnectorBody): this;\n\tserialize(manager: EShapeResourceManagerSerialization): number;\n\tdeserialize(\n\t\tresourceId: number,\n\t\tmapping: EShapeUuidMapping,\n\t\tmanager: EShapeResourceManagerDeserialization\n\t): void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-container-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-container-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAKxE;IAQC,0CAAY,MAAuB,EAAE,QAAoB;QAAzD,iBAUC;QATA,IAAI,CAAC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C,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACpD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YACpD,IAAI,CAAC,MAAM,EAAE,CAAC;SACd;IACF,CAAC;IAED,iDAAM,GAAN;QACC,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACxB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IAED,iDAAM,GAAN;QACC,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACpB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,OAAO,IAAI,CAAC;IACb,CAAC;IACF,uCAAC;AAAD,CAAC,AApHD,IAoHC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnector } from \"./e-shape-connector\";\nimport { EShapeConnectorEdge } from \"./e-shape-connector-edge\";\nimport {\n\tEShapeConnectorEdgeContainer,\n\tEShapeConnectorEdgeContainerSerialized\n} from \"./e-shape-connector-edge-container\";\nimport { EShapeConnectorEdgeImpl } from \"./e-shape-connector-edge-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 EShapeConnectorEdgeContainerImpl implements EShapeConnectorEdgeContainer {\n\tprotected _parent: EShapeConnector;\n\tprotected _lockCount: number;\n\tprotected _isChanged: boolean;\n\tprotected _onChange: () => void;\n\tprotected _tail: EShapeConnectorEdge;\n\tprotected _head: EShapeConnectorEdge;\n\n\tconstructor(parent: EShapeConnector, onChange: () => void) {\n\t\tthis._parent = parent;\n\t\tthis._lockCount = 0;\n\t\tthis._isChanged = false;\n\t\tthis._onChange = onChange;\n\t\tconst onChangeBound = (): void => {\n\t\t\tthis.onChange();\n\t\t};\n\t\tthis._tail = new EShapeConnectorEdgeImpl(parent, onChangeBound);\n\t\tthis._head = new EShapeConnectorEdgeImpl(parent, onChangeBound);\n\t}\n\n\tlock(): this {\n\t\tthis._lockCount += 1;\n\t\tif (this._lockCount === 1) {\n\t\t\tthis._isChanged = false;\n\t\t}\n\t\treturn this;\n\t}\n\n\tunlock(): this {\n\t\tthis._lockCount -= 1;\n\t\tif (this._lockCount === 0) {\n\t\t\tif (this._isChanged) {\n\t\t\t\tthis._onChange();\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tprotected onChange(): void {\n\t\tif (0 < this._lockCount) {\n\t\t\tthis._isChanged = true;\n\t\t\treturn;\n\t\t}\n\t\tthis._onChange();\n\t}\n\n\tget tail(): EShapeConnectorEdge {\n\t\treturn this._tail;\n\t}\n\n\tget head(): EShapeConnectorEdge {\n\t\treturn this._head;\n\t}\n\n\tcopy(source: EShapeConnectorEdgeContainer): this {\n\t\tthis.lock();\n\t\tthis._tail.copy(source.tail);\n\t\tthis._head.copy(source.head);\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tfit(forcibly?: boolean): this {\n\t\tthis.lock();\n\t\tthis._tail.fit(forcibly);\n\t\tthis._head.fit(forcibly);\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tserialize(manager: EShapeResourceManagerSerialization): number {\n\t\tconst tailId = this._tail.serialize(manager);\n\t\tconst headId = this._head.serialize(manager);\n\t\treturn manager.addResource(`[${tailId},${headId}]`);\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<EShapeConnectorEdgeContainerSerialized>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(\n\t\t\t\t\tresources[resourceId]\n\t\t\t\t) as EShapeConnectorEdgeContainerSerialized;\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\t\t\t}\n\t\t\tthis.lock();\n\t\t\tthis._tail.deserialize(parsed[0], mapping, manager);\n\t\t\tthis._head.deserialize(parsed[1], mapping, manager);\n\t\t\tthis.unlock();\n\t\t}\n\t}\n\n\tattach(): this {\n\t\tthis.lock();\n\t\tconst tail = this._tail;\n\t\tconst head = this._head;\n\t\ttail.attach();\n\t\thead.attach();\n\t\ttail.fit(true);\n\t\thead.fit(true);\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n\n\tdetach(): this {\n\t\tthis.lock();\n\t\tthis._tail.detach();\n\t\tthis._head.detach();\n\t\tthis.unlock();\n\t\treturn this;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e-shape-connector-edge-container.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnectorEdge } from \"./e-shape-connector-edge\";\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 interface EShapeConnectorEdgeContainer {\n\ttail: EShapeConnectorEdge;\n\thead: EShapeConnectorEdge;\n\tcopy(source: EShapeConnectorEdgeContainer): 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"]}
|
|
1
|
+
{"version":3,"file":"e-shape-connector-edge-container.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-connector-edge-container.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShapeConnectorEdge } from \"./e-shape-connector-edge\";\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 EShapeConnectorEdgeContainerSerialized = [number, number];\n\nexport interface EShapeConnectorEdgeContainer {\n\ttail: EShapeConnectorEdge;\n\thead: EShapeConnectorEdge;\n\tlock(): void;\n\tunlock(): void;\n\tcopy(source: EShapeConnectorEdgeContainer): 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"]}
|
|
@@ -14,6 +14,9 @@ export * from "./e-shape-buffer-unit";
|
|
|
14
14
|
export * from "./e-shape-buffer";
|
|
15
15
|
export * from "./e-shape-capabilities";
|
|
16
16
|
export * from "./e-shape-capability";
|
|
17
|
+
export * from "./e-shape-connector-bodies";
|
|
18
|
+
export * from "./e-shape-connector-body-impl";
|
|
19
|
+
export * from "./e-shape-connector-body";
|
|
17
20
|
export * from "./e-shape-connector-container-impl";
|
|
18
21
|
export * from "./e-shape-connector-container";
|
|
19
22
|
export * from "./e-shape-connector-edge-acceptor-impl";
|
|
@@ -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,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,sBAAsB,CAAC;AACrC,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;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,o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,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-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\";\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-value-range\";\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-deserializer\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-image-elements\";\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-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\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-sizes\";\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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["/*\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-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\";\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-value-range\";\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-deserializer\";\nexport * from \"./e-shape-deserializers\";\nexport * from \"./e-shape-editor\";\nexport * from \"./e-shape-fill\";\nexport * from \"./e-shape-gradient\";\nexport * from \"./e-shape-image-elements\";\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-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\";\nexport * from \"./e-shape-resource-manager-serialization\";\nexport * from \"./e-shape-runtime\";\nexport * from \"./e-shape-runtimes\";\nexport * from \"./e-shape-search\";\nexport * from \"./e-shape-sizes\";\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"]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (C) 2019 Toshiba Corporation
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
+
import { EShapeConnectorBodies } from "../e-shape-connector-bodies";
|
|
5
6
|
import { EShapeDeserializer } from "../e-shape-deserializer";
|
|
6
7
|
import { EShapeConnectorLine } from "./e-shape-connector-line";
|
|
7
8
|
export var deserializeConnectorLine = function (item, manager) {
|
|
@@ -17,8 +18,25 @@ export var onConnectorLineDeserialized = function (item, shape, mapping, manager
|
|
|
17
18
|
parsed = JSON.parse(resources[resourceId]);
|
|
18
19
|
manager.setExtension(resourceId, parsed);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
// Lock
|
|
22
|
+
shape.lock();
|
|
23
|
+
// Points
|
|
24
|
+
var points = shape.points;
|
|
25
|
+
points.deserialize(parsed[1], manager);
|
|
26
|
+
// Edge
|
|
21
27
|
shape.edge.deserialize(parsed[0], mapping, manager);
|
|
28
|
+
// Body
|
|
29
|
+
var body = shape.body;
|
|
30
|
+
var bodyId = parsed[2];
|
|
31
|
+
if (bodyId != null) {
|
|
32
|
+
body.deserialize(bodyId, mapping, manager);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
// The following is for backward compatibility.
|
|
36
|
+
body.set(EShapeConnectorBodies.from(points.values));
|
|
37
|
+
}
|
|
38
|
+
// Unlock
|
|
39
|
+
shape.unlock();
|
|
22
40
|
}
|
|
23
41
|
}
|
|
24
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAC1C,IAA4B,EAC5B,KAAa,EACb,OAA0B,EAC1B,OAA6C;IAE7C,IAAI,KAAK,YAAY,mBAAmB,EAAE;QACzC,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;YACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,
|
|
1
|
+
{"version":3,"file":"deserialize-connector-line.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/shape/variant/deserialize-connector-line.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,MAAM,CAAC,IAAM,wBAAwB,GAAG,UACvC,IAA4B,EAC5B,OAA6C;IAE7C,OAAO,kBAAkB,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,mBAAmB,EAAE,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,2BAA2B,GAAG,UAC1C,IAA4B,EAC5B,KAAa,EACb,OAA0B,EAC1B,OAA6C;IAE7C,IAAI,KAAK,YAAY,mBAAmB,EAAE;QACzC,IAAM,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACpC,IAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5B,IAAI,CAAC,IAAI,UAAU,IAAI,UAAU,GAAG,SAAS,CAAC,MAAM,EAAE;YACrD,IAAI,MAAM,GAAG,OAAO,CAAC,YAAY,CAA4B,UAAU,CAAC,CAAC;YACzE,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,UAAU,CAAC,CAA8B,CAAC;gBACxE,OAAO,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;aAEzC;YAED,OAAO;YACP,KAAK,CAAC,IAAI,EAAE,CAAC;YAEb,SAAS;YACT,IAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;YAC5B,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YAEvC,OAAO;YACP,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;YAEpD,OAAO;YACP,IAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;YACxB,IAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,MAAM,IAAI,IAAI,EAAE;gBACnB,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;aAC3C;iBAAM;gBACN,+CAA+C;gBAC/C,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;aACpD;YAED,SAAS;YACT,KAAK,CAAC,MAAM,EAAE,CAAC;SACf;KACD;AACF,CAAC,CAAC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DDiagramSerializedItem } from \"../../d-diagram-serialized\";\nimport { EShape } from \"../e-shape\";\nimport { EShapeConnectorBodies } from \"../e-shape-connector-bodies\";\nimport { EShapeDeserializer } from \"../e-shape-deserializer\";\nimport { EShapeResourceManagerDeserialization } from \"../e-shape-resource-manager-deserialization\";\nimport { EShapeUuidMapping } from \"../e-shape-uuid-mapping\";\nimport { EShapeConnectorLine } from \"./e-shape-connector-line\";\n\nexport const deserializeConnectorLine = (\n\titem: DDiagramSerializedItem,\n\tmanager: EShapeResourceManagerDeserialization\n): Promise<EShapeConnectorLine> | EShapeConnectorLine | null => {\n\treturn EShapeDeserializer.deserialize(item, manager, new EShapeConnectorLine());\n};\n\nexport const onConnectorLineDeserialized = (\n\titem: DDiagramSerializedItem,\n\tshape: EShape,\n\tmapping: EShapeUuidMapping,\n\tmanager: EShapeResourceManagerDeserialization\n): void => {\n\tif (shape instanceof EShapeConnectorLine) {\n\t\tconst resources = manager.resources;\n\t\tconst resourceId = item[15];\n\t\tif (0 <= resourceId && resourceId < resources.length) {\n\t\t\tlet parsed = manager.getExtension<[number, number, number?]>(resourceId);\n\t\t\tif (parsed == null) {\n\t\t\t\tparsed = JSON.parse(resources[resourceId]) as [number, number, number?];\n\t\t\t\tmanager.setExtension(resourceId, parsed);\n\n\t\t\t}\n\n\t\t\t// Lock\n\t\t\tshape.lock();\n\n\t\t\t// Points\n\t\t\tconst points = shape.points;\n\t\t\tpoints.deserialize(parsed[1], manager);\n\n\t\t\t// Edge\n\t\t\tshape.edge.deserialize(parsed[0], mapping, manager);\n\n\t\t\t// Body\n\t\t\tconst body = shape.body;\n\t\t\tconst bodyId = parsed[2];\n\t\t\tif (bodyId != null) {\n\t\t\t\tbody.deserialize(bodyId, mapping, manager);\n\t\t\t} else {\n\t\t\t\t// The following is for backward compatibility.\n\t\t\t\tbody.set(EShapeConnectorBodies.from(points.values));\n\t\t\t}\n\n\t\t\t// Unlock\n\t\t\tshape.unlock();\n\t\t}\n\t}\n};\n"]}
|