@wcardinal/wcardinal-ui 0.346.0 → 0.348.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.346.0
2
+ Winter Cardinal UI v0.348.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -17725,9 +17725,9 @@
17725
17725
  var clt = child.transform.localTransform;
17726
17726
  result.set(child.id, {
17727
17727
  type: child.subtype,
17728
- x: this.toEedgePosition(lpx, clt.tx, sxh, sx),
17729
- y: this.toEedgePosition(lpy, clt.ty, syh, sy),
17730
- normal: this.toEedgeNormal(clt.c, clt.d),
17728
+ x: this.toEdgePosition(lpx, clt.tx, sxh, sx),
17729
+ y: this.toEdgePosition(lpy, clt.ty, syh, sy),
17730
+ normal: this.toEdgeNormal(-clt.c, -clt.d),
17731
17731
  size: {
17732
17732
  x: 0,
17733
17733
  y: 0
@@ -17740,13 +17740,13 @@
17740
17740
  }
17741
17741
  return result;
17742
17742
  };
17743
- EShapeEmbedded.prototype.toEedgePosition = function (lp, cp, sh, s) {
17743
+ EShapeEmbedded.prototype.toEdgePosition = function (lp, cp, sh, s) {
17744
17744
  if (0.00001 < Math.abs(s)) {
17745
17745
  return (lp + cp - sh) / s;
17746
17746
  }
17747
17747
  return 0;
17748
17748
  };
17749
- EShapeEmbedded.prototype.toEedgeNormal = function (x, y) {
17749
+ EShapeEmbedded.prototype.toEdgeNormal = function (x, y) {
17750
17750
  var d = x * x + y * y;
17751
17751
  if (0.00001 < d) {
17752
17752
  var f = 1 / d;
@@ -17757,7 +17757,7 @@
17757
17757
  }
17758
17758
  return {
17759
17759
  x: 0,
17760
- y: 1
17760
+ y: -1
17761
17761
  };
17762
17762
  };
17763
17763
  EShapeEmbedded.prototype.isGroupSizeFittable = function () {
@@ -38264,18 +38264,18 @@
38264
38264
  // y = -x => 0 = x + y
38265
38265
  if (0 <= x - y) {
38266
38266
  if (0 <= x + y) {
38267
- return EShapeAcceptorEdgeSide.RIGHT;
38267
+ return 1;
38268
38268
  }
38269
38269
  else {
38270
- return EShapeAcceptorEdgeSide.BOTTOM;
38270
+ return 0;
38271
38271
  }
38272
38272
  }
38273
38273
  else {
38274
38274
  if (0 <= x + y) {
38275
- return EShapeAcceptorEdgeSide.TOP;
38275
+ return 2;
38276
38276
  }
38277
38277
  else {
38278
- return EShapeAcceptorEdgeSide.LEFT;
38278
+ return 3;
38279
38279
  }
38280
38280
  }
38281
38281
  };
@@ -38304,40 +38304,32 @@
38304
38304
  }
38305
38305
  var d = null;
38306
38306
  var result = 0;
38307
- // 0 := (0, -1)
38308
- // | ny, -nx | 0 |
38309
- // | nx, ny | -1 |
38310
- if (side & this.toSide(nx, -ny)) {
38311
- if (d == null || d < -dy) {
38312
- d = -dy;
38313
- result = 0;
38314
- }
38315
- }
38316
- // 1 := (1, 0)
38317
- // | ny, -nx | 1 |
38318
- // | nx, ny | 0 |
38319
- if (side & this.toSide(ny, nx)) {
38320
- if (d == null || d < dx) {
38321
- d = dx;
38322
- result = 1;
38323
- }
38324
- }
38325
- // 2 := (0, 1)
38326
- // | ny, -nx | 0 |
38327
- // | nx, ny | 1 |
38328
- if (side & this.toSide(-nx, ny)) {
38329
- if (d == null || d < dy) {
38330
- d = dy;
38331
- result = 2;
38332
- }
38333
- }
38334
- // 3 := (-1, 0)
38335
- // | ny, -nx | -1 |
38336
- // | nx, ny | 0 |
38337
- if (side & this.toSide(-ny, -nx)) {
38338
- if (d == null || d < -dx) {
38339
- d = -dx;
38340
- result = 3;
38307
+ var d0 = nx * dx + ny * dy;
38308
+ var d1 = -ny * dx + nx * dy;
38309
+ var d2 = -d0;
38310
+ var d3 = -d1;
38311
+ if (side & EShapeAcceptorEdgeSide.TOP) {
38312
+ if (d == null || d < d0) {
38313
+ d = d0;
38314
+ result = this.toSide(nx, ny);
38315
+ }
38316
+ }
38317
+ if (side & EShapeAcceptorEdgeSide.RIGHT) {
38318
+ if (d == null || d < d1) {
38319
+ d = d1;
38320
+ result = this.toSide(-ny, nx);
38321
+ }
38322
+ }
38323
+ if (side & EShapeAcceptorEdgeSide.BOTTOM) {
38324
+ if (d == null || d < d2) {
38325
+ d = d2;
38326
+ result = this.toSide(-nx, -ny);
38327
+ }
38328
+ }
38329
+ if (side & EShapeAcceptorEdgeSide.LEFT) {
38330
+ if (d == null || d < d3) {
38331
+ d = d3;
38332
+ result = this.toSide(ny, -nx);
38341
38333
  }
38342
38334
  }
38343
38335
  return result;
@@ -76102,6 +76094,7 @@
76102
76094
  EShapeConnectorElbow: EShapeConnectorElbow,
76103
76095
  EShapeConnectorLine: EShapeConnectorLine,
76104
76096
  EShapeEmbeddedAcceptorEdge: EShapeEmbeddedAcceptorEdge,
76097
+ EShapeEmbeddedAcceptor: EShapeEmbeddedAcceptor,
76105
76098
  EShapeEmbeddedDatum: EShapeEmbeddedDatum,
76106
76099
  EShapeEmbeddedLayerContainer: EShapeEmbeddedLayerContainer,
76107
76100
  EShapeEmbeddedLayer: EShapeEmbeddedLayer,