@wcardinal/wcardinal-ui 0.316.0 → 0.318.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.316.0
2
+ Winter Cardinal UI v0.318.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) {
@@ -35409,6 +35443,14 @@
35409
35443
  enumerable: false,
35410
35444
  configurable: true
35411
35445
  });
35446
+ EShapeButton.prototype.copy = function (source, part) {
35447
+ _super.prototype.copy.call(this, source, part);
35448
+ if (source instanceof EShapeButton) {
35449
+ this._isToggle = source.isToggle;
35450
+ this._isGrouped = source.isGrouped;
35451
+ }
35452
+ return this;
35453
+ };
35412
35454
  EShapeButton.prototype.clone = function () {
35413
35455
  return new EShapeButton(this.type).copy(this);
35414
35456
  };