@wcardinal/wcardinal-ui 0.316.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.
@@ -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(shape?: EShape | null, edge?: string | null, margin?: number, x?: number, y?: number, nx?: number, ny?: number): this;
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(shape?: EShape | null, edge?: string | null, margin?: number, x?: number, y?: number, nx?: number, ny?: number): this;
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;
@@ -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;IAKC,yCAAY,MAA6C;QACxD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,sBAAI,kDAAK;aAAT;YACC,OAAO,IAAI,CAAC,MAAM,CAAC;QACpB,CAAC;aAED,UAAU,KAAoB;YAC7B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;;;OAJA;IAMD,sBAAI,iDAAI;aAAR;YACC,OAAO,IAAI,CAAC,KAAK,CAAC;QACnB,CAAC;aAED,UAAS,IAAmB;YAC3B,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC3B,CAAC;;;OAJA;IAMD,8CAAI,GAAJ,UAAK,MAAmC;QACvC,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAC5C,CAAC;IAED,6CAAG,GAAH,UAAI,KAAqB,EAAE,IAAoB;QAC9C,IAAI,SAAS,GAAG,KAAK,CAAC;QAEtB,IAAI,KAAK,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,EAAE;YACjD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;YACpB,SAAS,GAAG,IAAI,CAAC;SACjB;QAED,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,KAAK,KAAK,IAAI,EAAE;YAC9C,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;YAClB,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,AAlDD,IAkDC","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\n\tconstructor(parent: EShapeConnectorEdgeAcceptorImplParent) {\n\t\tthis._parent = parent;\n\t\tthis._shape = null;\n\t\tthis._edge = 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\tcopy(source: EShapeConnectorEdgeAcceptor): this {\n\t\treturn this.set(source.shape, source.edge);\n\t}\n\n\tset(shape?: EShape | null, edge?: string | 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 (isChanged) {\n\t\t\tthis._parent.onAcceptorChange();\n\t\t}\n\n\t\treturn this;\n\t}\n}\n"]}
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,CAAC;QACpB,CAAC;aAED,UAAU,KAAoB;YAC7B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;;;OAJA;IAMD,sBAAI,iDAAI;aAAR;YACC,OAAO,IAAI,CAAC,KAAK,CAAC;QACnB,CAAC;aAED,UAAS,IAAmB;YAC3B,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QAC3B,CAAC;;;OAJA;IAMD,sBAAI,8CAAC;aAAL;YACC,OAAO,IAAI,CAAC,EAAE,CAAC;QAChB,CAAC;aAED,UAAM,CAAgB;YACrB,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,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C;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 (shape, edge, margin, x, y, nx, ny) {
128
+ EShapeConnectorEdgeImpl.prototype.set = function (acceptorShape, acceptorEdge, acceptorX, acceptorY, margin, x, y, nx, ny) {
129
129
  this.lock();
130
- this._acceptor.set(shape, edge);
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":["../../../../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,CAAC,SAAS,GAAG,IAAI,+BAA+B,CAAC,IAAI,CAAC,CAAC;QAE3D,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC;YACjC,KAAI,CAAC,aAAa,EAAE,CAAC;QACtB,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,eAAe,CAAC;YAClC,KAAI,CAAC,cAAc,EAAE,CAAC;QACvB,CAAC,EAAE,S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import { 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,CAAC,SAAS,GAAG,IAAI,+BAA+B,CAAC,IAAI,CAAC,CAAC;QAE3D,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC;YACjC,KAAI,CAAC,aAAa,EAAE,CAAC;QACtB,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;QAElB,IAAI,CAAC,OAAO,GAAG,IAAI,eAAe,CAAC;YAClC,KAAI,CAAC,cAAc,EAAE,CAAC;QACvB,CAAC,EAAE,SAAS,CAAC,CAAC;QACd,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,SAAS,GAAG,CAAC,CAAC;QAEnB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QAEjB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,IAAI,CAAC,gBAAgB,GAAG,KAAK,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;IAC9B,CAAC;IAED,sCAAI,GAAJ;QACC,IAAI,C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AE;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;YAC5B,OAAO;SACP;QACD,IAAI,CAAC,gBAAgB,IAAI,CAAC,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,gBAAgB,CAAC;QACtC,IAAI,CAAC,SAAS,EAAE,CAAC;IAClB,CAAC;IAES,gDAAc,GAAxB;QACC,IAAI,CAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YACxB,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC;YAC7B,OAAO;SACP;QACD,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC;QAC5B,IAAI,CAAC,SAAS,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,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\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\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"]}
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"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.316.0
2
+ Winter Cardinal UI v0.317.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.316.0
2
+ Winter Cardinal UI v0.317.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.316.0
2
+ Winter Cardinal UI v0.317.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.316.0
2
+ Winter Cardinal UI v0.317.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.316.0
2
+ Winter Cardinal UI v0.317.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -17755,6 +17755,8 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
17755
17755
  this._parent = parent;
17756
17756
  this._shape = null;
17757
17757
  this._edge = null;
17758
+ this._x = null;
17759
+ this._y = null;
17758
17760
  }
17759
17761
  Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "shape", {
17760
17762
  get: function () {
@@ -17776,10 +17778,30 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
17776
17778
  enumerable: false,
17777
17779
  configurable: true
17778
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
+ });
17779
17801
  EShapeConnectorEdgeAcceptorImpl.prototype.copy = function (source) {
17780
- return this.set(source.shape, source.edge);
17802
+ return this.set(source.shape, source.edge, source.x, source.y);
17781
17803
  };
17782
- EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge) {
17804
+ EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge, x, y) {
17783
17805
  var isChanged = false;
17784
17806
  if (shape !== undefined && this._shape !== shape) {
17785
17807
  this._shape = shape;
@@ -17789,6 +17811,14 @@ var EShapeConnectorEdgeAcceptorImpl = /** @class */ (function () {
17789
17811
  this._edge = edge;
17790
17812
  isChanged = true;
17791
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
+ }
17792
17822
  if (isChanged) {
17793
17823
  this._parent.onAcceptorChange();
17794
17824
  }
@@ -17921,9 +17951,9 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
17921
17951
  enumerable: false,
17922
17952
  configurable: true
17923
17953
  });
17924
- EShapeConnectorEdgeImpl.prototype.set = function (shape, edge, margin, x, y, nx, ny) {
17954
+ EShapeConnectorEdgeImpl.prototype.set = function (acceptorShape, acceptorEdge, acceptorX, acceptorY, margin, x, y, nx, ny) {
17925
17955
  this.lock();
17926
- this._acceptor.set(shape, edge);
17956
+ this._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);
17927
17957
  var local = this._local;
17928
17958
  if (x != null && y != null) {
17929
17959
  local.set(x, y);
@@ -17967,9 +17997,10 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
17967
17997
  var edgeId = edge != null ? manager.addResource(edge) : -1;
17968
17998
  var local = this._local;
17969
17999
  var normal = this._normal;
17970
- 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, "]"));
17971
18001
  };
17972
18002
  EShapeConnectorEdgeImpl.prototype.deserialize = function (resourceId, mapping, manager) {
18003
+ var _a, _b;
17973
18004
  var resources = manager.resources;
17974
18005
  if (0 <= resourceId && resourceId < resources.length) {
17975
18006
  var parsed = manager.getExtension(resourceId);
@@ -17987,6 +18018,8 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
17987
18018
  acceptor.shape = shape;
17988
18019
  var edgeId = parsed[1];
17989
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;
17990
18023
  this._local.set(parsed[2], parsed[3]);
17991
18024
  var normalX = parsed[5];
17992
18025
  var normalY = parsed[6];
@@ -18013,6 +18046,7 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
18013
18046
  return this;
18014
18047
  };
18015
18048
  EShapeConnectorEdgeImpl.prototype.doFit = function () {
18049
+ var _a, _b;
18016
18050
  var localIdRequired = this._localIdRequired;
18017
18051
  var isLocalDirty = this._localId !== localIdRequired;
18018
18052
  var normalIdRequired = this._normalIdRequired;
@@ -18037,8 +18071,8 @@ var EShapeConnectorEdgeImpl = /** @class */ (function () {
18037
18071
  if (isLocalDirty) {
18038
18072
  var size = acceptorShape.size;
18039
18073
  var pivot = acceptorShape.transform.pivot;
18040
- var lx = pivot.x + size.x * edge.x;
18041
- 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);
18042
18076
  this._local.set(a * lx + c * ly + tx, b * lx + d * ly + ty);
18043
18077
  }
18044
18078
  if (isNormalDirty) {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.316.0
2
+ Winter Cardinal UI v0.317.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -17752,6 +17752,8 @@
17752
17752
  this._parent = parent;
17753
17753
  this._shape = null;
17754
17754
  this._edge = null;
17755
+ this._x = null;
17756
+ this._y = null;
17755
17757
  }
17756
17758
  Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "shape", {
17757
17759
  get: function () {
@@ -17773,10 +17775,30 @@
17773
17775
  enumerable: false,
17774
17776
  configurable: true
17775
17777
  });
17778
+ Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "x", {
17779
+ get: function () {
17780
+ return this._x;
17781
+ },
17782
+ set: function (x) {
17783
+ this.set(undefined, undefined, x);
17784
+ },
17785
+ enumerable: false,
17786
+ configurable: true
17787
+ });
17788
+ Object.defineProperty(EShapeConnectorEdgeAcceptorImpl.prototype, "y", {
17789
+ get: function () {
17790
+ return this._y;
17791
+ },
17792
+ set: function (y) {
17793
+ this.set(undefined, undefined, undefined, y);
17794
+ },
17795
+ enumerable: false,
17796
+ configurable: true
17797
+ });
17776
17798
  EShapeConnectorEdgeAcceptorImpl.prototype.copy = function (source) {
17777
- return this.set(source.shape, source.edge);
17799
+ return this.set(source.shape, source.edge, source.x, source.y);
17778
17800
  };
17779
- EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge) {
17801
+ EShapeConnectorEdgeAcceptorImpl.prototype.set = function (shape, edge, x, y) {
17780
17802
  var isChanged = false;
17781
17803
  if (shape !== undefined && this._shape !== shape) {
17782
17804
  this._shape = shape;
@@ -17786,6 +17808,14 @@
17786
17808
  this._edge = edge;
17787
17809
  isChanged = true;
17788
17810
  }
17811
+ if (x !== undefined && this._x !== x) {
17812
+ this._x = x;
17813
+ isChanged = true;
17814
+ }
17815
+ if (y !== undefined && this._y !== y) {
17816
+ this._y = y;
17817
+ isChanged = true;
17818
+ }
17789
17819
  if (isChanged) {
17790
17820
  this._parent.onAcceptorChange();
17791
17821
  }
@@ -17918,9 +17948,9 @@
17918
17948
  enumerable: false,
17919
17949
  configurable: true
17920
17950
  });
17921
- EShapeConnectorEdgeImpl.prototype.set = function (shape, edge, margin, x, y, nx, ny) {
17951
+ EShapeConnectorEdgeImpl.prototype.set = function (acceptorShape, acceptorEdge, acceptorX, acceptorY, margin, x, y, nx, ny) {
17922
17952
  this.lock();
17923
- this._acceptor.set(shape, edge);
17953
+ this._acceptor.set(acceptorShape, acceptorEdge, acceptorX, acceptorY);
17924
17954
  var local = this._local;
17925
17955
  if (x != null && y != null) {
17926
17956
  local.set(x, y);
@@ -17964,9 +17994,10 @@
17964
17994
  var edgeId = edge != null ? manager.addResource(edge) : -1;
17965
17995
  var local = this._local;
17966
17996
  var normal = this._normal;
17967
- return manager.addResource("[".concat(shapeUuid, ",").concat(edgeId, ",").concat(local.x, ",").concat(local.y, ",").concat(this._margin, ",").concat(normal.x, ",").concat(normal.y, "]"));
17997
+ 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, "]"));
17968
17998
  };
17969
17999
  EShapeConnectorEdgeImpl.prototype.deserialize = function (resourceId, mapping, manager) {
18000
+ var _a, _b;
17970
18001
  var resources = manager.resources;
17971
18002
  if (0 <= resourceId && resourceId < resources.length) {
17972
18003
  var parsed = manager.getExtension(resourceId);
@@ -17984,6 +18015,8 @@
17984
18015
  acceptor.shape = shape;
17985
18016
  var edgeId = parsed[1];
17986
18017
  acceptor.edge = 0 <= edgeId && edgeId < resources.length ? resources[edgeId] : null;
18018
+ acceptor.x = (_a = parsed[7]) !== null && _a !== void 0 ? _a : null;
18019
+ acceptor.y = (_b = parsed[8]) !== null && _b !== void 0 ? _b : null;
17987
18020
  this._local.set(parsed[2], parsed[3]);
17988
18021
  var normalX = parsed[5];
17989
18022
  var normalY = parsed[6];
@@ -18010,6 +18043,7 @@
18010
18043
  return this;
18011
18044
  };
18012
18045
  EShapeConnectorEdgeImpl.prototype.doFit = function () {
18046
+ var _a, _b;
18013
18047
  var localIdRequired = this._localIdRequired;
18014
18048
  var isLocalDirty = this._localId !== localIdRequired;
18015
18049
  var normalIdRequired = this._normalIdRequired;
@@ -18034,8 +18068,8 @@
18034
18068
  if (isLocalDirty) {
18035
18069
  var size = acceptorShape.size;
18036
18070
  var pivot = acceptorShape.transform.pivot;
18037
- var lx = pivot.x + size.x * edge.x;
18038
- var ly = pivot.y + size.y * edge.y;
18071
+ var lx = pivot.x + size.x * ((_a = acceptor.x) !== null && _a !== void 0 ? _a : edge.x);
18072
+ var ly = pivot.y + size.y * ((_b = acceptor.y) !== null && _b !== void 0 ? _b : edge.y);
18039
18073
  this._local.set(a * lx + c * ly + tx, b * lx + d * ly + ty);
18040
18074
  }
18041
18075
  if (isNormalDirty) {