@wcardinal/wcardinal-ui 0.315.0 → 0.316.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.
@@ -6,6 +6,7 @@ export declare class EShapeAcceptorImpl implements EShapeAcceptor {
6
6
  constructor();
7
7
  add(id: string, type: EShapeAcceptorType, x: number, y: number): boolean;
8
8
  add(id: string, type: EShapeAcceptorType, x: number, y: number, nx: number, ny: number): boolean;
9
+ add(id: string, type: EShapeAcceptorType, x: number, y: number, nx: number, ny: number, sx: number, sy: number): boolean;
9
10
  protected toNormal(x: number, y: number, nx?: number, ny?: number): EShapeAcceptorEdgeNormal;
10
11
  remove(id: string): EShapeAcceptorEdge | null;
11
12
  size(): number;
@@ -4,11 +4,16 @@ export interface EShapeAcceptorEdgeNormal {
4
4
  x: number;
5
5
  y: number;
6
6
  }
7
+ export interface EShapeAcceptorEdgeSize {
8
+ x: number;
9
+ y: number;
10
+ }
7
11
  export interface EShapeAcceptorEdge {
8
12
  type: EShapeAcceptorType;
9
13
  x: number;
10
14
  y: number;
11
15
  normal: EShapeAcceptorEdgeNormal;
16
+ size: EShapeAcceptorEdgeSize;
12
17
  }
13
18
  export interface EShapeAcceptor {
14
19
  get(shape: EShape, id: string): EShapeAcceptorEdge | null;
@@ -6,12 +6,16 @@ var EShapeAcceptorImpl = /** @class */ (function () {
6
6
  function EShapeAcceptorImpl() {
7
7
  this._edges = new Map();
8
8
  }
9
- EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny) {
9
+ EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy) {
10
10
  this._edges.set(id, {
11
11
  type: type,
12
12
  x: x,
13
13
  y: y,
14
- normal: this.toNormal(x, y, nx, ny)
14
+ normal: this.toNormal(x, y, nx, ny),
15
+ size: {
16
+ x: sx !== null && sx !== void 0 ? sx : 0,
17
+ y: sy !== null && sy !== void 0 ? sy : 0
18
+ }
15
19
  });
16
20
  return true;
17
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-acceptor-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;IAGC;QACC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;IACrD,CAAC;IAWD,gCAAG,GAAH,UACC,EAAU,EACV,IAAwB,EACxB,CAAS,EACT,CAAS,EACT,EAAW,EACX,EAAW;QAEX,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;YACnB,IAAI,MAAA;YACJ,CAAC,GAAA;YACD,CAAC,GAAA;YACD,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC;SACnC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACb,CAAC;IAES,qCAAQ,GAAlB,UAAmB,CAAS,EAAE,CAAS,EAAE,EAAW,EAAE,EAAW;QAChE,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,EAAE;YAC7B,OAAO;gBACN,CAAC,EAAE,EAAE;gBACL,CAAC,EAAE,EAAE;aACL,CAAC;SACF;aAAM;YACN,IAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,OAAO,GAAG,CAAC,EAAE;gBAChB,IAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAC3B,OAAO;oBACN,CAAC,EAAE,CAAC,GAAG,CAAC;oBACR,CAAC,EAAE,CAAC,GAAG,CAAC;iBACR,CAAC;aACF;iBAAM;gBACN,OAAO;oBACN,CAAC,EAAE,CAAC;oBACJ,CAAC,EAAE,CAAC;iBACJ,CAAC;aACF;SACD;IACF,CAAC;IAED,mCAAM,GAAN,UAAO,EAAU;QAChB,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAM,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC7B,IAAI,MAAM,IAAI,IAAI,EAAE;YACnB,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YACjB,OAAO,MAAM,CAAC;SACd;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,iCAAI,GAAJ;QACC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IACzB,CAAC;IAED,gCAAG,GAAH,UAAI,KAAa,EAAE,EAAU;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;IACpC,CAAC;IAED,iCAAI,GAAJ,UAAK,KAAa,EAAE,QAAwD;QAC3E,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;QAC9B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,qCAAQ,GAAR,UAAS,EAAU;QAClB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAC5B,CAAC;IAED,kCAAK,GAAL;QACC,IAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;QAC1B,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE;YACnB,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,OAAO,IAAI,CAAC;SACZ;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACF,yBAAC;AAAD,CAAC,AA3FD,IA2FC","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptor, EShapeAcceptorEdge, EShapeAcceptorEdgeNormal } from \"./e-shape-acceptor\";\nimport { EShapeAcceptorType } from \"./e-shape-acceptor-type\";\n\nexport class EShapeAcceptorImpl implements EShapeAcceptor {\n\tprotected _edges: Map<string, EShapeAcceptorEdge>;\n\n\tconstructor() {\n\t\tthis._edges = new Map<string, EShapeAcceptorEdge>();\n\t}\n\n\tadd(id: string, type: EShapeAcceptorType, x: number, y: number): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx: number,\n\t\tny: number\n\t): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx?: number,\n\t\tny?: number\n\t): boolean {\n\t\tthis._edges.set(id, {\n\t\t\ttype,\n\t\t\tx,\n\t\t\ty,\n\t\t\tnormal: this.toNormal(x, y, nx, ny)\n\t\t});\n\t\treturn true;\n\t}\n\n\tprotected toNormal(x: number, y: number, nx?: number, ny?: number): EShapeAcceptorEdgeNormal {\n\t\tif (nx != null && ny != null) {\n\t\t\treturn {\n\t\t\t\tx: nx,\n\t\t\t\ty: ny\n\t\t\t};\n\t\t} else {\n\t\t\tconst d = x * x + y * y;\n\t\t\tif (0.00001 < d) {\n\t\t\t\tconst m = 1 / Math.sqrt(d);\n\t\t\t\treturn {\n\t\t\t\t\tx: x * m,\n\t\t\t\t\ty: y * m\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\tremove(id: string): EShapeAcceptorEdge | null {\n\t\tconst edges = this._edges;\n\t\tconst result = edges.get(id);\n\t\tif (result != null) {\n\t\t\tedges.delete(id);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tsize(): number {\n\t\treturn this._edges.size;\n\t}\n\n\tget(shape: EShape, id: string): EShapeAcceptorEdge | null {\n\t\treturn this._edges.get(id) || null;\n\t}\n\n\teach(shape: EShape, iteratee: (edge: EShapeAcceptorEdge, id: string) => void): this {\n\t\tthis._edges.forEach(iteratee);\n\t\treturn this;\n\t}\n\n\tcontains(id: string): boolean {\n\t\treturn this._edges.has(id);\n\t}\n\n\tclear(): boolean {\n\t\tconst edges = this._edges;\n\t\tif (0 < edges.size) {\n\t\t\tedges.clear();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-shape-acceptor-impl.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-acceptor-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;IAGC;QACC,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAA8B,CAAC;IACrD,CAAC;IAqBD,gCAAG,GAAH,UACC,EAAU,EACV,IAAwB,EACxB,CAAS,EACT,CAAS,EACT,EAAW,EACX,EAAW,EACX,EAAW,EACX,EAAW;QAEX,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;YACnB,IAAI,MAAA;YACJ,CAAC,GAAA;YACD,CAAC,GAAA;YACD,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC;YACnC,IAAI,EAAE;gBACL,CAAC,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC;gBACV,CAAC,EAAE,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC;aACV;SACD,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IACb,CAAC;IAES,qCAAQ,GAAlB,UAAmB,CAAS,EAAE,CAAS,EAAE,EAAW,EAAE,EAAW;QAChE,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,IAAI,IAAI,EAAE;YAC7B,OAAO;gBACN,CAAC,EAAE,EAAE;gBACL,CAAC,EAAE,EAAE;aACL,CAAC;SACF;aAAM;YACN,IAAM,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,OAAO,GAAG,CAAC,EAAE;gBAChB,IAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,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/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { EShape } from \"./e-shape\";\nimport { EShapeAcceptor, EShapeAcceptorEdge, EShapeAcceptorEdgeNormal } from \"./e-shape-acceptor\";\nimport { EShapeAcceptorType } from \"./e-shape-acceptor-type\";\n\nexport class EShapeAcceptorImpl implements EShapeAcceptor {\n\tprotected _edges: Map<string, EShapeAcceptorEdge>;\n\n\tconstructor() {\n\t\tthis._edges = new Map<string, EShapeAcceptorEdge>();\n\t}\n\n\tadd(id: string, type: EShapeAcceptorType, x: number, y: number): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx: number,\n\t\tny: number\n\t): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx: number,\n\t\tny: number,\n\t\tsx: number,\n\t\tsy: number\n\t): boolean;\n\tadd(\n\t\tid: string,\n\t\ttype: EShapeAcceptorType,\n\t\tx: number,\n\t\ty: number,\n\t\tnx?: number,\n\t\tny?: number,\n\t\tsx?: number,\n\t\tsy?: number\n\t): boolean {\n\t\tthis._edges.set(id, {\n\t\t\ttype,\n\t\t\tx,\n\t\t\ty,\n\t\t\tnormal: this.toNormal(x, y, nx, ny),\n\t\t\tsize: {\n\t\t\t\tx: sx ?? 0,\n\t\t\t\ty: sy ?? 0\n\t\t\t}\n\t\t});\n\t\treturn true;\n\t}\n\n\tprotected toNormal(x: number, y: number, nx?: number, ny?: number): EShapeAcceptorEdgeNormal {\n\t\tif (nx != null && ny != null) {\n\t\t\treturn {\n\t\t\t\tx: nx,\n\t\t\t\ty: ny\n\t\t\t};\n\t\t} else {\n\t\t\tconst d = x * x + y * y;\n\t\t\tif (0.00001 < d) {\n\t\t\t\tconst m = 1 / Math.sqrt(d);\n\t\t\t\treturn {\n\t\t\t\t\tx: x * m,\n\t\t\t\t\ty: y * m\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\treturn {\n\t\t\t\t\tx: 0,\n\t\t\t\t\ty: 0\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\n\tremove(id: string): EShapeAcceptorEdge | null {\n\t\tconst edges = this._edges;\n\t\tconst result = edges.get(id);\n\t\tif (result != null) {\n\t\t\tedges.delete(id);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tsize(): number {\n\t\treturn this._edges.size;\n\t}\n\n\tget(shape: EShape, id: string): EShapeAcceptorEdge | null {\n\t\treturn this._edges.get(id) || null;\n\t}\n\n\teach(shape: EShape, iteratee: (edge: EShapeAcceptorEdge, id: string) => void): this {\n\t\tthis._edges.forEach(iteratee);\n\t\treturn this;\n\t}\n\n\tcontains(id: string): boolean {\n\t\treturn this._edges.has(id);\n\t}\n\n\tclear(): boolean {\n\t\tconst edges = this._edges;\n\t\tif (0 < edges.size) {\n\t\t\tedges.clear();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"e-shape-acceptor.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-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\";\nimport { EShapeAcceptorType } from \"./e-shape-acceptor-type\";\n\nexport interface EShapeAcceptorEdgeNormal {\n\tx: number;\n\ty: number;\n}\n\nexport interface EShapeAcceptorEdge {\n\ttype: EShapeAcceptorType;\n\tx: number;\n\ty: number;\n\tnormal: EShapeAcceptorEdgeNormal;\n}\n\nexport interface EShapeAcceptor {\n\tget(shape: EShape, id: string): EShapeAcceptorEdge | null;\n\teach(shape: EShape, iteratee: (edge: EShapeAcceptorEdge, id: string) => void): this;\n}\n"]}
1
+ {"version":3,"file":"e-shape-acceptor.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/shape/e-shape-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\";\nimport { EShapeAcceptorType } from \"./e-shape-acceptor-type\";\n\nexport interface EShapeAcceptorEdgeNormal {\n\tx: number;\n\ty: number;\n}\n\nexport interface EShapeAcceptorEdgeSize {\n\tx: number;\n\ty: number;\n}\n\nexport interface EShapeAcceptorEdge {\n\ttype: EShapeAcceptorType;\n\tx: number;\n\ty: number;\n\tnormal: EShapeAcceptorEdgeNormal;\n\tsize: EShapeAcceptorEdgeSize;\n}\n\nexport interface EShapeAcceptor {\n\tget(shape: EShape, id: string): EShapeAcceptorEdge | null;\n\teach(shape: EShape, iteratee: (edge: EShapeAcceptorEdge, id: string) => void): this;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.315.0
2
+ Winter Cardinal UI v0.316.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.315.0
2
+ Winter Cardinal UI v0.316.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.315.0
2
+ Winter Cardinal UI v0.316.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.315.0
2
+ Winter Cardinal UI v0.316.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.315.0
2
+ Winter Cardinal UI v0.316.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -17622,12 +17622,16 @@ var EShapeAcceptorImpl = /** @class */ (function () {
17622
17622
  function EShapeAcceptorImpl() {
17623
17623
  this._edges = new Map();
17624
17624
  }
17625
- EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny) {
17625
+ EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy) {
17626
17626
  this._edges.set(id, {
17627
17627
  type: type,
17628
17628
  x: x,
17629
17629
  y: y,
17630
- normal: this.toNormal(x, y, nx, ny)
17630
+ normal: this.toNormal(x, y, nx, ny),
17631
+ size: {
17632
+ x: sx !== null && sx !== void 0 ? sx : 0,
17633
+ y: sy !== null && sy !== void 0 ? sy : 0
17634
+ }
17631
17635
  });
17632
17636
  return true;
17633
17637
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.315.0
2
+ Winter Cardinal UI v0.316.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -17619,12 +17619,16 @@
17619
17619
  function EShapeAcceptorImpl() {
17620
17620
  this._edges = new Map();
17621
17621
  }
17622
- EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny) {
17622
+ EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy) {
17623
17623
  this._edges.set(id, {
17624
17624
  type: type,
17625
17625
  x: x,
17626
17626
  y: y,
17627
- normal: this.toNormal(x, y, nx, ny)
17627
+ normal: this.toNormal(x, y, nx, ny),
17628
+ size: {
17629
+ x: sx !== null && sx !== void 0 ? sx : 0,
17630
+ y: sy !== null && sy !== void 0 ? sy : 0
17631
+ }
17628
17632
  });
17629
17633
  return true;
17630
17634
  };