@wcardinal/wcardinal-ui 0.267.0 → 0.269.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,4 +1,4 @@
1
- import { NineSlicePlane, Texture } from "pixi.js";
1
+ import { NineSlicePlane, Renderer, Texture } from "pixi.js";
2
2
  import { DBase } from "./d-base";
3
3
  import { DShadow } from "./d-shadow";
4
4
  export declare class DShadowImpl extends NineSlicePlane implements DShadow {
@@ -9,4 +9,5 @@ export declare class DShadowImpl extends NineSlicePlane implements DShadow {
9
9
  constructor(texture: Texture, width: number, height: number, offsetX: number, offsetY: number);
10
10
  protected onTextureUpdate(): void;
11
11
  onReflow(base: DBase, width: number, height: number): void;
12
+ render(renderer: Renderer): void;
12
13
  }
@@ -13,8 +13,11 @@ export interface EThemeSnapperGrid {
13
13
  }
14
14
  export declare class ESnapperGrid extends utils.EventEmitter {
15
15
  protected _isEnabled: boolean;
16
+ protected _isEnabledDefault: boolean;
16
17
  protected _size: number;
18
+ protected _sizeDefault: number;
17
19
  protected _isVisible: boolean;
20
+ protected _isVisibleDefault: boolean;
18
21
  constructor(theme: EThemeSnapperGrid, options?: ESnapperGridOptions);
19
22
  get visible(): boolean;
20
23
  set visible(visible: boolean);
@@ -13,7 +13,9 @@ export interface EThemeSnapperTarget {
13
13
  export declare class ESnapperTarget extends utils.EventEmitter {
14
14
  values: ESnapperTargetValue[];
15
15
  protected _isVisible: boolean;
16
+ protected _isVisibleDefault: boolean;
16
17
  protected _isEnabled: boolean;
18
+ protected _isEnabledDefault: boolean;
17
19
  constructor(theme: EThemeSnapperTarget, options?: ESnapperTargetOptions);
18
20
  get enable(): boolean;
19
21
  set enable(enable: boolean);
@@ -53,6 +53,7 @@ export declare class ESnapper extends utils.EventEmitter {
53
53
  protected _workSnapResultY: ESnapperResult;
54
54
  protected _parent: ESnapperParent;
55
55
  protected _isEnabled: boolean;
56
+ protected _isEnabledDefault: boolean;
56
57
  grid: ESnapperGrid;
57
58
  target: ESnapperTarget;
58
59
  constructor(parent: ESnapperParent, theme: EThemeSnapper, options?: ESnapperOptions);
@@ -30,6 +30,14 @@ var DShadowImpl = /** @class */ (function (_super) {
30
30
  this.width = sx + width + sx;
31
31
  this.height = sy + height + sy;
32
32
  };
33
+ DShadowImpl.prototype.render = function (renderer) {
34
+ var parent = this.parent;
35
+ if (parent) {
36
+ var alpha = parent.alpha;
37
+ this.alpha = alpha * alpha * alpha;
38
+ }
39
+ _super.prototype.render.call(this, renderer);
40
+ };
33
41
  return DShadowImpl;
34
42
  }(NineSlicePlane));
35
43
  export { DShadowImpl };
@@ -1 +1 @@
1
- {"version":3,"file":"d-shadow-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-shadow-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,cAAc,EAAW,MAAM,SAAS,CAAC;AAIlD;IAAiC,+BAAc;IAM9C,qBAAY,OAAgB,EAAE,KAAa,EAAE,MAAc,EAAE,OAAe,EAAE,OAAe;QAA7F,YACC,kBAAM,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,SAa5C;QAXA,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,KAAI,CAAC,OAAO,GAAG,KAAK,GAAG,GAAG,CAAC;QAC3B,KAAI,CAAC,OAAO,GAAG,MAAM,GAAG,GAAG,CAAC;QAE5B,KAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,KAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QAEjC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE;YACpB,KAAI,CAAC,eAAe,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;;IACJ,CAAC;IAES,qCAAe,GAAzB;QACC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,8BAAQ,GAAR,UAAS,IAAW,EAAE,KAAa,EAAE,MAAc;QAClD,IAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,EAAE,GAAG,KAAK,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,MAAM,GAAG,EAAE,CAAC;IAChC,CAAC;IACF,kBAAC;AAAD,CAAC,AAlCD,CAAiC,cAAc,GAkC9C","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { NineSlicePlane, Texture } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DShadow } from \"./d-shadow\";\n\nexport class DShadowImpl extends NineSlicePlane implements DShadow {\n\tprotected _offsetX: number;\n\tprotected _offsetY: number;\n\tprotected _shiftX: number;\n\tprotected _shiftY: number;\n\n\tconstructor(texture: Texture, width: number, height: number, offsetX: number, offsetY: number) {\n\t\tsuper(texture, width, height, width, height);\n\n\t\tthis._offsetX = offsetX;\n\t\tthis._offsetY = offsetY;\n\t\tthis._shiftX = width * 0.5;\n\t\tthis._shiftY = height * 0.5;\n\n\t\tthis.interactive = false;\n\t\tthis.interactiveChildren = false;\n\n\t\ttexture.on(\"update\", (): void => {\n\t\t\tthis.onTextureUpdate();\n\t\t});\n\t}\n\n\tprotected onTextureUpdate(): void {\n\t\tthis.emit(\"update\", this);\n\t}\n\n\tonReflow(base: DBase, width: number, height: number): void {\n\t\tconst sx = this._shiftX;\n\t\tconst sy = this._shiftY;\n\t\tthis.x = -sx + this._offsetX;\n\t\tthis.y = -sy + this._offsetY;\n\t\tthis.width = sx + width + sx;\n\t\tthis.height = sy + height + sy;\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-shadow-impl.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-shadow-impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,cAAc,EAAqB,MAAM,SAAS,CAAC;AAI5D;IAAiC,+BAAc;IAM9C,qBAAY,OAAgB,EAAE,KAAa,EAAE,MAAc,EAAE,OAAe,EAAE,OAAe;QAA7F,YACC,kBAAM,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,SAa5C;QAXA,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,KAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,KAAI,CAAC,OAAO,GAAG,KAAK,GAAG,GAAG,CAAC;QAC3B,KAAI,CAAC,OAAO,GAAG,MAAM,GAAG,GAAG,CAAC;QAE5B,KAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,KAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC;QAEjC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE;YACpB,KAAI,CAAC,eAAe,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;;IACJ,CAAC;IAES,qCAAe,GAAzB;QACC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,8BAAQ,GAAR,UAAS,IAAW,EAAE,KAAa,EAAE,MAAc;QAClD,IAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxB,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,EAAE,GAAG,KAAK,GAAG,EAAE,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,EAAE,GAAG,MAAM,GAAG,EAAE,CAAC;IAChC,CAAC;IAED,4BAAM,GAAN,UAAO,QAAkB;QACxB,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAI,MAAM,EAAE;YACX,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;YAC3B,IAAI,CAAC,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;SACnC;QACD,iBAAM,MAAM,YAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IACF,kBAAC;AAAD,CAAC,AA3CD,CAAiC,cAAc,GA2C9C","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { NineSlicePlane, Renderer, Texture } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DShadow } from \"./d-shadow\";\n\nexport class DShadowImpl extends NineSlicePlane implements DShadow {\n\tprotected _offsetX: number;\n\tprotected _offsetY: number;\n\tprotected _shiftX: number;\n\tprotected _shiftY: number;\n\n\tconstructor(texture: Texture, width: number, height: number, offsetX: number, offsetY: number) {\n\t\tsuper(texture, width, height, width, height);\n\n\t\tthis._offsetX = offsetX;\n\t\tthis._offsetY = offsetY;\n\t\tthis._shiftX = width * 0.5;\n\t\tthis._shiftY = height * 0.5;\n\n\t\tthis.interactive = false;\n\t\tthis.interactiveChildren = false;\n\n\t\ttexture.on(\"update\", (): void => {\n\t\t\tthis.onTextureUpdate();\n\t\t});\n\t}\n\n\tprotected onTextureUpdate(): void {\n\t\tthis.emit(\"update\", this);\n\t}\n\n\tonReflow(base: DBase, width: number, height: number): void {\n\t\tconst sx = this._shiftX;\n\t\tconst sy = this._shiftY;\n\t\tthis.x = -sx + this._offsetX;\n\t\tthis.y = -sy + this._offsetY;\n\t\tthis.width = sx + width + sx;\n\t\tthis.height = sy + height + sy;\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tconst parent = this.parent;\n\t\tif (parent) {\n\t\t\tconst alpha = parent.alpha;\n\t\t\tthis.alpha = alpha * alpha * alpha;\n\t\t}\n\t\tsuper.render(renderer);\n\t}\n}\n"]}
@@ -10,9 +10,12 @@ var ESnapperGrid = /** @class */ (function (_super) {
10
10
  var _this = this;
11
11
  var _a, _b, _c;
12
12
  _this = _super.call(this) || this;
13
- _this._isVisible = (_a = options === null || options === void 0 ? void 0 : options.visible) !== null && _a !== void 0 ? _a : theme.isSnapperGridVisible();
14
- _this._isEnabled = (_b = options === null || options === void 0 ? void 0 : options.enable) !== null && _b !== void 0 ? _b : theme.isSnapperGridEnabled();
15
- _this._size = (_c = options === null || options === void 0 ? void 0 : options.size) !== null && _c !== void 0 ? _c : theme.getSnapperGridSize();
13
+ _this._isVisibleDefault = (_a = options === null || options === void 0 ? void 0 : options.visible) !== null && _a !== void 0 ? _a : theme.isSnapperGridVisible();
14
+ _this._isVisible = _this._isVisibleDefault;
15
+ _this._isEnabledDefault = (_b = options === null || options === void 0 ? void 0 : options.enable) !== null && _b !== void 0 ? _b : theme.isSnapperGridEnabled();
16
+ _this._isEnabled = _this._isEnabledDefault;
17
+ _this._sizeDefault = (_c = options === null || options === void 0 ? void 0 : options.size) !== null && _c !== void 0 ? _c : theme.getSnapperGridSize();
18
+ _this._size = _this._sizeDefault;
16
19
  return _this;
17
20
  }
18
21
  Object.defineProperty(ESnapperGrid.prototype, "visible", {
@@ -61,8 +64,9 @@ var ESnapperGrid = /** @class */ (function (_super) {
61
64
  }
62
65
  };
63
66
  ESnapperGrid.prototype.reset = function () {
64
- this._isEnabled = true;
65
- this._size = 10;
67
+ this._isVisible = this._isVisibleDefault;
68
+ this._isEnabled = this._isEnabledDefault;
69
+ this._size = this._sizeDefault;
66
70
  this.emit("change", this);
67
71
  };
68
72
  ESnapperGrid.prototype.serialize = function () {
@@ -1 +1 @@
1
- {"version":3,"file":"e-snapper-grid.js","sourceRoot":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IACF,CAAC;IACF,mBAAC;AAAD,CAAC,AAxED,CAAkC,KAAK,CAAC,YAAY,GAwEnD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { utils } from \"pixi.js\";\nimport { DDiagramSerializedSnapGrid } from \"../d-diagram-serialized\";\nimport { ESnapperResult } from \"./e-snapper-result\";\n\nexport interface ESnapperGridOptions {\n\tvisible?: boolean;\n\tenable?: boolean;\n\tsize?: number;\n}\nexport interface EThemeSnapperGrid {\n\tisSnapperGridVisible(): boolean;\n\tisSnapperGridEnabled(): boolean;\n\tgetSnapperGridSize(): number;\n}\n\nexport class ESnapperGrid extends utils.EventEmitter {\n\tprotected _isEnabled: boolean;\n\tprotected _size: number;\n\tprotected _isVisible: boolean;\n\n\tconstructor(theme: EThemeSnapperGrid, options?: ESnapperGridOptions) {\n\t\tsuper();\n\t\tthis._isVisible = options?.visible ?? theme.isSnapperGridVisible();\n\t\tthis._isEnabled = options?.enable ?? theme.isSnapperGridEnabled();\n\t\tthis._size = options?.size ?? theme.getSnapperGridSize();\n\t}\n\n\tget visible(): boolean {\n\t\treturn this._isVisible;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tif (this._isVisible !== visible) {\n\t\t\tthis._isVisible = visible;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget enable(): boolean {\n\t\treturn this._isEnabled;\n\t}\n\n\tset enable(enable: boolean) {\n\t\tif (this._isEnabled !== enable) {\n\t\t\tthis._isEnabled = enable;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget size(): number {\n\t\treturn this._size;\n\t}\n\n\tset size(size: number) {\n\t\tif (this._size !== size) {\n\t\t\tthis._size = size;\n\t\t\tthis.emit(\"change\", size, this);\n\t\t}\n\t}\n\n\tsnap(value: number, result: ESnapperResult): void {\n\t\tif (this._isEnabled) {\n\t\t\tconst size = this._size;\n\t\t\tresult.set(value, Math.round(value / size) * size);\n\t\t}\n\t}\n\n\treset(): void {\n\t\tthis._isEnabled = true;\n\t\tthis._size = 10;\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tserialize(): DDiagramSerializedSnapGrid {\n\t\treturn [this._isEnabled ? 1 : 0, this._isVisible ? 1 : 0, this._size];\n\t}\n\n\tdeserialize(serialized: DDiagramSerializedSnapGrid): void {\n\t\tthis.enable = !!serialized[0];\n\t\tif (2 in serialized) {\n\t\t\tthis.visible = !!serialized[1];\n\t\t\tthis.size = (serialized as any)[2];\n\t\t} else {\n\t\t\tthis.visible = false;\n\t\t\tthis.size = serialized[1];\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-snapper-grid.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/snapper/e-snapper-grid.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAehC;IAAkC,gCAAkB;IAQnD,sBAAY,KAAwB,EAAE,OAA6B;QAAnE,iBAQC;;gBAPA,iBAAO;QACP,KAAI,CAAC,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,mCAAI,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC1E,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,iBAAiB,CAAC;QACzC,KAAI,CAAC,iBAAiB,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,mCAAI,KAAK,CAAC,oBAAoB,EAAE,CAAC;QACzE,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,iBAAiB,CAAC;QACzC,KAAI,CAAC,YAAY,GAAG,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,mCAAI,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAChE,KAAI,CAAC,KAAK,GAAG,KAAI,CAAC,YAAY,CAAC;;IAChC,CAAC;IAED,sBAAI,iCAAO;aAAX;YACC,OAAO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;QAC/B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IAED,gCAAS,GAAT;QACC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACvE,CAAC;IAED,kCAAW,GAAX,UAAY,UAAsC;QACjD,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,UAAU,EAAE;YACpB,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAI,UAAkB,CAAC,CAAC,CAAC,CAAC;SACnC;aAAM;YACN,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;SAC1B;IACF,CAAC;IACF,mBAAC;AAAD,CAAC,AA/ED,CAAkC,KAAK,CAAC,YAAY,GA+EnD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { utils } from \"pixi.js\";\nimport { DDiagramSerializedSnapGrid } from \"../d-diagram-serialized\";\nimport { ESnapperResult } from \"./e-snapper-result\";\n\nexport interface ESnapperGridOptions {\n\tvisible?: boolean;\n\tenable?: boolean;\n\tsize?: number;\n}\nexport interface EThemeSnapperGrid {\n\tisSnapperGridVisible(): boolean;\n\tisSnapperGridEnabled(): boolean;\n\tgetSnapperGridSize(): number;\n}\n\nexport class ESnapperGrid extends utils.EventEmitter {\n\tprotected _isEnabled: boolean;\n\tprotected _isEnabledDefault: boolean;\n\tprotected _size: number;\n\tprotected _sizeDefault: number;\n\tprotected _isVisible: boolean;\n\tprotected _isVisibleDefault: boolean;\n\n\tconstructor(theme: EThemeSnapperGrid, options?: ESnapperGridOptions) {\n\t\tsuper();\n\t\tthis._isVisibleDefault = options?.visible ?? theme.isSnapperGridVisible();\n\t\tthis._isVisible = this._isVisibleDefault;\n\t\tthis._isEnabledDefault = options?.enable ?? theme.isSnapperGridEnabled();\n\t\tthis._isEnabled = this._isEnabledDefault;\n\t\tthis._sizeDefault = options?.size ?? theme.getSnapperGridSize();\n\t\tthis._size = this._sizeDefault;\n\t}\n\n\tget visible(): boolean {\n\t\treturn this._isVisible;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tif (this._isVisible !== visible) {\n\t\t\tthis._isVisible = visible;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget enable(): boolean {\n\t\treturn this._isEnabled;\n\t}\n\n\tset enable(enable: boolean) {\n\t\tif (this._isEnabled !== enable) {\n\t\t\tthis._isEnabled = enable;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget size(): number {\n\t\treturn this._size;\n\t}\n\n\tset size(size: number) {\n\t\tif (this._size !== size) {\n\t\t\tthis._size = size;\n\t\t\tthis.emit(\"change\", size, this);\n\t\t}\n\t}\n\n\tsnap(value: number, result: ESnapperResult): void {\n\t\tif (this._isEnabled) {\n\t\t\tconst size = this._size;\n\t\t\tresult.set(value, Math.round(value / size) * size);\n\t\t}\n\t}\n\n\treset(): void {\n\t\tthis._isVisible = this._isVisibleDefault;\n\t\tthis._isEnabled = this._isEnabledDefault;\n\t\tthis._size = this._sizeDefault;\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tserialize(): DDiagramSerializedSnapGrid {\n\t\treturn [this._isEnabled ? 1 : 0, this._isVisible ? 1 : 0, this._size];\n\t}\n\n\tdeserialize(serialized: DDiagramSerializedSnapGrid): void {\n\t\tthis.enable = !!serialized[0];\n\t\tif (2 in serialized) {\n\t\t\tthis.visible = !!serialized[1];\n\t\t\tthis.size = (serialized as any)[2];\n\t\t} else {\n\t\t\tthis.visible = false;\n\t\t\tthis.size = serialized[1];\n\t\t}\n\t}\n}\n"]}
@@ -12,8 +12,10 @@ var ESnapperTarget = /** @class */ (function (_super) {
12
12
  var _a, _b;
13
13
  _this = _super.call(this) || this;
14
14
  _this.values = [];
15
- _this._isVisible = (_a = options === null || options === void 0 ? void 0 : options.visible) !== null && _a !== void 0 ? _a : theme.isSnapperTargetVisible();
16
- _this._isEnabled = (_b = options === null || options === void 0 ? void 0 : options.enable) !== null && _b !== void 0 ? _b : theme.isSnapperTargetEnabled();
15
+ _this._isVisibleDefault = (_a = options === null || options === void 0 ? void 0 : options.visible) !== null && _a !== void 0 ? _a : theme.isSnapperTargetVisible();
16
+ _this._isVisible = _this._isVisibleDefault;
17
+ _this._isEnabledDefault = (_b = options === null || options === void 0 ? void 0 : options.enable) !== null && _b !== void 0 ? _b : theme.isSnapperTargetEnabled();
18
+ _this._isEnabled = _this._isEnabledDefault;
17
19
  return _this;
18
20
  }
19
21
  Object.defineProperty(ESnapperTarget.prototype, "enable", {
@@ -99,8 +101,8 @@ var ESnapperTarget = /** @class */ (function (_super) {
99
101
  }
100
102
  };
101
103
  ESnapperTarget.prototype.reset = function () {
102
- this._isEnabled = true;
103
- this._isVisible = true;
104
+ this._isEnabled = this._isEnabledDefault;
105
+ this._isVisible = this._isVisibleDefault;
104
106
  this.values.length = 0;
105
107
  this.emit("change", this);
106
108
  };
@@ -1 +1 @@
1
- {"version":3,"file":"e-snapper-target.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/snapper/e-snapper-target.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAMhC,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAYxF;IAAoC,kCAAkB;IAKrD,wBAAY,KAA0B,EAAE,OAA+B;QAAvE,iBAKC;;gBAJA,iBAAO;QACP,KAAI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AAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAElC,aAAa;QACb,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAElC,SAAS;QACT,IAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;YACrD,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3D;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IACF,qBAAC;AAAD,CAAC,AA3HD,CAAoC,KAAK,CAAC,YAAY,GA2HrD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { utils } from \"pixi.js\";\nimport {\n\tDDiagramSerializedSnapTarget,\n\tDDiagramSerializedSnapTargetValue\n} from \"../d-diagram-serialized\";\nimport { ESnapperResult } from \"./e-snapper-result\";\nimport { ESnapperTargetValue, ESnapperTargetValueType } from \"./e-snapper-target-value\";\n\nexport interface ESnapperTargetOptions {\n\tvisible?: boolean;\n\tenable?: boolean;\n}\n\nexport interface EThemeSnapperTarget {\n\tisSnapperTargetVisible(): boolean;\n\tisSnapperTargetEnabled(): boolean;\n}\n\nexport class ESnapperTarget extends utils.EventEmitter {\n\tvalues: ESnapperTargetValue[];\n\tprotected _isVisible: boolean;\n\tprotected _isEnabled: boolean;\n\n\tconstructor(theme: EThemeSnapperTarget, options?: ESnapperTargetOptions) {\n\t\tsuper();\n\t\tthis.values = [];\n\t\tthis._isVisible = options?.visible ?? theme.isSnapperTargetVisible();\n\t\tthis._isEnabled = options?.enable ?? theme.isSnapperTargetEnabled();\n\t}\n\n\tget enable(): boolean {\n\t\treturn this._isEnabled;\n\t}\n\n\tset enable(enable: boolean) {\n\t\tif (this._isEnabled !== enable) {\n\t\t\tthis._isEnabled = enable;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget visible(): boolean {\n\t\treturn this._isVisible;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tif (this._isVisible !== visible) {\n\t\t\tthis._isVisible = visible;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget size(): number {\n\t\treturn this.values.length;\n\t}\n\n\tadd(target: ESnapperTargetValue, index?: number): void {\n\t\tif (index != null) {\n\t\t\tthis.values.splice(index, 0, target);\n\t\t} else {\n\t\t\tthis.values.push(target);\n\t\t}\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tremove(index: number): void {\n\t\tconst values = this.values;\n\t\tif (0 <= index && index < values.length) {\n\t\t\tvalues.splice(index, 1);\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\treplace(index: number, value: ESnapperTargetValue): ESnapperTargetValue | null {\n\t\tconst values = this.values;\n\t\tif (0 <= index && index < values.length) {\n\t\t\tconst result = values[index];\n\t\t\tvalues[index] = value;\n\t\t\tthis.emit(\"change\", this);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tswap(indexA: number, indexB: number): void {\n\t\tif (indexA !== indexB) {\n\t\t\tconst values = this.values;\n\t\t\tconst valueA = values[indexA];\n\t\t\tvalues[indexA] = values[indexB];\n\t\t\tvalues[indexB] = valueA;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tsnap(px: number, py: number, x: ESnapperResult, y: ESnapperResult): void {\n\t\tif (this._isEnabled) {\n\t\t\tconst values = this.values;\n\t\t\tfor (let i = 0, imax = values.length; i < imax; ++i) {\n\t\t\t\tconst value = values[i];\n\t\t\t\tif (value.type === ESnapperTargetValueType.VERTICAL) {\n\t\t\t\t\tx.set(px, value.position);\n\t\t\t\t} else {\n\t\t\t\t\ty.set(py, value.position);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treset(): void {\n\t\tthis._isEnabled = true;\n\t\tthis._isVisible = true;\n\t\tthis.values.length = 0;\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tserialize(): DDiagramSerializedSnapTarget {\n\t\tconst targets: DDiagramSerializedSnapTargetValue[] = [];\n\t\tconst values = this.values;\n\t\tfor (let i = 0, imax = values.length; i < imax; ++i) {\n\t\t\ttargets.push(values[i].serialize());\n\t\t}\n\t\treturn [this._isEnabled ? 1 : 0, this._isVisible ? 1 : 0, targets];\n\t}\n\n\tdeserialize(serialized: DDiagramSerializedSnapTarget): void {\n\t\t// Availability\n\t\tthis._isEnabled = !!serialized[0];\n\n\t\t// Visibility\n\t\tthis._isVisible = !!serialized[1];\n\n\t\t// Values\n\t\tconst sources = serialized[2];\n\t\tconst values = this.values;\n\t\tvalues.length = 0;\n\t\tfor (let i = 0, imax = sources.length; i < imax; ++i) {\n\t\t\tconst source = sources[i];\n\t\t\tvalues.push(new ESnapperTargetValue(source[0], source[1]));\n\t\t}\n\t\tthis.emit(\"change\", this);\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-snapper-target.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/snapper/e-snapper-target.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAMhC,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAYxF;IAAoC,kCAAkB;IAOrD,wBAAY,KAA0B,EAAE,OAA+B;QAAvE,iBAOC;;gBANA,iBAAO;QACP,KAAI,CAAC,MAAM,GAAG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AAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED,oCAAW,GAAX,UAAY,UAAwC;QACnD,eAAe;QACf,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAElC,aAAa;QACb,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAElC,SAAS;QACT,IAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,EAAE;YACrD,IAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC,IAAI,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAC3D;QACD,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;IACF,qBAAC;AAAD,CAAC,AA/HD,CAAoC,KAAK,CAAC,YAAY,GA+HrD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { utils } from \"pixi.js\";\nimport {\n\tDDiagramSerializedSnapTarget,\n\tDDiagramSerializedSnapTargetValue\n} from \"../d-diagram-serialized\";\nimport { ESnapperResult } from \"./e-snapper-result\";\nimport { ESnapperTargetValue, ESnapperTargetValueType } from \"./e-snapper-target-value\";\n\nexport interface ESnapperTargetOptions {\n\tvisible?: boolean;\n\tenable?: boolean;\n}\n\nexport interface EThemeSnapperTarget {\n\tisSnapperTargetVisible(): boolean;\n\tisSnapperTargetEnabled(): boolean;\n}\n\nexport class ESnapperTarget extends utils.EventEmitter {\n\tvalues: ESnapperTargetValue[];\n\tprotected _isVisible: boolean;\n\tprotected _isVisibleDefault: boolean;\n\tprotected _isEnabled: boolean;\n\tprotected _isEnabledDefault: boolean;\n\n\tconstructor(theme: EThemeSnapperTarget, options?: ESnapperTargetOptions) {\n\t\tsuper();\n\t\tthis.values = [];\n\t\tthis._isVisibleDefault = options?.visible ?? theme.isSnapperTargetVisible();\n\t\tthis._isVisible = this._isVisibleDefault;\n\t\tthis._isEnabledDefault = options?.enable ?? theme.isSnapperTargetEnabled();\n\t\tthis._isEnabled = this._isEnabledDefault;\n\t}\n\n\tget enable(): boolean {\n\t\treturn this._isEnabled;\n\t}\n\n\tset enable(enable: boolean) {\n\t\tif (this._isEnabled !== enable) {\n\t\t\tthis._isEnabled = enable;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget visible(): boolean {\n\t\treturn this._isVisible;\n\t}\n\n\tset visible(visible: boolean) {\n\t\tif (this._isVisible !== visible) {\n\t\t\tthis._isVisible = visible;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tget size(): number {\n\t\treturn this.values.length;\n\t}\n\n\tadd(target: ESnapperTargetValue, index?: number): void {\n\t\tif (index != null) {\n\t\t\tthis.values.splice(index, 0, target);\n\t\t} else {\n\t\t\tthis.values.push(target);\n\t\t}\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tremove(index: number): void {\n\t\tconst values = this.values;\n\t\tif (0 <= index && index < values.length) {\n\t\t\tvalues.splice(index, 1);\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\treplace(index: number, value: ESnapperTargetValue): ESnapperTargetValue | null {\n\t\tconst values = this.values;\n\t\tif (0 <= index && index < values.length) {\n\t\t\tconst result = values[index];\n\t\t\tvalues[index] = value;\n\t\t\tthis.emit(\"change\", this);\n\t\t\treturn result;\n\t\t}\n\t\treturn null;\n\t}\n\n\tswap(indexA: number, indexB: number): void {\n\t\tif (indexA !== indexB) {\n\t\t\tconst values = this.values;\n\t\t\tconst valueA = values[indexA];\n\t\t\tvalues[indexA] = values[indexB];\n\t\t\tvalues[indexB] = valueA;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tsnap(px: number, py: number, x: ESnapperResult, y: ESnapperResult): void {\n\t\tif (this._isEnabled) {\n\t\t\tconst values = this.values;\n\t\t\tfor (let i = 0, imax = values.length; i < imax; ++i) {\n\t\t\t\tconst value = values[i];\n\t\t\t\tif (value.type === ESnapperTargetValueType.VERTICAL) {\n\t\t\t\t\tx.set(px, value.position);\n\t\t\t\t} else {\n\t\t\t\t\ty.set(py, value.position);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treset(): void {\n\t\tthis._isEnabled = this._isEnabledDefault;\n\t\tthis._isVisible = this._isVisibleDefault;\n\t\tthis.values.length = 0;\n\t\tthis.emit(\"change\", this);\n\t}\n\n\tserialize(): DDiagramSerializedSnapTarget {\n\t\tconst targets: DDiagramSerializedSnapTargetValue[] = [];\n\t\tconst values = this.values;\n\t\tfor (let i = 0, imax = values.length; i < imax; ++i) {\n\t\t\ttargets.push(values[i].serialize());\n\t\t}\n\t\treturn [this._isEnabled ? 1 : 0, this._isVisible ? 1 : 0, targets];\n\t}\n\n\tdeserialize(serialized: DDiagramSerializedSnapTarget): void {\n\t\t// Availability\n\t\tthis._isEnabled = !!serialized[0];\n\n\t\t// Visibility\n\t\tthis._isVisible = !!serialized[1];\n\n\t\t// Values\n\t\tconst sources = serialized[2];\n\t\tconst values = this.values;\n\t\tvalues.length = 0;\n\t\tfor (let i = 0, imax = sources.length; i < imax; ++i) {\n\t\t\tconst source = sources[i];\n\t\t\tvalues.push(new ESnapperTargetValue(source[0], source[1]));\n\t\t}\n\t\tthis.emit(\"change\", this);\n\t}\n}\n"]}
@@ -49,7 +49,8 @@ var ESnapper = /** @class */ (function (_super) {
49
49
  _this.grid = new ESnapperGrid(theme, options === null || options === void 0 ? void 0 : options.grid);
50
50
  _this.target = new ESnapperTarget(theme, options === null || options === void 0 ? void 0 : options.target);
51
51
  _this._parent = parent;
52
- _this._isEnabled = (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : theme.isSnapperEnabled();
52
+ _this._isEnabledDefault = (_a = options === null || options === void 0 ? void 0 : options.enable) !== null && _a !== void 0 ? _a : theme.isSnapperEnabled();
53
+ _this._isEnabled = _this._isEnabledDefault;
53
54
  return _this;
54
55
  }
55
56
  Object.defineProperty(ESnapper.prototype, "enable", {
@@ -425,7 +426,7 @@ var ESnapper = /** @class */ (function (_super) {
425
426
  return false;
426
427
  };
427
428
  ESnapper.prototype.reset = function () {
428
- this.enable = true;
429
+ this.enable = this._isEnabledDefault;
429
430
  this.target.reset();
430
431
  this.grid.reset();
431
432
  };
@@ -1 +1 @@
1
- {"version":3,"file":"e-snapper.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/snapper/e-snapper.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAiC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,YAAY,EAA0C,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAA8C,MAAM,oBAAoB,CAAC;AAEhG,IAAM,OAAO,GAAG,OAAO,CAAC;AAOxB,MAAM,CAAC,IAAM,sBAAsB,GAAG;IACrC,IAAI,EAAE,CAAC;IACP,QAAQ,EAAE,CAAC;IACX,UAAU,EAAE,CAAC;IACb,SAAS,EAAE,CAAC;IACZ,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,WAAW,EAAE,CAAC;IACd,aAAa,EAAE,CAAC;IAChB,YAAY,EAAE,CAAC;IACf,QAAQ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C,UAAU,CAAC;wBACvC,KAAK,sBAAsB,CAAC,aAAa;4BACxC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;4BAClB,MAAM;wBACP,KAAK,sBAAsB,CAAC,WAAW,CAAC;wBACxC,KAAK,sBAAsB,CAAC,YAAY;4BACvC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;4BAClB,MAAM;wBACP,KAAK,sBAAsB,CAAC,IAAI;4BAC/B,MAAM;qBACP;iBACD;gBACD,OAAO,IAAI,CAAC;aACZ;SACD;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,wBAAK,GAAL;QACC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,4BAAS,GAAT;QACC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;IAClF,CAAC;IAED,8BAAW,GAAX,UAAY,UAAkC;QAC7C,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IACF,eAAC;AAAD,CAAC,AApiBD,CAA8B,KAAK,CAAC,YAAY,GAoiB/C","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject, IPoint, Matrix, Point, Rectangle, utils } from \"pixi.js\";\nimport { DDiagramSerializedSnap } from \"../d-diagram-serialized\";\nimport { isNaN } from \"../util/is-nan\";\nimport { ESnapperGrid, ESnapperGridOptions, EThemeSnapperGrid } from \"./e-snapper-grid\";\nimport { ESnapperResult } from \"./e-snapper-result\";\nimport { ESnapperResultScale } from \"./e-snapper-result-scale\";\nimport { ESnapperTarget, ESnapperTargetOptions, EThemeSnapperTarget } from \"./e-snapper-target\";\n\nconst EPSILON = 0.00001;\n\nexport interface ESnapperModifier extends DisplayObject {\n\twidth: number;\n\theight: number;\n}\n\nexport const ESnapperModifierAnchor = {\n\tNONE: 0,\n\tTOP_LEFT: 1,\n\tTOP_CENTER: 2,\n\tTOP_RIGHT: 3,\n\tMIDDLE_LEFT: 4,\n\tMIDDLE_RIGHT: 5,\n\tBOTTOM_LEFT: 6,\n\tBOTTOM_CENTER: 7,\n\tBOTTOM_RIGHT: 8,\n\tROTATION: 9\n} as const;\n\nexport type ESnapperModifierAnchor =\n\ttypeof ESnapperModifierAnchor[keyof typeof ESnapperModifierAnchor];\n\nexport interface ESnapperParentCanvas {\n\tscale: {\n\t\tx: number;\n\t\ty: number;\n\t};\n\twidth: number;\n\theight: number;\n}\n\nexport interface ESnapperParent {\n\tcanvas: ESnapperParentCanvas | null;\n}\n\nexport interface ESnapperOptions {\n\tenable?: boolean;\n\tgrid?: ESnapperGridOptions;\n\ttarget?: ESnapperTargetOptions;\n}\n\nexport interface EThemeSnapper extends EThemeSnapperGrid, EThemeSnapperTarget {\n\tisSnapperEnabled(): boolean;\n}\n\nexport class ESnapper extends utils.EventEmitter {\n\tprotected _points: Point[];\n\tprotected _normals: Point[];\n\tprotected _lengths: number[];\n\n\tprotected _workScale: Point;\n\tprotected _workScaleResult: ESnapperResultScale;\n\n\tprotected _workTranslate: Point;\n\n\tprotected _workSnap: Point;\n\tprotected _workSnapRectangle: Rectangle;\n\tprotected _workSnapResultX: ESnapperResult;\n\tprotected _workSnapResultY: ESnapperResult;\n\n\tprotected _parent: ESnapperParent;\n\n\tprotected _isEnabled: boolean;\n\n\tgrid: ESnapperGrid;\n\n\ttarget: ESnapperTarget;\n\n\tconstructor(parent: ESnapperParent, theme: EThemeSnapper, options?: ESnapperOptions) {\n\t\tsuper();\n\n\t\tthis._points = [\n\t\t\tnew Point(), // Top left\n\t\t\tnew Point(), // Top right\n\t\t\tnew Point(), // Bottom left\n\t\t\tnew Point(), // Bottom right\n\t\t\tnew Point() // Center\n\t\t];\n\n\t\tthis._normals = [new Point(), new Point()];\n\n\t\tthis._lengths = [1, 1];\n\n\t\tthis._workScale = new Point();\n\t\tthis._workSnapResultX = new ESnapperResult();\n\t\tthis._workSnapResultY = new ESnapperResult();\n\t\tthis._workScaleResult = {\n\t\t\tdistance: 0,\n\t\t\tscale: new Point()\n\t\t};\n\n\t\tthis._workTranslate = new Point();\n\n\t\tthis._workSnapRectangle = new Rectangle();\n\t\tthis._workSnap = new Point();\n\n\t\tthis.grid = new ESnapperGrid(theme, options?.grid);\n\n\t\tthis.target = new ESnapperTarget(theme, options?.target);\n\n\t\tthis._parent = parent;\n\t\tthis._isEnabled = options?.enable ?? theme.isSnapperEnabled();\n\t}\n\n\tget enable(): boolean {\n\t\treturn this._isEnabled;\n\t}\n\n\tset enable(enable: boolean) {\n\t\tif (this._isEnabled !== enable) {\n\t\t\tthis._isEnabled = enable;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tprotected prepare(modifier: ESnapperModifier): void {\n\t\tmodifier.updateTransform();\n\t\tconst localTransform = modifier.transform.localTransform;\n\t\tconst sx = modifier.width;\n\t\tconst sy = modifier.height;\n\n\t\tconst points = this._points;\n\t\tpoints[0].set(0, 0);\n\t\tpoints[1].set(sx, 0);\n\t\tpoints[2].set(sx, sy);\n\t\tpoints[3].set(0, sy);\n\t\tpoints[4].set(sx * 0.5, sy * 0.5);\n\n\t\tlocalTransform.apply(points[0], points[0]);\n\t\tlocalTransform.apply(points[1], points[1]);\n\t\tlocalTransform.apply(points[2], points[2]);\n\t\tlocalTransform.apply(points[3], points[3]);\n\t\tlocalTransform.apply(points[4], points[4]);\n\t}\n\n\tprepareForTranslate(modifier: ESnapperModifier): void {\n\t\tif (this._isEnabled) {\n\t\t\tthis.prepare(modifier);\n\t\t}\n\t}\n\n\tprotected snap(point: IPoint, result: IPoint): IPoint {\n\t\tconst px = point.x;\n\t\tconst py = point.y;\n\t\tconst canvas = this._parent.canvas;\n\t\tconst x = this._workSnapResultX;\n\t\tconst y = this._workSnapResultY;\n\n\t\t// Canvas\n\t\tif (canvas != null) {\n\t\t\tconst scale = Math.max(canvas.scale.x, canvas.scale.y);\n\t\t\tx.reset(px, scale);\n\t\t\ty.reset(py, scale);\n\t\t\tx.set(px, 0);\n\t\t\tx.set(px, canvas.width);\n\t\t\ty.set(py, 0);\n\t\t\ty.set(py, canvas.height);\n\t\t} else {\n\t\t\tx.reset(px, 1);\n\t\t\ty.reset(py, 1);\n\t\t}\n\n\t\t// Target\n\t\tthis.target.snap(px, py, x, y);\n\n\t\t// Grid\n\t\tthis.grid.snap(px, x);\n\t\tthis.grid.snap(py, y);\n\n\t\t//\n\t\tresult.x = isNaN(x.distance) ? NaN : x.result;\n\t\tresult.y = isNaN(y.distance) ? NaN : y.result;\n\t\treturn result;\n\t}\n\n\ttoSnapped(point: IPoint, result: IPoint): IPoint {\n\t\tconst px = point.x;\n\t\tconst py = point.y;\n\t\tif (this._isEnabled) {\n\t\t\tthis.snap(point, result);\n\t\t\tconst x = result.x;\n\t\t\tconst y = result.y;\n\t\t\tresult.set(isNaN(x) ? px : x, isNaN(y) ? py : y);\n\t\t} else {\n\t\t\tresult.set(px, py);\n\t\t}\n\t\treturn result;\n\t}\n\n\ttoTranslationSnapped(delta: IPoint, result: IPoint): IPoint {\n\t\tconst dx = delta.x;\n\t\tconst dy = delta.y;\n\t\tlet x = NaN;\n\t\tlet y = NaN;\n\t\tif (this._isEnabled) {\n\t\t\tconst workTranslate = this._workTranslate;\n\t\t\tconst points = this._points;\n\t\t\tfor (let i = 0, imax = points.length; i < imax; ++i) {\n\t\t\t\tconst point = points[i];\n\t\t\t\tworkTranslate.set(point.x + dx, point.y + dy);\n\t\t\t\tthis.snap(workTranslate, workTranslate);\n\n\t\t\t\t// X\n\t\t\t\tif (!isNaN(workTranslate.x)) {\n\t\t\t\t\tconst newDx = workTranslate.x - point.x;\n\t\t\t\t\tif (isNaN(x) || Math.abs(newDx - dx) < Math.abs(x - dx)) {\n\t\t\t\t\t\tx = newDx;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Y\n\t\t\t\tif (!isNaN(workTranslate.y)) {\n\t\t\t\t\tconst newDy = workTranslate.y - point.y;\n\t\t\t\t\tif (isNaN(y) || Math.abs(newDy - dy) < Math.abs(y - dy)) {\n\t\t\t\t\t\ty = newDy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult.x = isNaN(x) ? dx : x;\n\t\tresult.y = isNaN(y) ? dy : y;\n\t\treturn result;\n\t}\n\n\tprepareForRotate(modifier: ESnapperModifier): void {\n\t\t//\n\t}\n\n\tprotected getGridSizeRotation(): number {\n\t\treturn 5;\n\t}\n\n\tprotected toRadian(value: number): number {\n\t\treturn (value / 180) * Math.PI;\n\t}\n\n\tprotected toDegree(value: number): number {\n\t\treturn (value / Math.PI) * 180;\n\t}\n\n\ttoRotationSnapped(baseRotation: number, deltaRotation: number): number {\n\t\tif (this._isEnabled) {\n\t\t\tconst gridSize = this.getGridSizeRotation();\n\t\t\tconst newRotation = baseRotation + deltaRotation;\n\t\t\tconst newRotationDegree = Math.round(this.toDegree(newRotation));\n\t\t\tconst newRotationDegreeResidual = newRotationDegree % 90;\n\t\t\tif (Math.abs(newRotationDegreeResidual) <= gridSize) {\n\t\t\t\treturn this.toRadian(newRotationDegree - newRotationDegreeResidual) - baseRotation;\n\t\t\t} else {\n\t\t\t\tif (90 - gridSize <= newRotationDegreeResidual) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tthis.toRadian(newRotationDegree + (90 - newRotationDegreeResidual)) -\n\t\t\t\t\t\tbaseRotation\n\t\t\t\t\t);\n\t\t\t\t} else if (newRotationDegreeResidual <= -90 + gridSize) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tthis.toRadian(newRotationDegree - (90 + newRotationDegreeResidual)) -\n\t\t\t\t\t\tbaseRotation\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn deltaRotation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn deltaRotation;\n\t}\n\n\tprotected calcNormalizedVector(p0: IPoint, p1: IPoint, result: Point): number {\n\t\tconst dx = p1.x - p0.x;\n\t\tconst dy = p1.y - p0.y;\n\t\tconst l = Math.sqrt(dx * dx + dy * dy);\n\t\tif (EPSILON < l) {\n\t\t\tconst d = 1 / l;\n\t\t\tresult.x = dx * d;\n\t\t\tresult.y = dy * d;\n\t\t} else {\n\t\t\tresult.x = 1;\n\t\t\tresult.y = 0;\n\t\t}\n\t\treturn l;\n\t}\n\n\tprepareForScale(modifier: ESnapperModifier, anchor: ESnapperModifierAnchor): void {\n\t\tif (this._isEnabled) {\n\t\t\tthis.prepare(modifier);\n\n\t\t\tconst points = this._points;\n\t\t\tconst normals = this._normals;\n\t\t\tconst lengths = this._lengths;\n\t\t\tswitch (anchor) {\n\t\t\t\tcase ESnapperModifierAnchor.TOP_LEFT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[1], points[0], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[3], points[0], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_CENTER:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[3], points[0], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_RIGHT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[0], points[1], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[2], points[1], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_LEFT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[1], points[0], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.NONE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_RIGHT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[0], points[1], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_LEFT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[2], points[3], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[0], points[3], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_CENTER:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[0], points[3], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_RIGHT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[3], points[2], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[1], points[2], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected setScaleSnappedResult(\n\t\tdistance: number,\n\t\tlength: number,\n\t\tmove: number,\n\t\taxis: boolean, // true => x axis, false y axis\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tif (EPSILON < length) {\n\t\t\tif (isNaN(result.distance) || distance < result.distance) {\n\t\t\t\tresult.distance = distance;\n\t\t\t\tconst newScale = 1 + move / length;\n\t\t\t\tif (axis) {\n\t\t\t\t\tresult.scale.x = newScale;\n\t\t\t\t} else {\n\t\t\t\t\tresult.scale.y = newScale;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcScaleSnapped1D(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormal: IPoint,\n\t\tlength: number,\n\t\taxis: boolean,\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tconst work = this._workScale;\n\t\ttransform.apply(point, work);\n\t\tconst tx = work.x;\n\t\tconst ty = work.y;\n\t\tthis.snap(work, work);\n\t\tconst x = work.x;\n\t\tconst y = work.y;\n\n\t\t// X coordinate\n\t\tif (!isNaN(x)) {\n\t\t\tconst nx = Math.abs(normal.x);\n\t\t\tif (EPSILON < nx) {\n\t\t\t\tconst dx = (x - tx) / normal.x;\n\t\t\t\tconst distance = Math.abs(dx);\n\t\t\t\tconst mx = (x - point.x) / normal.x;\n\t\t\t\tthis.setScaleSnappedResult(distance, length, mx, axis, result);\n\t\t\t}\n\t\t}\n\n\t\t// Y coordinate\n\t\tif (!isNaN(y)) {\n\t\t\tconst ny = Math.abs(normal.y);\n\t\t\tif (EPSILON < ny) {\n\t\t\t\tconst dy = (y - ty) / normal.y;\n\t\t\t\tconst distance = Math.abs(dy);\n\t\t\t\tconst my = (y - point.y) / normal.y;\n\t\t\t\tthis.setScaleSnappedResult(distance, length, my, axis, result);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcScaleSnappedX(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormal: IPoint,\n\t\tlength: number,\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tthis.calcScaleSnapped1D(transform, point, normal, length, true, result);\n\t}\n\n\tprotected calcScaleSnappedY(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormal: IPoint,\n\t\tlength: number,\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tthis.calcScaleSnapped1D(transform, point, normal, length, false, result);\n\t}\n\n\tcalcScaleSnapped2D(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormals: IPoint[],\n\t\tlengths: number[],\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tconst work = this._workScale;\n\t\ttransform.apply(point, work);\n\t\tconst tx = work.x;\n\t\tconst ty = work.y;\n\n\t\tthis.snap(work, work);\n\t\tlet x = work.x;\n\t\tlet y = work.y;\n\t\tif (isNaN(x)) {\n\t\t\tif (isNaN(y)) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tx = tx;\n\t\t\t}\n\t\t} else {\n\t\t\tif (isNaN(y)) {\n\t\t\t\ty = ty;\n\t\t\t}\n\t\t}\n\n\t\t// (x, y) = (tx, ty) + normalA * a + normalB * b\n\t\t// dx = x - tx\n\t\t// dy = y - ty\n\t\t// V = ( a, b )^T\n\t\t// D = ( dx, dy )^T\n\t\t// A = | normalA.x normalB.x |\n\t\t// | normalA.y normalB.y |\n\t\t// A V = D\n\t\t// det A = normalA.x * normalB.y - normalB.x * normalA.y\n\t\t// A^-1 = | normalB.y -normalB.x | / det A\n\t\t// | -normalA.y normalA.x |\n\t\tconst detA = normals[0].x * normals[1].y - normals[1].x * normals[0].y;\n\t\tif (EPSILON < Math.abs(detA)) {\n\t\t\tconst dx = x - tx;\n\t\t\tconst dy = y - ty;\n\t\t\tconst distance = Math.abs(dx * dx + dy * dy);\n\t\t\tif (isNaN(result.distance) || distance < result.distance) {\n\t\t\t\tresult.distance = distance;\n\t\t\t\tconst mdx = x - point.x;\n\t\t\t\tconst mdy = y - point.y;\n\t\t\t\tconst mx = (+normals[1].y * mdx - normals[1].x * mdy) / detA;\n\t\t\t\tconst my = (-normals[0].y * mdx + normals[0].x * mdy) / detA;\n\t\t\t\tresult.scale.set(1 + mx / lengths[0], 1 + my / lengths[1]);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcScaleSnappedXY(\n\t\ttransform: Matrix,\n\t\tpointO: Point,\n\t\tpointX: Point,\n\t\tpointY: Point,\n\t\tnormals: IPoint[],\n\t\tlengths: number[],\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tthis.calcScaleSnapped2D(transform, pointO, normals, lengths, result);\n\t\tthis.calcScaleSnappedX(transform, pointY, normals[0], lengths[0], result);\n\t\tthis.calcScaleSnappedY(transform, pointX, normals[1], lengths[1], result);\n\t}\n\n\ttoScaleSnapped(\n\t\ttransform: Matrix,\n\t\tanchor: ESnapperModifierAnchor,\n\t\tkeepRatio: boolean,\n\t\tscale: IPoint\n\t): boolean {\n\t\tif (this._isEnabled) {\n\t\t\tconst points = this._points;\n\t\t\tconst normals = this._normals;\n\t\t\tconst lengths = this._lengths;\n\t\t\tconst work = this._workScaleResult;\n\t\t\twork.distance = NaN;\n\t\t\twork.scale.set(scale.x, scale.y);\n\n\t\t\tswitch (anchor) {\n\t\t\t\tcase ESnapperModifierAnchor.TOP_LEFT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[0],\n\t\t\t\t\t\tpoints[1],\n\t\t\t\t\t\tpoints[3],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_CENTER:\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[0], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[1], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_RIGHT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[1],\n\t\t\t\t\t\tpoints[0],\n\t\t\t\t\t\tpoints[2],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_LEFT:\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[0], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[3], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.NONE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_RIGHT:\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[1], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[2], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_LEFT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[3],\n\t\t\t\t\t\tpoints[2],\n\t\t\t\t\t\tpoints[0],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_CENTER:\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[2], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[3], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_RIGHT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[2],\n\t\t\t\t\t\tpoints[3],\n\t\t\t\t\t\tpoints[1],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!isNaN(work.distance)) {\n\t\t\t\tscale.copyFrom(work.scale);\n\t\t\t\tif (keepRatio) {\n\t\t\t\t\tswitch (anchor) {\n\t\t\t\t\t\tcase ESnapperModifierAnchor.TOP_LEFT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.TOP_RIGHT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_LEFT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_RIGHT:\n\t\t\t\t\t\t\tscale.x = scale.y = Math.max(scale.x, scale.y);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ESnapperModifierAnchor.TOP_CENTER:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_CENTER:\n\t\t\t\t\t\t\tscale.x = scale.y;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_LEFT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_RIGHT:\n\t\t\t\t\t\t\tscale.y = scale.x;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ESnapperModifierAnchor.NONE:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\treset(): void {\n\t\tthis.enable = true;\n\t\tthis.target.reset();\n\t\tthis.grid.reset();\n\t}\n\n\tserialize(): DDiagramSerializedSnap {\n\t\treturn [this._isEnabled ? 1 : 0, this.target.serialize(), this.grid.serialize()];\n\t}\n\n\tdeserialize(serialized: DDiagramSerializedSnap): void {\n\t\tthis.enable = !!serialized[0];\n\t\tthis.target.deserialize(serialized[1]);\n\t\tthis.grid.deserialize(serialized[2]);\n\t}\n}\n"]}
1
+ {"version":3,"file":"e-snapper.js","sourceRoot":"","sources":["../../../../src/main/typescript/wcardinal/ui/snapper/e-snapper.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAiC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEjF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,YAAY,EAA0C,MAAM,kBAAkB,CAAC;AACxF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAA8C,MAAM,oBAAoB,CAAC;AAEhG,IAAM,OAAO,GAAG,OAAO,CAA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C,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACtC,CAAC;IACF,eAAC;AAAD,CAAC,AAtiBD,CAA8B,KAAK,CAAC,YAAY,GAsiB/C","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { DisplayObject, IPoint, Matrix, Point, Rectangle, utils } from \"pixi.js\";\nimport { DDiagramSerializedSnap } from \"../d-diagram-serialized\";\nimport { isNaN } from \"../util/is-nan\";\nimport { ESnapperGrid, ESnapperGridOptions, EThemeSnapperGrid } from \"./e-snapper-grid\";\nimport { ESnapperResult } from \"./e-snapper-result\";\nimport { ESnapperResultScale } from \"./e-snapper-result-scale\";\nimport { ESnapperTarget, ESnapperTargetOptions, EThemeSnapperTarget } from \"./e-snapper-target\";\n\nconst EPSILON = 0.00001;\n\nexport interface ESnapperModifier extends DisplayObject {\n\twidth: number;\n\theight: number;\n}\n\nexport const ESnapperModifierAnchor = {\n\tNONE: 0,\n\tTOP_LEFT: 1,\n\tTOP_CENTER: 2,\n\tTOP_RIGHT: 3,\n\tMIDDLE_LEFT: 4,\n\tMIDDLE_RIGHT: 5,\n\tBOTTOM_LEFT: 6,\n\tBOTTOM_CENTER: 7,\n\tBOTTOM_RIGHT: 8,\n\tROTATION: 9\n} as const;\n\nexport type ESnapperModifierAnchor =\n\ttypeof ESnapperModifierAnchor[keyof typeof ESnapperModifierAnchor];\n\nexport interface ESnapperParentCanvas {\n\tscale: {\n\t\tx: number;\n\t\ty: number;\n\t};\n\twidth: number;\n\theight: number;\n}\n\nexport interface ESnapperParent {\n\tcanvas: ESnapperParentCanvas | null;\n}\n\nexport interface ESnapperOptions {\n\tenable?: boolean;\n\tgrid?: ESnapperGridOptions;\n\ttarget?: ESnapperTargetOptions;\n}\n\nexport interface EThemeSnapper extends EThemeSnapperGrid, EThemeSnapperTarget {\n\tisSnapperEnabled(): boolean;\n}\n\nexport class ESnapper extends utils.EventEmitter {\n\tprotected _points: Point[];\n\tprotected _normals: Point[];\n\tprotected _lengths: number[];\n\n\tprotected _workScale: Point;\n\tprotected _workScaleResult: ESnapperResultScale;\n\n\tprotected _workTranslate: Point;\n\n\tprotected _workSnap: Point;\n\tprotected _workSnapRectangle: Rectangle;\n\tprotected _workSnapResultX: ESnapperResult;\n\tprotected _workSnapResultY: ESnapperResult;\n\n\tprotected _parent: ESnapperParent;\n\n\tprotected _isEnabled: boolean;\n\tprotected _isEnabledDefault: boolean;\n\n\tgrid: ESnapperGrid;\n\n\ttarget: ESnapperTarget;\n\n\tconstructor(parent: ESnapperParent, theme: EThemeSnapper, options?: ESnapperOptions) {\n\t\tsuper();\n\n\t\tthis._points = [\n\t\t\tnew Point(), // Top left\n\t\t\tnew Point(), // Top right\n\t\t\tnew Point(), // Bottom left\n\t\t\tnew Point(), // Bottom right\n\t\t\tnew Point() // Center\n\t\t];\n\n\t\tthis._normals = [new Point(), new Point()];\n\n\t\tthis._lengths = [1, 1];\n\n\t\tthis._workScale = new Point();\n\t\tthis._workSnapResultX = new ESnapperResult();\n\t\tthis._workSnapResultY = new ESnapperResult();\n\t\tthis._workScaleResult = {\n\t\t\tdistance: 0,\n\t\t\tscale: new Point()\n\t\t};\n\n\t\tthis._workTranslate = new Point();\n\n\t\tthis._workSnapRectangle = new Rectangle();\n\t\tthis._workSnap = new Point();\n\n\t\tthis.grid = new ESnapperGrid(theme, options?.grid);\n\n\t\tthis.target = new ESnapperTarget(theme, options?.target);\n\n\t\tthis._parent = parent;\n\t\tthis._isEnabledDefault = options?.enable ?? theme.isSnapperEnabled();\n\t\tthis._isEnabled = this._isEnabledDefault;\n\t}\n\n\tget enable(): boolean {\n\t\treturn this._isEnabled;\n\t}\n\n\tset enable(enable: boolean) {\n\t\tif (this._isEnabled !== enable) {\n\t\t\tthis._isEnabled = enable;\n\t\t\tthis.emit(\"change\", this);\n\t\t}\n\t}\n\n\tprotected prepare(modifier: ESnapperModifier): void {\n\t\tmodifier.updateTransform();\n\t\tconst localTransform = modifier.transform.localTransform;\n\t\tconst sx = modifier.width;\n\t\tconst sy = modifier.height;\n\n\t\tconst points = this._points;\n\t\tpoints[0].set(0, 0);\n\t\tpoints[1].set(sx, 0);\n\t\tpoints[2].set(sx, sy);\n\t\tpoints[3].set(0, sy);\n\t\tpoints[4].set(sx * 0.5, sy * 0.5);\n\n\t\tlocalTransform.apply(points[0], points[0]);\n\t\tlocalTransform.apply(points[1], points[1]);\n\t\tlocalTransform.apply(points[2], points[2]);\n\t\tlocalTransform.apply(points[3], points[3]);\n\t\tlocalTransform.apply(points[4], points[4]);\n\t}\n\n\tprepareForTranslate(modifier: ESnapperModifier): void {\n\t\tif (this._isEnabled) {\n\t\t\tthis.prepare(modifier);\n\t\t}\n\t}\n\n\tprotected snap(point: IPoint, result: IPoint): IPoint {\n\t\tconst px = point.x;\n\t\tconst py = point.y;\n\t\tconst canvas = this._parent.canvas;\n\t\tconst x = this._workSnapResultX;\n\t\tconst y = this._workSnapResultY;\n\n\t\t// Canvas\n\t\tif (canvas != null) {\n\t\t\tconst scale = Math.max(canvas.scale.x, canvas.scale.y);\n\t\t\tx.reset(px, scale);\n\t\t\ty.reset(py, scale);\n\t\t\tx.set(px, 0);\n\t\t\tx.set(px, canvas.width);\n\t\t\ty.set(py, 0);\n\t\t\ty.set(py, canvas.height);\n\t\t} else {\n\t\t\tx.reset(px, 1);\n\t\t\ty.reset(py, 1);\n\t\t}\n\n\t\t// Target\n\t\tthis.target.snap(px, py, x, y);\n\n\t\t// Grid\n\t\tthis.grid.snap(px, x);\n\t\tthis.grid.snap(py, y);\n\n\t\t//\n\t\tresult.x = isNaN(x.distance) ? NaN : x.result;\n\t\tresult.y = isNaN(y.distance) ? NaN : y.result;\n\t\treturn result;\n\t}\n\n\ttoSnapped(point: IPoint, result: IPoint): IPoint {\n\t\tconst px = point.x;\n\t\tconst py = point.y;\n\t\tif (this._isEnabled) {\n\t\t\tthis.snap(point, result);\n\t\t\tconst x = result.x;\n\t\t\tconst y = result.y;\n\t\t\tresult.set(isNaN(x) ? px : x, isNaN(y) ? py : y);\n\t\t} else {\n\t\t\tresult.set(px, py);\n\t\t}\n\t\treturn result;\n\t}\n\n\ttoTranslationSnapped(delta: IPoint, result: IPoint): IPoint {\n\t\tconst dx = delta.x;\n\t\tconst dy = delta.y;\n\t\tlet x = NaN;\n\t\tlet y = NaN;\n\t\tif (this._isEnabled) {\n\t\t\tconst workTranslate = this._workTranslate;\n\t\t\tconst points = this._points;\n\t\t\tfor (let i = 0, imax = points.length; i < imax; ++i) {\n\t\t\t\tconst point = points[i];\n\t\t\t\tworkTranslate.set(point.x + dx, point.y + dy);\n\t\t\t\tthis.snap(workTranslate, workTranslate);\n\n\t\t\t\t// X\n\t\t\t\tif (!isNaN(workTranslate.x)) {\n\t\t\t\t\tconst newDx = workTranslate.x - point.x;\n\t\t\t\t\tif (isNaN(x) || Math.abs(newDx - dx) < Math.abs(x - dx)) {\n\t\t\t\t\t\tx = newDx;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Y\n\t\t\t\tif (!isNaN(workTranslate.y)) {\n\t\t\t\t\tconst newDy = workTranslate.y - point.y;\n\t\t\t\t\tif (isNaN(y) || Math.abs(newDy - dy) < Math.abs(y - dy)) {\n\t\t\t\t\t\ty = newDy;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tresult.x = isNaN(x) ? dx : x;\n\t\tresult.y = isNaN(y) ? dy : y;\n\t\treturn result;\n\t}\n\n\tprepareForRotate(modifier: ESnapperModifier): void {\n\t\t//\n\t}\n\n\tprotected getGridSizeRotation(): number {\n\t\treturn 5;\n\t}\n\n\tprotected toRadian(value: number): number {\n\t\treturn (value / 180) * Math.PI;\n\t}\n\n\tprotected toDegree(value: number): number {\n\t\treturn (value / Math.PI) * 180;\n\t}\n\n\ttoRotationSnapped(baseRotation: number, deltaRotation: number): number {\n\t\tif (this._isEnabled) {\n\t\t\tconst gridSize = this.getGridSizeRotation();\n\t\t\tconst newRotation = baseRotation + deltaRotation;\n\t\t\tconst newRotationDegree = Math.round(this.toDegree(newRotation));\n\t\t\tconst newRotationDegreeResidual = newRotationDegree % 90;\n\t\t\tif (Math.abs(newRotationDegreeResidual) <= gridSize) {\n\t\t\t\treturn this.toRadian(newRotationDegree - newRotationDegreeResidual) - baseRotation;\n\t\t\t} else {\n\t\t\t\tif (90 - gridSize <= newRotationDegreeResidual) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tthis.toRadian(newRotationDegree + (90 - newRotationDegreeResidual)) -\n\t\t\t\t\t\tbaseRotation\n\t\t\t\t\t);\n\t\t\t\t} else if (newRotationDegreeResidual <= -90 + gridSize) {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tthis.toRadian(newRotationDegree - (90 + newRotationDegreeResidual)) -\n\t\t\t\t\t\tbaseRotation\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\treturn deltaRotation;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn deltaRotation;\n\t}\n\n\tprotected calcNormalizedVector(p0: IPoint, p1: IPoint, result: Point): number {\n\t\tconst dx = p1.x - p0.x;\n\t\tconst dy = p1.y - p0.y;\n\t\tconst l = Math.sqrt(dx * dx + dy * dy);\n\t\tif (EPSILON < l) {\n\t\t\tconst d = 1 / l;\n\t\t\tresult.x = dx * d;\n\t\t\tresult.y = dy * d;\n\t\t} else {\n\t\t\tresult.x = 1;\n\t\t\tresult.y = 0;\n\t\t}\n\t\treturn l;\n\t}\n\n\tprepareForScale(modifier: ESnapperModifier, anchor: ESnapperModifierAnchor): void {\n\t\tif (this._isEnabled) {\n\t\t\tthis.prepare(modifier);\n\n\t\t\tconst points = this._points;\n\t\t\tconst normals = this._normals;\n\t\t\tconst lengths = this._lengths;\n\t\t\tswitch (anchor) {\n\t\t\t\tcase ESnapperModifierAnchor.TOP_LEFT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[1], points[0], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[3], points[0], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_CENTER:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[3], points[0], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_RIGHT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[0], points[1], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[2], points[1], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_LEFT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[1], points[0], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.NONE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_RIGHT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[0], points[1], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_LEFT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[2], points[3], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[0], points[3], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_CENTER:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[0], points[3], normals[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_RIGHT:\n\t\t\t\t\tlengths[0] = this.calcNormalizedVector(points[3], points[2], normals[0]);\n\t\t\t\t\tlengths[1] = this.calcNormalizedVector(points[1], points[2], normals[1]);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected setScaleSnappedResult(\n\t\tdistance: number,\n\t\tlength: number,\n\t\tmove: number,\n\t\taxis: boolean, // true => x axis, false y axis\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tif (EPSILON < length) {\n\t\t\tif (isNaN(result.distance) || distance < result.distance) {\n\t\t\t\tresult.distance = distance;\n\t\t\t\tconst newScale = 1 + move / length;\n\t\t\t\tif (axis) {\n\t\t\t\t\tresult.scale.x = newScale;\n\t\t\t\t} else {\n\t\t\t\t\tresult.scale.y = newScale;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcScaleSnapped1D(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormal: IPoint,\n\t\tlength: number,\n\t\taxis: boolean,\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tconst work = this._workScale;\n\t\ttransform.apply(point, work);\n\t\tconst tx = work.x;\n\t\tconst ty = work.y;\n\t\tthis.snap(work, work);\n\t\tconst x = work.x;\n\t\tconst y = work.y;\n\n\t\t// X coordinate\n\t\tif (!isNaN(x)) {\n\t\t\tconst nx = Math.abs(normal.x);\n\t\t\tif (EPSILON < nx) {\n\t\t\t\tconst dx = (x - tx) / normal.x;\n\t\t\t\tconst distance = Math.abs(dx);\n\t\t\t\tconst mx = (x - point.x) / normal.x;\n\t\t\t\tthis.setScaleSnappedResult(distance, length, mx, axis, result);\n\t\t\t}\n\t\t}\n\n\t\t// Y coordinate\n\t\tif (!isNaN(y)) {\n\t\t\tconst ny = Math.abs(normal.y);\n\t\t\tif (EPSILON < ny) {\n\t\t\t\tconst dy = (y - ty) / normal.y;\n\t\t\t\tconst distance = Math.abs(dy);\n\t\t\t\tconst my = (y - point.y) / normal.y;\n\t\t\t\tthis.setScaleSnappedResult(distance, length, my, axis, result);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcScaleSnappedX(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormal: IPoint,\n\t\tlength: number,\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tthis.calcScaleSnapped1D(transform, point, normal, length, true, result);\n\t}\n\n\tprotected calcScaleSnappedY(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormal: IPoint,\n\t\tlength: number,\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tthis.calcScaleSnapped1D(transform, point, normal, length, false, result);\n\t}\n\n\tcalcScaleSnapped2D(\n\t\ttransform: Matrix,\n\t\tpoint: Point,\n\t\tnormals: IPoint[],\n\t\tlengths: number[],\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tconst work = this._workScale;\n\t\ttransform.apply(point, work);\n\t\tconst tx = work.x;\n\t\tconst ty = work.y;\n\n\t\tthis.snap(work, work);\n\t\tlet x = work.x;\n\t\tlet y = work.y;\n\t\tif (isNaN(x)) {\n\t\t\tif (isNaN(y)) {\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tx = tx;\n\t\t\t}\n\t\t} else {\n\t\t\tif (isNaN(y)) {\n\t\t\t\ty = ty;\n\t\t\t}\n\t\t}\n\n\t\t// (x, y) = (tx, ty) + normalA * a + normalB * b\n\t\t// dx = x - tx\n\t\t// dy = y - ty\n\t\t// V = ( a, b )^T\n\t\t// D = ( dx, dy )^T\n\t\t// A = | normalA.x normalB.x |\n\t\t// | normalA.y normalB.y |\n\t\t// A V = D\n\t\t// det A = normalA.x * normalB.y - normalB.x * normalA.y\n\t\t// A^-1 = | normalB.y -normalB.x | / det A\n\t\t// | -normalA.y normalA.x |\n\t\tconst detA = normals[0].x * normals[1].y - normals[1].x * normals[0].y;\n\t\tif (EPSILON < Math.abs(detA)) {\n\t\t\tconst dx = x - tx;\n\t\t\tconst dy = y - ty;\n\t\t\tconst distance = Math.abs(dx * dx + dy * dy);\n\t\t\tif (isNaN(result.distance) || distance < result.distance) {\n\t\t\t\tresult.distance = distance;\n\t\t\t\tconst mdx = x - point.x;\n\t\t\t\tconst mdy = y - point.y;\n\t\t\t\tconst mx = (+normals[1].y * mdx - normals[1].x * mdy) / detA;\n\t\t\t\tconst my = (-normals[0].y * mdx + normals[0].x * mdy) / detA;\n\t\t\t\tresult.scale.set(1 + mx / lengths[0], 1 + my / lengths[1]);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected calcScaleSnappedXY(\n\t\ttransform: Matrix,\n\t\tpointO: Point,\n\t\tpointX: Point,\n\t\tpointY: Point,\n\t\tnormals: IPoint[],\n\t\tlengths: number[],\n\t\tresult: ESnapperResultScale\n\t): void {\n\t\tthis.calcScaleSnapped2D(transform, pointO, normals, lengths, result);\n\t\tthis.calcScaleSnappedX(transform, pointY, normals[0], lengths[0], result);\n\t\tthis.calcScaleSnappedY(transform, pointX, normals[1], lengths[1], result);\n\t}\n\n\ttoScaleSnapped(\n\t\ttransform: Matrix,\n\t\tanchor: ESnapperModifierAnchor,\n\t\tkeepRatio: boolean,\n\t\tscale: IPoint\n\t): boolean {\n\t\tif (this._isEnabled) {\n\t\t\tconst points = this._points;\n\t\t\tconst normals = this._normals;\n\t\t\tconst lengths = this._lengths;\n\t\t\tconst work = this._workScaleResult;\n\t\t\twork.distance = NaN;\n\t\t\twork.scale.set(scale.x, scale.y);\n\n\t\t\tswitch (anchor) {\n\t\t\t\tcase ESnapperModifierAnchor.TOP_LEFT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[0],\n\t\t\t\t\t\tpoints[1],\n\t\t\t\t\t\tpoints[3],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_CENTER:\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[0], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[1], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.TOP_RIGHT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[1],\n\t\t\t\t\t\tpoints[0],\n\t\t\t\t\t\tpoints[2],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_LEFT:\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[0], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[3], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.NONE:\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_RIGHT:\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[1], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedX(transform, points[2], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_LEFT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[3],\n\t\t\t\t\t\tpoints[2],\n\t\t\t\t\t\tpoints[0],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_CENTER:\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[2], normals[0], lengths[0], work);\n\t\t\t\t\tthis.calcScaleSnappedY(transform, points[3], normals[0], lengths[0], work);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_RIGHT:\n\t\t\t\t\tthis.calcScaleSnappedXY(\n\t\t\t\t\t\ttransform,\n\t\t\t\t\t\tpoints[2],\n\t\t\t\t\t\tpoints[3],\n\t\t\t\t\t\tpoints[1],\n\t\t\t\t\t\tnormals,\n\t\t\t\t\t\tlengths,\n\t\t\t\t\t\twork\n\t\t\t\t\t);\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif (!isNaN(work.distance)) {\n\t\t\t\tscale.copyFrom(work.scale);\n\t\t\t\tif (keepRatio) {\n\t\t\t\t\tswitch (anchor) {\n\t\t\t\t\t\tcase ESnapperModifierAnchor.TOP_LEFT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.TOP_RIGHT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_LEFT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_RIGHT:\n\t\t\t\t\t\t\tscale.x = scale.y = Math.max(scale.x, scale.y);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ESnapperModifierAnchor.TOP_CENTER:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.BOTTOM_CENTER:\n\t\t\t\t\t\t\tscale.x = scale.y;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_LEFT:\n\t\t\t\t\t\tcase ESnapperModifierAnchor.MIDDLE_RIGHT:\n\t\t\t\t\t\t\tscale.y = scale.x;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase ESnapperModifierAnchor.NONE:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\n\treset(): void {\n\t\tthis.enable = this._isEnabledDefault;\n\t\tthis.target.reset();\n\t\tthis.grid.reset();\n\t}\n\n\tserialize(): DDiagramSerializedSnap {\n\t\treturn [this._isEnabled ? 1 : 0, this.target.serialize(), this.grid.serialize()];\n\t}\n\n\tdeserialize(serialized: DDiagramSerializedSnap): void {\n\t\tthis.enable = !!serialized[0];\n\t\tthis.target.deserialize(serialized[1]);\n\t\tthis.grid.deserialize(serialized[2]);\n\t}\n}\n"]}
@@ -17,9 +17,11 @@ var newShadow = function (id, radius, opacity) {
17
17
  DThemeDarkAtlas.add(id, d, d, "<g>" +
18
18
  "<defs>" +
19
19
  "<radialGradient id=\"".concat(id, "_filter\">") +
20
- "<stop offset=\"25%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-1), "\" />") +
21
- "<stop offset=\"50%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-2), "\" />") +
22
- "<stop offset=\"75%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-3), "\" />") +
20
+ "<stop offset=\"0%\" stop-color=\"black\" stop-opacity=\"".concat(opacity, "\" />") +
21
+ "<stop offset=\"20%\" stop-color=\"black\" stop-opacity=\"".concat(opacity, "\" />") +
22
+ "<stop offset=\"40%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.368, "\" />") +
23
+ "<stop offset=\"60%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.135, "\" />") +
24
+ "<stop offset=\"80%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.050, "\" />") +
23
25
  "<stop offset=\"100%\" stop-color=\"black\" stop-opacity=\"0\" />" +
24
26
  "</radialGradient>" +
25
27
  "</defs>" +
@@ -27,8 +29,8 @@ var newShadow = function (id, radius, opacity) {
27
29
  "</g>");
28
30
  /* eslint-enable prettier/prettier */
29
31
  };
30
- newShadow("shadow_weak", 12, 1);
31
- newShadow("shadow", 24, 1);
32
+ newShadow("shadow_weak", 12, 0.36);
33
+ newShadow("shadow", 24, 0.36);
32
34
  /* eslint-disable prettier/prettier */
33
35
  DThemeDarkAtlas.add("background", 16, 16, "<g>" +
34
36
  "<defs>" +
@@ -1 +1 @@
1
- {"version":3,"file":"d-theme-dark-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/dark/d-theme-dark-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,W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GAAT,UAAU,KAAoB;QAC7B,OAAO,EAAE,CAAC;IACX,CAAC;IACF,qBAAC;AAAD,CAAC,AA3ID,CAAoC,cAAc,GA2IjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Texture } from \"pixi.js\";\nimport { DThemeBase } from \"../../d-base\";\nimport { DBaseInteractive } from \"../../d-base-interactive\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DBorderMask } from \"../../d-border-mask\";\nimport { DCoordinatePosition, DCoordinateSize } from \"../../d-coordinate\";\nimport { DCornerMask } from \"../../d-corner-mask\";\nimport { DLayoutClearType } from \"../../d-layout-clear-type\";\nimport { DShadow } from \"../../d-shadow\";\nimport { DShadowImpl } from \"../../d-shadow-impl\";\nimport { DThemeDarkAtlas } from \"./d-theme-dark-atlas\";\nimport { DThemeDarkConstants } from \"./d-theme-dark-constants\";\nimport { DThemeDarkFont } from \"./d-theme-dark-font\";\n\nconst newShadow = (id: string, radius: number, opacity: number): void => {\n\tconst d = radius * 2;\n\t/* eslint-disable prettier/prettier */\n\tDThemeDarkAtlas.add(id, d, d,\n\t\t`<g>` +\n\t\t\t`<defs>` +\n\t\t\t\t`<radialGradient id=\"${id}_filter\">` +\n\t\t\t\t\t`<stop offset=\"25%\" stop-color=\"black\" stop-opacity=\"${opacity * Math.exp(-1)}\" />` +\n\t\t\t\t\t`<stop offset=\"50%\" stop-color=\"black\" stop-opacity=\"${opacity * Math.exp(-2)}\" />` +\n\t\t\t\t\t`<stop offset=\"75%\" stop-color=\"black\" stop-opacity=\"${opacity * Math.exp(-3)}\" />` +\n\t\t\t\t\t`<stop offset=\"100%\" stop-color=\"black\" stop-opacity=\"0\" />` +\n\t\t\t\t`</radialGradient>` +\n\t\t\t`</defs>` +\n\t\t\t`<rect x=\"0\" y=\"0\" width=\"${d}\" height=\"${d}\" fill=\"url(#${id}_filter)\"/>` +\n\t\t`</g>`\n\t);\n\t/* eslint-enable prettier/prettier */\n};\nnewShadow(\"shadow_weak\", 12, 1);\nnewShadow(\"shadow\", 24, 1);\n\n/* eslint-disable prettier/prettier */\nDThemeDarkAtlas.add(\"background\", 16, 16,\n\t`<g>` +\n\t\t`<defs>` +\n\t\t\t`<radialGradient id=\"background_filter\">` +\n\t\t\t\t`<stop offset=\"25%\" stop-color=\"white\" stop-opacity=\"1\" />` +\n\t\t\t\t`<stop offset=\"75%\" stop-color=\"white\" stop-opacity=\"0.25\" />` +\n\t\t\t`</radialGradient>` +\n\t\t`</defs>` +\n\t\t`<rect x=\"0\" y=\"0\" width=\"16\" height=\"16\" fill=\"url(#background_filter)\"/>` +\n\t`</g>`\n);\n/* eslint-enable prettier/prettier */\n\nexport class DThemeDarkBase extends DThemeDarkFont implements DThemeBase {\n\tgetX(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetBackgroundColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBackgroundAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBackgroundTexture(): Texture {\n\t\treturn DThemeDarkAtlas.mappings.background;\n\t}\n\n\tgetBorderColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBorderAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetBorderMask(state: DBaseStateSet): number {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetBorderTexture(): Texture {\n\t\treturn DThemeDarkAtlas.mappings.background;\n\t}\n\n\tgetPaddingLeft(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingRight(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingTop(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingBottom(): number {\n\t\treturn 0;\n\t}\n\n\tgetCornerRadius(): number {\n\t\treturn 3;\n\t}\n\n\tgetCornerMask(): number {\n\t\treturn DCornerMask.NONE;\n\t}\n\n\tgetOutlineColor(state: DBaseStateSet): number | null {\n\t\treturn DThemeDarkConstants.HIGHLIGHT_COLOR;\n\t}\n\n\tgetOutlineAlpha(state: DBaseStateSet): number {\n\t\tif (state.isFocused) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tgetOutlineWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetOutlineOffset(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineMask(state: DBaseStateSet): DBorderMask {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetClearType(): DLayoutClearType {\n\t\treturn DLayoutClearType.NONE;\n\t}\n\n\tgetShadow(): DShadow | null {\n\t\treturn null;\n\t}\n\n\tgetInteractive(): DBaseInteractive {\n\t\treturn DBaseInteractive.SELF;\n\t}\n\n\tnewState(state: DBaseStateSet): void {\n\t\t// DO NOTHING\n\t}\n\n\tgetTitle(): string {\n\t\treturn \"\";\n\t}\n\n\tgetWeight(): number {\n\t\treturn -1;\n\t}\n\n\tnewShadow(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeDarkAtlas.mappings.shadow, 24, 24, 0, 9.6);\n\t}\n\n\tnewShadowWeak(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeDarkAtlas.mappings.shadow_weak, 12, 8, 0, 4.8);\n\t}\n\n\tgetCursor(state: DBaseStateSet): string {\n\t\treturn \"\";\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-theme-dark-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/d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E,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7E,CAAC;IAED,kCAAS,GAAT,UAAU,KAAoB;QAC7B,OAAO,EAAE,CAAC;IACX,CAAC;IACF,qBAAC;AAAD,CAAC,AA3ID,CAAoC,cAAc,GA2IjD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Texture } from \"pixi.js\";\nimport { DThemeBase } from \"../../d-base\";\nimport { DBaseInteractive } from \"../../d-base-interactive\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DBorderMask } from \"../../d-border-mask\";\nimport { DCoordinatePosition, DCoordinateSize } from \"../../d-coordinate\";\nimport { DCornerMask } from \"../../d-corner-mask\";\nimport { DLayoutClearType } from \"../../d-layout-clear-type\";\nimport { DShadow } from \"../../d-shadow\";\nimport { DShadowImpl } from \"../../d-shadow-impl\";\nimport { DThemeDarkAtlas } from \"./d-theme-dark-atlas\";\nimport { DThemeDarkConstants } from \"./d-theme-dark-constants\";\nimport { DThemeDarkFont } from \"./d-theme-dark-font\";\n\nconst newShadow = (id: string, radius: number, opacity: number): void => {\n\tconst d = radius * 2;\n\t/* eslint-disable prettier/prettier */\n\tDThemeDarkAtlas.add(id, d, d,\n\t\t`<g>` +\n\t\t\t`<defs>` +\n\t\t\t\t`<radialGradient id=\"${id}_filter\">` +\n\t\t\t\t\t`<stop offset=\"0%\" stop-color=\"black\" stop-opacity=\"${opacity}\" />` +\n\t\t\t\t\t`<stop offset=\"20%\" stop-color=\"black\" stop-opacity=\"${opacity}\" />` +\n\t\t\t\t\t`<stop offset=\"40%\" stop-color=\"black\" stop-opacity=\"${opacity * 0.368}\" />` +\n\t\t\t\t\t`<stop offset=\"60%\" stop-color=\"black\" stop-opacity=\"${opacity * 0.135}\" />` +\n\t\t\t\t\t`<stop offset=\"80%\" stop-color=\"black\" stop-opacity=\"${opacity * 0.050}\" />` +\n\t\t\t\t\t`<stop offset=\"100%\" stop-color=\"black\" stop-opacity=\"0\" />` +\n\t\t\t\t`</radialGradient>` +\n\t\t\t`</defs>` +\n\t\t\t`<rect x=\"0\" y=\"0\" width=\"${d}\" height=\"${d}\" fill=\"url(#${id}_filter)\"/>` +\n\t\t`</g>`\n\t);\n\t/* eslint-enable prettier/prettier */\n};\nnewShadow(\"shadow_weak\", 12, 0.36);\nnewShadow(\"shadow\", 24, 0.36);\n\n/* eslint-disable prettier/prettier */\nDThemeDarkAtlas.add(\"background\", 16, 16,\n\t`<g>` +\n\t\t`<defs>` +\n\t\t\t`<radialGradient id=\"background_filter\">` +\n\t\t\t\t`<stop offset=\"25%\" stop-color=\"white\" stop-opacity=\"1\" />` +\n\t\t\t\t`<stop offset=\"75%\" stop-color=\"white\" stop-opacity=\"0.25\" />` +\n\t\t\t`</radialGradient>` +\n\t\t`</defs>` +\n\t\t`<rect x=\"0\" y=\"0\" width=\"16\" height=\"16\" fill=\"url(#background_filter)\"/>` +\n\t`</g>`\n);\n/* eslint-enable prettier/prettier */\n\nexport class DThemeDarkBase extends DThemeDarkFont implements DThemeBase {\n\tgetX(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetBackgroundColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBackgroundAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBackgroundTexture(): Texture {\n\t\treturn DThemeDarkAtlas.mappings.background;\n\t}\n\n\tgetBorderColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBorderAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetBorderMask(state: DBaseStateSet): number {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetBorderTexture(): Texture {\n\t\treturn DThemeDarkAtlas.mappings.background;\n\t}\n\n\tgetPaddingLeft(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingRight(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingTop(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingBottom(): number {\n\t\treturn 0;\n\t}\n\n\tgetCornerRadius(): number {\n\t\treturn 3;\n\t}\n\n\tgetCornerMask(): number {\n\t\treturn DCornerMask.NONE;\n\t}\n\n\tgetOutlineColor(state: DBaseStateSet): number | null {\n\t\treturn DThemeDarkConstants.HIGHLIGHT_COLOR;\n\t}\n\n\tgetOutlineAlpha(state: DBaseStateSet): number {\n\t\tif (state.isFocused) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tgetOutlineWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetOutlineOffset(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineMask(state: DBaseStateSet): DBorderMask {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetClearType(): DLayoutClearType {\n\t\treturn DLayoutClearType.NONE;\n\t}\n\n\tgetShadow(): DShadow | null {\n\t\treturn null;\n\t}\n\n\tgetInteractive(): DBaseInteractive {\n\t\treturn DBaseInteractive.SELF;\n\t}\n\n\tnewState(state: DBaseStateSet): void {\n\t\t// DO NOTHING\n\t}\n\n\tgetTitle(): string {\n\t\treturn \"\";\n\t}\n\n\tgetWeight(): number {\n\t\treturn -1;\n\t}\n\n\tnewShadow(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeDarkAtlas.mappings.shadow, 24, 24, 0, 9.6);\n\t}\n\n\tnewShadowWeak(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeDarkAtlas.mappings.shadow_weak, 12, 8, 0, 4.8);\n\t}\n\n\tgetCursor(state: DBaseStateSet): string {\n\t\treturn \"\";\n\t}\n}\n"]}
@@ -18,9 +18,10 @@ var newShadow = function (id, radius, opacity) {
18
18
  "<defs>" +
19
19
  "<radialGradient id=\"".concat(id, "_filter\">") +
20
20
  "<stop offset=\"0%\" stop-color=\"black\" stop-opacity=\"".concat(opacity, "\" />") +
21
- "<stop offset=\"25%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-1), "\" />") +
22
- "<stop offset=\"50%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-2), "\" />") +
23
- "<stop offset=\"75%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-3), "\" />") +
21
+ "<stop offset=\"20%\" stop-color=\"black\" stop-opacity=\"".concat(opacity, "\" />") +
22
+ "<stop offset=\"40%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.368, "\" />") +
23
+ "<stop offset=\"60%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.135, "\" />") +
24
+ "<stop offset=\"80%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.050, "\" />") +
24
25
  "<stop offset=\"100%\" stop-color=\"black\" stop-opacity=\"0\" />" +
25
26
  "</radialGradient>" +
26
27
  "</defs>" +
@@ -28,8 +29,8 @@ var newShadow = function (id, radius, opacity) {
28
29
  "</g>");
29
30
  /* eslint-enable prettier/prettier */
30
31
  };
31
- newShadow("shadow_weak", 12, 0.4);
32
- newShadow("shadow", 24, 0.4);
32
+ newShadow("shadow_weak", 12, 0.15);
33
+ newShadow("shadow", 24, 0.15);
33
34
  /* eslint-disable prettier/prettier */
34
35
  DThemeWhiteAtlas.add("background", 16, 16, "<g>" +
35
36
  "<defs>" +
@@ -1 +1 @@
1
- {"version":3,"file":"d-theme-white-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/white/d-theme-white-base.ts"],"names":[],"mapp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AI,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC/E,CAAC;IAED,mCAAS,GAAT,UAAU,KAAoB;QAC7B,OAAO,EAAE,CAAC;IACX,CAAC;IACF,sBAAC;AAAD,CAAC,AA3ID,CAAqC,eAAe,GA2InD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Texture } from \"pixi.js\";\nimport { DThemeBase } from \"../../d-base\";\nimport { DBaseInteractive } from \"../../d-base-interactive\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DBorderMask } from \"../../d-border-mask\";\nimport { DCoordinatePosition, DCoordinateSize } from \"../../d-coordinate\";\nimport { DCornerMask } from \"../../d-corner-mask\";\nimport { DLayoutClearType } from \"../../d-layout-clear-type\";\nimport { DShadow } from \"../../d-shadow\";\nimport { DShadowImpl } from \"../../d-shadow-impl\";\nimport { DThemeWhiteAtlas } from \"./d-theme-white-atlas\";\nimport { DThemeWhiteConstants } from \"./d-theme-white-constants\";\nimport { DThemeWhiteFont } from \"./d-theme-white-font\";\n\nconst newShadow = (id: string, radius: number, opacity: number): void => {\n\tconst d = radius * 2;\n\t/* eslint-disable prettier/prettier */\n\tDThemeWhiteAtlas.add(id, d, d,\n\t\t`<g>` +\n\t\t\t`<defs>` +\n\t\t\t\t`<radialGradient id=\"${id}_filter\">` +\n\t\t\t\t\t`<stop offset=\"0%\" stop-color=\"black\" stop-opacity=\"${opacity}\" />` +\n\t\t\t\t\t`<stop offset=\"25%\" stop-color=\"black\" stop-opacity=\"${opacity * Math.exp(-1)}\" />` +\n\t\t\t\t\t`<stop offset=\"50%\" stop-color=\"black\" stop-opacity=\"${opacity * Math.exp(-2)}\" />` +\n\t\t\t\t\t`<stop offset=\"75%\" stop-color=\"black\" stop-opacity=\"${opacity * Math.exp(-3)}\" />` +\n\t\t\t\t\t`<stop offset=\"100%\" stop-color=\"black\" stop-opacity=\"0\" />` +\n\t\t\t\t`</radialGradient>` +\n\t\t\t`</defs>` +\n\t\t\t`<rect x=\"0\" y=\"0\" width=\"${d}\" height=\"${d}\" fill=\"url(#${id}_filter)\"/>` +\n\t\t`</g>`\n\t);\n\t/* eslint-enable prettier/prettier */\n};\nnewShadow(\"shadow_weak\", 12, 0.4);\nnewShadow(\"shadow\", 24, 0.4);\n\n/* eslint-disable prettier/prettier */\nDThemeWhiteAtlas.add(\"background\", 16, 16,\n\t`<g>` +\n\t\t`<defs>` +\n\t\t\t`<radialGradient id=\"234sfdhjfpijsrnsedsd435jseflkm\">` +\n\t\t\t\t`<stop offset=\"25%\" stop-color=\"white\" stop-opacity=\"1\" />` +\n\t\t\t\t`<stop offset=\"75%\" stop-color=\"white\" stop-opacity=\"0.25\" />` +\n\t\t\t`</radialGradient>` +\n\t\t`</defs>` +\n\t\t`<rect x=\"0\" y=\"0\" width=\"16\" height=\"16\" fill=\"url(#234sfdhjfpijsrnsedsd435jseflkm)\"/>` +\n\t`</g>`\n);\n/* eslint-enable prettier/prettier */\n\nexport class DThemeWhiteBase extends DThemeWhiteFont implements DThemeBase {\n\tgetX(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetBackgroundColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBackgroundAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBackgroundTexture(): Texture {\n\t\treturn DThemeWhiteAtlas.mappings.background;\n\t}\n\n\tgetBorderColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBorderAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetBorderMask(state: DBaseStateSet): number {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetBorderTexture(): Texture {\n\t\treturn DThemeWhiteAtlas.mappings.background;\n\t}\n\n\tgetPaddingLeft(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingRight(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingTop(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingBottom(): number {\n\t\treturn 0;\n\t}\n\n\tgetCornerRadius(): number {\n\t\treturn 3;\n\t}\n\n\tgetCornerMask(): number {\n\t\treturn DCornerMask.NONE;\n\t}\n\n\tgetOutlineColor(state: DBaseStateSet): number | null {\n\t\treturn DThemeWhiteConstants.HIGHLIGHT_COLOR;\n\t}\n\n\tgetOutlineAlpha(state: DBaseStateSet): number {\n\t\tif (state.isFocused) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tgetOutlineWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetOutlineOffset(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineMask(state: DBaseStateSet): DBorderMask {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetClearType(): DLayoutClearType {\n\t\treturn DLayoutClearType.NONE;\n\t}\n\n\tgetShadow(): DShadow | null {\n\t\treturn null;\n\t}\n\n\tgetInteractive(): DBaseInteractive {\n\t\treturn DBaseInteractive.SELF;\n\t}\n\n\tnewState(state: DBaseStateSet): void {\n\t\t// DO NOTHING\n\t}\n\n\tgetTitle(): string {\n\t\treturn \"\";\n\t}\n\n\tgetWeight(): number {\n\t\treturn -1;\n\t}\n\n\tnewShadow(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeWhiteAtlas.mappings.shadow, 24, 24, 0, 9.6);\n\t}\n\n\tnewShadowWeak(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeWhiteAtlas.mappings.shadow_weak, 12, 12, 0, 4.8);\n\t}\n\n\tgetCursor(state: DBaseStateSet): string {\n\t\treturn \"\";\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-theme-white-base.js","sourceRoot":"","sources":["../../../../../src/main/typescript/wcardinal/ui/theme/white/d-theme-white-base.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,IAAM,SAAS,GAAG,UAAC,EAAU,EAAE,MAAc,EAAE,OAAe;IAC7D,IAAM,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC;IACrB,sCAAsC;IACtC,gBAAgB,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAC5B,KAAK;QACJ,QAAQ;QACP,+BAAuB,EAAE,eAAW;QACnC,kEAAsD,OAAO,UAAM;QACnE,mEAAuD,OAAO,UAAM;QACpE,mEAAuD,OAAO,GAAG,KAAK,UAAM;QAC5E,mEAAuD,OAAO,GAAG,KAAK,UAAM;QAC5E,mEAAuD,OAAO,GAAG,KAAK,UAAM;QAC5E,kEAA4D;QAC7D,mBAAmB;QACpB,SAAS;QACT,wCAA4B,CAAC,yBAAa,CAAC,4BAAgB,EAAE,iBAAa;QAC3E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C,CAAC;IACX,CAAC;IAED,mCAAS,GAAT;QACC,OAAO,IAAI,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC1E,CAAC;IAED,uCAAa,GAAb;QACC,OAAO,IAAI,WAAW,CAAC,gBAAgB,CAAC,QAAQ,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC/E,CAAC;IAED,mCAAS,GAAT,UAAU,KAAoB;QAC7B,OAAO,EAAE,CAAC;IACX,CAAC;IACF,sBAAC;AAAD,CAAC,AA3ID,CAAqC,eAAe,GA2InD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Texture } from \"pixi.js\";\nimport { DThemeBase } from \"../../d-base\";\nimport { DBaseInteractive } from \"../../d-base-interactive\";\nimport { DBaseStateSet } from \"../../d-base-state-set\";\nimport { DBorderMask } from \"../../d-border-mask\";\nimport { DCoordinatePosition, DCoordinateSize } from \"../../d-coordinate\";\nimport { DCornerMask } from \"../../d-corner-mask\";\nimport { DLayoutClearType } from \"../../d-layout-clear-type\";\nimport { DShadow } from \"../../d-shadow\";\nimport { DShadowImpl } from \"../../d-shadow-impl\";\nimport { DThemeWhiteAtlas } from \"./d-theme-white-atlas\";\nimport { DThemeWhiteConstants } from \"./d-theme-white-constants\";\nimport { DThemeWhiteFont } from \"./d-theme-white-font\";\n\nconst newShadow = (id: string, radius: number, opacity: number): void => {\n\tconst d = radius * 2;\n\t/* eslint-disable prettier/prettier */\n\tDThemeWhiteAtlas.add(id, d, d,\n\t\t`<g>` +\n\t\t\t`<defs>` +\n\t\t\t\t`<radialGradient id=\"${id}_filter\">` +\n\t\t\t\t\t`<stop offset=\"0%\" stop-color=\"black\" stop-opacity=\"${opacity}\" />` +\n\t\t\t\t\t`<stop offset=\"20%\" stop-color=\"black\" stop-opacity=\"${opacity}\" />` +\n\t\t\t\t\t`<stop offset=\"40%\" stop-color=\"black\" stop-opacity=\"${opacity * 0.368}\" />` +\n\t\t\t\t\t`<stop offset=\"60%\" stop-color=\"black\" stop-opacity=\"${opacity * 0.135}\" />` +\n\t\t\t\t\t`<stop offset=\"80%\" stop-color=\"black\" stop-opacity=\"${opacity * 0.050}\" />` +\n\t\t\t\t\t`<stop offset=\"100%\" stop-color=\"black\" stop-opacity=\"0\" />` +\n\t\t\t\t`</radialGradient>` +\n\t\t\t`</defs>` +\n\t\t\t`<rect x=\"0\" y=\"0\" width=\"${d}\" height=\"${d}\" fill=\"url(#${id}_filter)\"/>` +\n\t\t`</g>`\n\t);\n\t/* eslint-enable prettier/prettier */\n};\nnewShadow(\"shadow_weak\", 12, 0.15);\nnewShadow(\"shadow\", 24, 0.15);\n\n/* eslint-disable prettier/prettier */\nDThemeWhiteAtlas.add(\"background\", 16, 16,\n\t`<g>` +\n\t\t`<defs>` +\n\t\t\t`<radialGradient id=\"234sfdhjfpijsrnsedsd435jseflkm\">` +\n\t\t\t\t`<stop offset=\"25%\" stop-color=\"white\" stop-opacity=\"1\" />` +\n\t\t\t\t`<stop offset=\"75%\" stop-color=\"white\" stop-opacity=\"0.25\" />` +\n\t\t\t`</radialGradient>` +\n\t\t`</defs>` +\n\t\t`<rect x=\"0\" y=\"0\" width=\"16\" height=\"16\" fill=\"url(#234sfdhjfpijsrnsedsd435jseflkm)\"/>` +\n\t`</g>`\n);\n/* eslint-enable prettier/prettier */\n\nexport class DThemeWhiteBase extends DThemeWhiteFont implements DThemeBase {\n\tgetX(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetY(): DCoordinatePosition {\n\t\treturn 0;\n\t}\n\n\tgetHeight(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetWidth(): DCoordinateSize {\n\t\treturn 100;\n\t}\n\n\tgetBackgroundColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBackgroundAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBackgroundTexture(): Texture {\n\t\treturn DThemeWhiteAtlas.mappings.background;\n\t}\n\n\tgetBorderColor(state: DBaseStateSet): number | null {\n\t\treturn null;\n\t}\n\n\tgetBorderAlpha(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetBorderAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetBorderMask(state: DBaseStateSet): number {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetBorderTexture(): Texture {\n\t\treturn DThemeWhiteAtlas.mappings.background;\n\t}\n\n\tgetPaddingLeft(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingRight(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingTop(): number {\n\t\treturn 0;\n\t}\n\n\tgetPaddingBottom(): number {\n\t\treturn 0;\n\t}\n\n\tgetCornerRadius(): number {\n\t\treturn 3;\n\t}\n\n\tgetCornerMask(): number {\n\t\treturn DCornerMask.NONE;\n\t}\n\n\tgetOutlineColor(state: DBaseStateSet): number | null {\n\t\treturn DThemeWhiteConstants.HIGHLIGHT_COLOR;\n\t}\n\n\tgetOutlineAlpha(state: DBaseStateSet): number {\n\t\tif (state.isFocused) {\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}\n\n\tgetOutlineWidth(state: DBaseStateSet): number {\n\t\treturn 1;\n\t}\n\n\tgetOutlineOffset(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineAlign(state: DBaseStateSet): number {\n\t\treturn 0;\n\t}\n\n\tgetOutlineMask(state: DBaseStateSet): DBorderMask {\n\t\treturn DBorderMask.NONE;\n\t}\n\n\tgetClearType(): DLayoutClearType {\n\t\treturn DLayoutClearType.NONE;\n\t}\n\n\tgetShadow(): DShadow | null {\n\t\treturn null;\n\t}\n\n\tgetInteractive(): DBaseInteractive {\n\t\treturn DBaseInteractive.SELF;\n\t}\n\n\tnewState(state: DBaseStateSet): void {\n\t\t// DO NOTHING\n\t}\n\n\tgetTitle(): string {\n\t\treturn \"\";\n\t}\n\n\tgetWeight(): number {\n\t\treturn -1;\n\t}\n\n\tnewShadow(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeWhiteAtlas.mappings.shadow, 24, 24, 0, 9.6);\n\t}\n\n\tnewShadowWeak(): DShadow | null {\n\t\treturn new DShadowImpl(DThemeWhiteAtlas.mappings.shadow_weak, 12, 12, 0, 4.8);\n\t}\n\n\tgetCursor(state: DBaseStateSet): string {\n\t\treturn \"\";\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.267.0
2
+ Winter Cardinal UI v0.269.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -195,9 +195,11 @@
195
195
  DThemeDarkAtlas.add(id, d, d, "<g>" +
196
196
  "<defs>" +
197
197
  "<radialGradient id=\"".concat(id, "_filter\">") +
198
- "<stop offset=\"25%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-1), "\" />") +
199
- "<stop offset=\"50%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-2), "\" />") +
200
- "<stop offset=\"75%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * Math.exp(-3), "\" />") +
198
+ "<stop offset=\"0%\" stop-color=\"black\" stop-opacity=\"".concat(opacity, "\" />") +
199
+ "<stop offset=\"20%\" stop-color=\"black\" stop-opacity=\"".concat(opacity, "\" />") +
200
+ "<stop offset=\"40%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.368, "\" />") +
201
+ "<stop offset=\"60%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.135, "\" />") +
202
+ "<stop offset=\"80%\" stop-color=\"black\" stop-opacity=\"".concat(opacity * 0.050, "\" />") +
201
203
  "<stop offset=\"100%\" stop-color=\"black\" stop-opacity=\"0\" />" +
202
204
  "</radialGradient>" +
203
205
  "</defs>" +
@@ -205,8 +207,8 @@
205
207
  "</g>");
206
208
  /* eslint-enable prettier/prettier */
207
209
  };
208
- newShadow("shadow_weak", 12, 1);
209
- newShadow("shadow", 24, 1);
210
+ newShadow("shadow_weak", 12, 0.36);
211
+ newShadow("shadow", 24, 0.36);
210
212
  /* eslint-disable prettier/prettier */
211
213
  DThemeDarkAtlas.add("background", 16, 16, "<g>" +
212
214
  "<defs>" +