@wcardinal/wcardinal-ui 0.456.0 → 0.457.1

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.456.0
2
+ Winter Cardinal UI v0.457.1
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -12172,30 +12172,36 @@
12172
12172
  configurable: true
12173
12173
  });
12174
12174
  EShapeEmbedded.prototype.newEdges = function () {
12175
+ var _a, _b;
12175
12176
  var result = new Map();
12176
12177
  var layers = this.children;
12177
12178
  if (layers != null) {
12178
12179
  var s = this.size;
12179
12180
  var sx = s.x;
12180
12181
  var sy = s.y;
12181
- var sxh = sx * 0.5;
12182
- var syh = sy * 0.5;
12182
+ var work1 = void 0;
12183
+ var work2 = void 0;
12183
12184
  for (var i = 0, imax = layers.length; i < imax; ++i) {
12184
12185
  var layer = layers[i];
12185
- var lp = layer.transform.position;
12186
- var lpx = lp.x + sxh;
12187
- var lpy = lp.y + syh;
12188
12186
  var children = layer.children;
12189
12187
  for (var j = 0, jmax = children.length; j < jmax; ++j) {
12190
12188
  var child = children[j];
12191
12189
  if (child instanceof EShapeEmbeddedAcceptorEdge) {
12192
- child.transform.updateLocalTransform();
12193
- var clt = child.transform.localTransform;
12190
+ child.updateTransform();
12191
+ if (work1 == null) {
12192
+ work1 = ((_a = EShapeEmbedded.WORK_NEW_EDGE1) !== null && _a !== void 0 ? _a : (EShapeEmbedded.WORK_NEW_EDGE1 = new pixi_js.Matrix()))
12193
+ .copyFrom(this.transform.internalTransform)
12194
+ .invert();
12195
+ }
12196
+ if (work2 == null) {
12197
+ work2 = (_b = EShapeEmbedded.WORK_NEW_EDGE2) !== null && _b !== void 0 ? _b : (EShapeEmbedded.WORK_NEW_EDGE2 = new pixi_js.Matrix());
12198
+ }
12199
+ work2.copyFrom(work1).append(child.transform.internalTransform);
12194
12200
  result.set(child.id, {
12195
12201
  type: child.subtype,
12196
- x: this.toEdgePosition(lpx, clt.tx, sxh, sx),
12197
- y: this.toEdgePosition(lpy, clt.ty, syh, sy),
12198
- normal: this.toEdgeNormal(-clt.c, -clt.d),
12202
+ x: this.toEdgePosition(work2.tx, sx),
12203
+ y: this.toEdgePosition(work2.ty, sy),
12204
+ normal: this.toEdgeNormal(-work2.c, -work2.d),
12199
12205
  size: {
12200
12206
  x: 0,
12201
12207
  y: 0
@@ -12208,16 +12214,16 @@
12208
12214
  }
12209
12215
  return result;
12210
12216
  };
12211
- EShapeEmbedded.prototype.toEdgePosition = function (lp, cp, sh, s) {
12217
+ EShapeEmbedded.prototype.toEdgePosition = function (cp, s) {
12212
12218
  if (0.00001 < Math.abs(s)) {
12213
- return (lp + cp - sh) / s;
12219
+ return cp / s;
12214
12220
  }
12215
12221
  return 0;
12216
12222
  };
12217
12223
  EShapeEmbedded.prototype.toEdgeNormal = function (x, y) {
12218
12224
  var d = x * x + y * y;
12219
12225
  if (0.00001 < d) {
12220
- var f = 1 / d;
12226
+ var f = 1 / Math.sqrt(d);
12221
12227
  return {
12222
12228
  x: x * f,
12223
12229
  y: y * f
@@ -13404,8 +13410,12 @@
13404
13410
  this.onFillChange();
13405
13411
  };
13406
13412
  EShapePointsMarkerBase.prototype.copy = function (source) {
13413
+ this.lock();
13414
+ this.type = source.type;
13407
13415
  var size = source.size;
13408
- this.set(source.type, size.x, size.y);
13416
+ this.size.set(size.x, size.y);
13417
+ this.fill.copy(source.fill);
13418
+ this.unlock();
13409
13419
  return this;
13410
13420
  };
13411
13421
  EShapePointsMarkerBase.prototype.set = function (type, sizeX, sizeY) {
@@ -16819,6 +16829,7 @@
16819
16829
  clone.parent = result;
16820
16830
  result.children.push(clone);
16821
16831
  }
16832
+ EShapeConnectors.move(this, result);
16822
16833
  result.onChildTransformChange();
16823
16834
  result.toDirty();
16824
16835
  var size = this.size;
@@ -44742,7 +44753,7 @@
44742
44753
  clone.parent = result;
44743
44754
  result.children.push(clone);
44744
44755
  }
44745
- EShapeConnectors.moveAll(children, result.children, children, result.children);
44756
+ EShapeConnectors.move(this, result);
44746
44757
  result.onChildTransformChange();
44747
44758
  result.toDirty();
44748
44759
  return result;