@wcardinal/wcardinal-ui 0.318.0 → 0.320.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.
@@ -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(acceptorShape?: EShape | null, acceptorEdge?: string | null, acceptorX?: number, acceptorY?: number, margin?: number, x?: number, y?: number, nx?: number, ny?: number): this;
37
+ set(acceptorShape?: EShape | null, acceptorEdge?: string | null, acceptorX?: number | null, acceptorY?: number | null, 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;
@@ -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,G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B,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
+ {"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,MA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AG,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 | 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\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"]}
@@ -104,7 +104,7 @@ var EShapeRuntimeImpl = /** @class */ (function () {
104
104
  }
105
105
  var state = shape.state;
106
106
  if (!state.isDown) {
107
- if (state.isPressed) {
107
+ if (!state.isPressed) {
108
108
  // State
109
109
  state.addAll(EShapeState.DOWN, DBaseState.PRESSED);
110
110
  // Focus
@@ -123,7 +123,7 @@ var EShapeRuntimeImpl = /** @class */ (function () {
123
123
  }
124
124
  else {
125
125
  // State
126
- state.isDown = false;
126
+ state.isDown = true;
127
127
  // Focus
128
128
  var layer = DApplications.getLayer(shape);
129
129
  if (layer) {
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-runtime-impl.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ChB,WAAW,CAAC,EAAE;QACd,WAAW,CAAC,UAAU;QAEtB,WAAW,CAAC,aAAa;QACzB,WAAW,CAAC,UAAU;QACtB,WAAW,CAAC,QAAQ;QACpB,WAAW,CAAC,gBAAgB;QAE5B,WAAW,CAAC,SAAS;QACrB,WAAW,CAAC,WAAW;KACvB,CAAC;IA4eH,wBAAC;CAAA,AA3fD,IA2fC;SA3fY,iBAAiB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Renderer } from \"pixi.js\";\nimport InteractionEvent = interaction.InteractionEvent;\nimport InteractionManager = interaction.InteractionManager;\nimport { DApplications } from \"../d-applications\";\nimport { UtilKeyboardEvent } from \"../util/util-keyboard-event\";\nimport { EShapeActionRuntime } from \"./action/e-shape-action-runtime\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeFillLike } from \"./e-shape-fill\";\nimport { EShapeState } from \"./e-shape-state\";\nimport { EShapeStrokeLike } from \"./e-shape-stroke\";\nimport { EShapeTextLike } from \"./e-shape-text\";\nimport { DBaseState } from \"../d-base-state\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeRuntimeReset } from \"./e-shape-runtime-reset\";\n\nexport class EShapeRuntimeImpl implements EShapeRuntime {\n\tstatic readonly TRANSIENT_STATES = [\n\t\tEShapeState.CLICKED,\n\t\tEShapeState.DBL_CLICKED,\n\t\tEShapeState.DOWN,\n\t\tEShapeState.UP,\n\t\tEShapeState.UP_OUTSIDE,\n\n\t\tEShapeState.RIGHT_CLICKED,\n\t\tEShapeState.RIGHT_DOWN,\n\t\tEShapeState.RIGHT_UP,\n\t\tEShapeState.RIGHT_UP_OUTSIDE,\n\n\t\tEShapeState.ACTIVATED,\n\t\tEShapeState.DEACTIVATED\n\t];\n\n\treadonly x: number;\n\treadonly y: number;\n\treadonly sizeX: number;\n\treadonly sizeY: number;\n\treadonly rotation: number;\n\treadonly actions: EShapeActionRuntime[];\n\treadonly fill: EShapeFillLike;\n\treadonly stroke: EShapeStrokeLike;\n\treadonly text: EShapeTextLike;\n\treadonly cursor?: string;\n\treadonly interactive: boolean;\n\n\treset: EShapeRuntimeReset;\n\twritten: EShapeRuntimeReset;\n\teffect: number;\n\tisStateChanged: boolean;\n\n\tconstructor(shape: EShape) {\n\t\tconst transform = shape.transform;\n\t\tconst position = transform.position;\n\t\tthis.x = position.x;\n\t\tthis.y = position.y;\n\t\tconst size = shape.size;\n\t\tthis.sizeX = size.x;\n\t\tthis.sizeY = size.y;\n\t\tthis.rotation = transform.rotation;\n\t\tthis.actions = [];\n\t\tthis.fill = shape.fill.toObject();\n\t\tthis.stroke = shape.stroke.toObject();\n\t\tthis.text = shape.text.toObject();\n\t\tthis.cursor = shape.cursor;\n\t\tthis.reset = EShapeRuntimeReset.NONE;\n\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\tthis.effect = NaN;\n\t\tthis.isStateChanged = false;\n\t\tthis.interactive = false;\n\t}\n\n\tinitialize(shape: EShape): void {\n\t\tshape.disallowUploadedUpdate();\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].initialize(shape, this);\n\t\t}\n\t\tshape.allowUploadedUpdate();\n\t}\n\n\tisActionable(): boolean {\n\t\treturn 0 < this.actions.length;\n\t}\n\n\tonResize(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onResize(shape, this);\n\t\t}\n\t}\n\n\tonClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onClick(shape, this, e);\n\t\t}\n\t}\n\n\tonDblClick(\n\t\tshape: EShape,\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isDblClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDblClick(shape, this, e, interactionManager);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonOver(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isHovered) {\n\t\t\t// State\n\t\t\tstate.isHovered = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOver(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonOut(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isHovered) {\n\t\t\t// State\n\t\t\tshape.state.isHovered = false;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOut(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonDown(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isDown) {\n\t\t\tif (state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.DOWN, DBaseState.PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onDown(shape, this, e);\n\t\t\t\t\taction.onPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isDown = false;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUp(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isUp) {\n\t\t\tif (state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.UP, DBaseState.PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onUp(shape, this, e);\n\t\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.UP_OUTSIDE, DBaseState.PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onUpOutside(shape, this, e);\n\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonMove(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onMove(shape, this, e);\n\t\t}\n\t}\n\n\tonKeyDown(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onDown(shape, e);\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyDown(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonKeyUp(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tconst state = shape.state;\n\t\t\tif (state.isPressed) {\n\t\t\t\tconst wasUp = state.isUp;\n\t\t\t\tthis.onUp(shape, e);\n\t\t\t\tif (!wasUp && state.isUp) {\n\t\t\t\t\tthis.onClick(shape, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyUp(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonStateChange(shape: EShape, newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tthis.isStateChanged = true;\n\t\tDApplications.update(shape);\n\n\t\tif (newState.isFocused) {\n\t\t\tif (!oldState.isFocused) {\n\t\t\t\tthis.onFocus(shape);\n\t\t\t}\n\t\t} else if (oldState.isFocused) {\n\t\t\tthis.onBlur(shape);\n\t\t}\n\t}\n\n\tonFocus(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onFocus(shape, this);\n\t\t}\n\t}\n\n\tonBlur(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onBlur(shape, this);\n\t\t}\n\t}\n\n\tonRightClick(shape: EShape, e: InteractionEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isRightClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightClick(shape, this, e);\n\t\t}\n\t}\n\n\tonRightDown(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isRightDown) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.RIGHT_DOWN, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightDown(shape, this, e);\n\t\t\t\t\taction.onRightPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightDown = false;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUp(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isRightUp) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.RIGHT_UP, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightUp(shape, this, e);\n\t\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isRightPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.RIGHT_UP_OUTSIDE, EShapeState.RIGHT_PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onRightUpOutside(shape, this, e);\n\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isRightUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onRightUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(shape: EShape, time: number): void {\n\t\tconst data = shape.data;\n\t\tconst isEffectTimeUp = this.effect <= time;\n\t\tif (data.isChanged || this.isStateChanged || isEffectTimeUp) {\n\t\t\tthis.isStateChanged = false;\n\t\t\tdata.isChanged = false;\n\t\t\tif (isEffectTimeUp) {\n\t\t\t\tthis.effect = NaN;\n\t\t\t}\n\t\t\tshape.disallowUploadedUpdate();\n\t\t\tthis.onUpdate(shape, time);\n\t\t\tshape.allowUploadedUpdate();\n\t\t\tconst wasStateChanged = this.isStateChanged;\n\t\t\tshape.state.removeAll(EShapeRuntimeImpl.TRANSIENT_STATES);\n\t\t\tthis.isStateChanged = wasStateChanged;\n\t\t}\n\t}\n\n\tonRender(shape: EShape, time: number, renderer: Renderer): void {\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRender(shape, this, time, renderer);\n\t\t}\n\t\tthis.update(shape, time);\n\t}\n\n\tprotected onUpdate(shape: EShape, time: number): void {\n\t\tconst actions = this.actions;\n\t\tif (0 < actions.length) {\n\t\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].execute(shape, this, time);\n\t\t\t}\n\t\t\tthis.doReset(shape);\n\t\t}\n\t}\n\n\tprotected doReset(shape: EShape): void {\n\t\tconst target = ~this.written & this.reset;\n\t\tif (target !== EShapeRuntimeReset.NONE) {\n\t\t\tif (target & EShapeRuntimeReset.POSITION_X) {\n\t\t\t\tshape.transform.position.x = this.x;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.POSITION_Y) {\n\t\t\t\tshape.transform.position.y = this.y;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.VISIBILITY) {\n\t\t\t\tshape.visible = true;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_FILL) {\n\t\t\t\tconst fill = this.fill;\n\t\t\t\tshape.fill.set(undefined, fill.color, fill.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_STROKE) {\n\t\t\t\tconst stroke = this.stroke;\n\t\t\t\tshape.stroke.set(undefined, stroke.color, stroke.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT) {\n\t\t\t\tconst text = this.text;\n\t\t\t\tshape.text.set(undefined, text.color, text.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT_OUTLINE) {\n\t\t\t\tconst outline = this.text.outline;\n\t\t\t\tshape.text.outline.set(undefined, outline.color, outline.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.HEIGHT) {\n\t\t\t\tshape.size.y = this.sizeY;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.WIDTH) {\n\t\t\t\tshape.size.x = this.sizeX;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.ROTATION) {\n\t\t\t\tshape.transform.rotation = this.rotation;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.TEXT) {\n\t\t\t\tshape.text.value = this.text.value;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.CURSOR) {\n\t\t\t\tshape.cursor = this.cursor;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-shape-runtime-impl.js","sourceRoot":"","sources":["../../../../src/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AE;QACd,WAAW,CAAC,UAAU;QAEtB,WAAW,CAAC,aAAa;QACzB,WAAW,CAAC,UAAU;QACtB,WAAW,CAAC,QAAQ;QACpB,WAAW,CAAC,gBAAgB;QAE5B,WAAW,CAAC,SAAS;QACrB,WAAW,CAAC,WAAW;KACvB,CAAC;IA4eH,wBAAC;CAAA,AA3fD,IA2fC;SA3fY,iBAAiB","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { interaction, Renderer } from \"pixi.js\";\nimport InteractionEvent = interaction.InteractionEvent;\nimport InteractionManager = interaction.InteractionManager;\nimport { DApplications } from \"../d-applications\";\nimport { UtilKeyboardEvent } from \"../util/util-keyboard-event\";\nimport { EShapeActionRuntime } from \"./action/e-shape-action-runtime\";\nimport { EShape } from \"./e-shape\";\nimport { EShapeFillLike } from \"./e-shape-fill\";\nimport { EShapeState } from \"./e-shape-state\";\nimport { EShapeStrokeLike } from \"./e-shape-stroke\";\nimport { EShapeTextLike } from \"./e-shape-text\";\nimport { DBaseState } from \"../d-base-state\";\nimport { DBaseStateSet } from \"../d-base-state-set\";\nimport { EShapeRuntime } from \"./e-shape-runtime\";\nimport { EShapeRuntimeReset } from \"./e-shape-runtime-reset\";\n\nexport class EShapeRuntimeImpl implements EShapeRuntime {\n\tstatic readonly TRANSIENT_STATES = [\n\t\tEShapeState.CLICKED,\n\t\tEShapeState.DBL_CLICKED,\n\t\tEShapeState.DOWN,\n\t\tEShapeState.UP,\n\t\tEShapeState.UP_OUTSIDE,\n\n\t\tEShapeState.RIGHT_CLICKED,\n\t\tEShapeState.RIGHT_DOWN,\n\t\tEShapeState.RIGHT_UP,\n\t\tEShapeState.RIGHT_UP_OUTSIDE,\n\n\t\tEShapeState.ACTIVATED,\n\t\tEShapeState.DEACTIVATED\n\t];\n\n\treadonly x: number;\n\treadonly y: number;\n\treadonly sizeX: number;\n\treadonly sizeY: number;\n\treadonly rotation: number;\n\treadonly actions: EShapeActionRuntime[];\n\treadonly fill: EShapeFillLike;\n\treadonly stroke: EShapeStrokeLike;\n\treadonly text: EShapeTextLike;\n\treadonly cursor?: string;\n\treadonly interactive: boolean;\n\n\treset: EShapeRuntimeReset;\n\twritten: EShapeRuntimeReset;\n\teffect: number;\n\tisStateChanged: boolean;\n\n\tconstructor(shape: EShape) {\n\t\tconst transform = shape.transform;\n\t\tconst position = transform.position;\n\t\tthis.x = position.x;\n\t\tthis.y = position.y;\n\t\tconst size = shape.size;\n\t\tthis.sizeX = size.x;\n\t\tthis.sizeY = size.y;\n\t\tthis.rotation = transform.rotation;\n\t\tthis.actions = [];\n\t\tthis.fill = shape.fill.toObject();\n\t\tthis.stroke = shape.stroke.toObject();\n\t\tthis.text = shape.text.toObject();\n\t\tthis.cursor = shape.cursor;\n\t\tthis.reset = EShapeRuntimeReset.NONE;\n\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\tthis.effect = NaN;\n\t\tthis.isStateChanged = false;\n\t\tthis.interactive = false;\n\t}\n\n\tinitialize(shape: EShape): void {\n\t\tshape.disallowUploadedUpdate();\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].initialize(shape, this);\n\t\t}\n\t\tshape.allowUploadedUpdate();\n\t}\n\n\tisActionable(): boolean {\n\t\treturn 0 < this.actions.length;\n\t}\n\n\tonResize(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onResize(shape, this);\n\t\t}\n\t}\n\n\tonClick(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onClick(shape, this, e);\n\t\t}\n\t}\n\n\tonDblClick(\n\t\tshape: EShape,\n\t\te: MouseEvent | TouchEvent,\n\t\tinteractionManager: InteractionManager\n\t): boolean {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isDblClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDblClick(shape, this, e, interactionManager);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonOver(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isHovered) {\n\t\t\t// State\n\t\t\tstate.isHovered = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOver(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonOut(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isHovered) {\n\t\t\t// State\n\t\t\tshape.state.isHovered = false;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onOut(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonDown(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isDown) {\n\t\t\tif (!state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.DOWN, DBaseState.PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onDown(shape, this, e);\n\t\t\t\t\taction.onPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isDown = true;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUp(shape: EShape, e: InteractionEvent | KeyboardEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isUp) {\n\t\t\tif (state.isPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.UP, DBaseState.PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onUp(shape, this, e);\n\t\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.UP_OUTSIDE, DBaseState.PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onUpOutside(shape, this, e);\n\t\t\t\taction.onUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tonMove(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onMove(shape, this, e);\n\t\t}\n\t}\n\n\tonKeyDown(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tthis.onDown(shape, e);\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyDown(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonKeyUp(shape: EShape, e: KeyboardEvent): boolean {\n\t\t// State\n\t\tif (UtilKeyboardEvent.isActivateKey(e)) {\n\t\t\tconst state = shape.state;\n\t\t\tif (state.isPressed) {\n\t\t\t\tconst wasUp = state.isUp;\n\t\t\t\tthis.onUp(shape, e);\n\t\t\t\tif (!wasUp && state.isUp) {\n\t\t\t\t\tthis.onClick(shape, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onKeyUp(shape, this, e);\n\t\t}\n\n\t\t// Done\n\t\treturn false;\n\t}\n\n\tonStateChange(shape: EShape, newState: DBaseStateSet, oldState: DBaseStateSet): void {\n\t\tthis.isStateChanged = true;\n\t\tDApplications.update(shape);\n\n\t\tif (newState.isFocused) {\n\t\t\tif (!oldState.isFocused) {\n\t\t\t\tthis.onFocus(shape);\n\t\t\t}\n\t\t} else if (oldState.isFocused) {\n\t\t\tthis.onBlur(shape);\n\t\t}\n\t}\n\n\tonFocus(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onFocus(shape, this);\n\t\t}\n\t}\n\n\tonBlur(shape: EShape): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onBlur(shape, this);\n\t\t}\n\t}\n\n\tonRightClick(shape: EShape, e: InteractionEvent): void {\n\t\t// State\n\t\tconst state = shape.state;\n\t\tif (state.isActionable) {\n\t\t\tstate.isRightClicked = true;\n\t\t}\n\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightClick(shape, this, e);\n\t\t}\n\t}\n\n\tonRightDown(shape: EShape, e: InteractionEvent): void {\n\t\t// Actions\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRightDowning(shape, this, e);\n\t\t}\n\n\t\tconst state = shape.state;\n\t\tif (!state.isRightDown) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.addAll(EShapeState.RIGHT_DOWN, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\t// Focus\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightDown(shape, this, e);\n\t\t\t\t\taction.onRightPressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightDown = false;\n\n\t\t\t\t// Focus\n\t\t\t\tconst layer = DApplications.getLayer(shape);\n\t\t\t\tif (layer) {\n\t\t\t\t\tconst focusController = layer.getFocusController();\n\t\t\t\t\tfocusController.focus(focusController.findParent(shape));\n\t\t\t\t}\n\n\t\t\t\t// Actions\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightDown(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUp(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (!state.isRightUp) {\n\t\t\tif (state.isRightPressed) {\n\t\t\t\t// State\n\t\t\t\tstate.set(EShapeState.RIGHT_UP, EShapeState.RIGHT_PRESSED);\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tconst action = actions[i];\n\t\t\t\t\taction.onRightUp(shape, this, e);\n\t\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// State\n\t\t\t\tstate.isRightUp = true;\n\n\t\t\t\t// Actions\n\t\t\t\tconst actions = this.actions;\n\t\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\t\tactions[i].onRightUp(shape, this, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tonRightUpOutside(shape: EShape, e: InteractionEvent): void {\n\t\tconst state = shape.state;\n\t\tif (state.isRightPressed) {\n\t\t\t// State\n\t\t\tstate.set(EShapeState.RIGHT_UP_OUTSIDE, EShapeState.RIGHT_PRESSED);\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tconst action = actions[i];\n\t\t\t\taction.onRightUpOutside(shape, this, e);\n\t\t\t\taction.onRightUnpressed(shape, this, e);\n\t\t\t}\n\t\t} else {\n\t\t\t// State\n\t\t\tstate.isRightUpOutside = true;\n\n\t\t\t// Actions\n\t\t\tconst actions = this.actions;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].onRightUpOutside(shape, this, e);\n\t\t\t}\n\t\t}\n\t}\n\n\tupdate(shape: EShape, time: number): void {\n\t\tconst data = shape.data;\n\t\tconst isEffectTimeUp = this.effect <= time;\n\t\tif (data.isChanged || this.isStateChanged || isEffectTimeUp) {\n\t\t\tthis.isStateChanged = false;\n\t\t\tdata.isChanged = false;\n\t\t\tif (isEffectTimeUp) {\n\t\t\t\tthis.effect = NaN;\n\t\t\t}\n\t\t\tshape.disallowUploadedUpdate();\n\t\t\tthis.onUpdate(shape, time);\n\t\t\tshape.allowUploadedUpdate();\n\t\t\tconst wasStateChanged = this.isStateChanged;\n\t\t\tshape.state.removeAll(EShapeRuntimeImpl.TRANSIENT_STATES);\n\t\t\tthis.isStateChanged = wasStateChanged;\n\t\t}\n\t}\n\n\tonRender(shape: EShape, time: number, renderer: Renderer): void {\n\t\tconst actions = this.actions;\n\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\tactions[i].onRender(shape, this, time, renderer);\n\t\t}\n\t\tthis.update(shape, time);\n\t}\n\n\tprotected onUpdate(shape: EShape, time: number): void {\n\t\tconst actions = this.actions;\n\t\tif (0 < actions.length) {\n\t\t\tthis.written = EShapeRuntimeReset.NONE;\n\t\t\tfor (let i = 0, imax = actions.length; i < imax; ++i) {\n\t\t\t\tactions[i].execute(shape, this, time);\n\t\t\t}\n\t\t\tthis.doReset(shape);\n\t\t}\n\t}\n\n\tprotected doReset(shape: EShape): void {\n\t\tconst target = ~this.written & this.reset;\n\t\tif (target !== EShapeRuntimeReset.NONE) {\n\t\t\tif (target & EShapeRuntimeReset.POSITION_X) {\n\t\t\t\tshape.transform.position.x = this.x;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.POSITION_Y) {\n\t\t\t\tshape.transform.position.y = this.y;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.VISIBILITY) {\n\t\t\t\tshape.visible = true;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_FILL) {\n\t\t\t\tconst fill = this.fill;\n\t\t\t\tshape.fill.set(undefined, fill.color, fill.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_STROKE) {\n\t\t\t\tconst stroke = this.stroke;\n\t\t\t\tshape.stroke.set(undefined, stroke.color, stroke.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT) {\n\t\t\t\tconst text = this.text;\n\t\t\t\tshape.text.set(undefined, text.color, text.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.COLOR_TEXT_OUTLINE) {\n\t\t\t\tconst outline = this.text.outline;\n\t\t\t\tshape.text.outline.set(undefined, outline.color, outline.alpha);\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.HEIGHT) {\n\t\t\t\tshape.size.y = this.sizeY;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.WIDTH) {\n\t\t\t\tshape.size.x = this.sizeX;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.ROTATION) {\n\t\t\t\tshape.transform.rotation = this.rotation;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.TEXT) {\n\t\t\t\tshape.text.value = this.text.value;\n\t\t\t}\n\t\t\tif (target & EShapeRuntimeReset.CURSOR) {\n\t\t\t\tshape.cursor = this.cursor;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.318.0
2
+ Winter Cardinal UI v0.320.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.318.0
2
+ Winter Cardinal UI v0.320.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.318.0
2
+ Winter Cardinal UI v0.320.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.318.0
2
+ Winter Cardinal UI v0.320.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.318.0
2
+ Winter Cardinal UI v0.320.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -23869,7 +23869,7 @@ var EShapeRuntimeImpl = /** @class */ (function () {
23869
23869
  }
23870
23870
  var state = shape.state;
23871
23871
  if (!state.isDown) {
23872
- if (state.isPressed) {
23872
+ if (!state.isPressed) {
23873
23873
  // State
23874
23874
  state.addAll(EShapeState.DOWN, DBaseState.PRESSED);
23875
23875
  // Focus
@@ -23888,7 +23888,7 @@ var EShapeRuntimeImpl = /** @class */ (function () {
23888
23888
  }
23889
23889
  else {
23890
23890
  // State
23891
- state.isDown = false;
23891
+ state.isDown = true;
23892
23892
  // Focus
23893
23893
  var layer = DApplications.getLayer(shape);
23894
23894
  if (layer) {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.318.0
2
+ Winter Cardinal UI v0.320.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -23866,7 +23866,7 @@
23866
23866
  }
23867
23867
  var state = shape.state;
23868
23868
  if (!state.isDown) {
23869
- if (state.isPressed) {
23869
+ if (!state.isPressed) {
23870
23870
  // State
23871
23871
  state.addAll(EShapeState.DOWN, DBaseState.PRESSED);
23872
23872
  // Focus
@@ -23885,7 +23885,7 @@
23885
23885
  }
23886
23886
  else {
23887
23887
  // State
23888
- state.isDown = false;
23888
+ state.isDown = true;
23889
23889
  // Focus
23890
23890
  var layer = DApplications.getLayer(shape);
23891
23891
  if (layer) {