@wcardinal/wcardinal-ui 0.403.0 → 0.404.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.
@@ -2,6 +2,9 @@ import { Graphics, Renderer } from "pixi.js";
2
2
  import { DBase } from "./d-base";
3
3
  import { DBaseReflowable } from "./d-base-reflowable";
4
4
  export declare class DBaseOverflowMaskSimple extends Graphics implements DBaseReflowable {
5
+ protected _isInitialized: boolean;
6
+ protected _width: number;
7
+ protected _height: number;
5
8
  constructor(parent: DBase);
6
9
  render(renderer: Renderer): void;
7
10
  onReflow(base: DBase, width: number, height: number): void;
@@ -1,7 +1,13 @@
1
1
  import { Graphics, Renderer } from "pixi.js";
2
2
  import { DBase } from "./d-base";
3
3
  import { DBaseReflowable } from "./d-base-reflowable";
4
+ import { DCornerMask } from "./d-corner-mask";
4
5
  export declare class DBaseOverflowMask extends Graphics implements DBaseReflowable {
6
+ protected _isInitialized: boolean;
7
+ protected _width: number;
8
+ protected _height: number;
9
+ protected _cornderRadius: number;
10
+ protected _cornerMask: DCornerMask;
5
11
  constructor(parent: DBase);
6
12
  render(renderer: Renderer): void;
7
13
  onReflow(base: DBase, width: number, height: number): void;
@@ -9,6 +9,9 @@ var DBaseOverflowMaskSimple = /** @class */ (function (_super) {
9
9
  function DBaseOverflowMaskSimple(parent) {
10
10
  var _this = _super.call(this) || this;
11
11
  _this.parent = parent;
12
+ _this._isInitialized = false;
13
+ _this._width = _this.width;
14
+ _this._height = _this.height;
12
15
  return _this;
13
16
  }
14
17
  DBaseOverflowMaskSimple.prototype.render = function (renderer) {
@@ -16,6 +19,12 @@ var DBaseOverflowMaskSimple = /** @class */ (function (_super) {
16
19
  _super.prototype.render.call(this, renderer);
17
20
  };
18
21
  DBaseOverflowMaskSimple.prototype.onReflow = function (base, width, height) {
22
+ if (this._isInitialized && this._width === width && this._height === height) {
23
+ return;
24
+ }
25
+ this._isInitialized = true;
26
+ this._width = width;
27
+ this._height = height;
19
28
  this.clear();
20
29
  this.beginFill(0xffffff, 1);
21
30
  this.drawRect(0, 0, width, height);
@@ -1 +1 @@
1
- {"version":3,"file":"d-base-overflow-mask-simple.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-base-overflow-mask-simple.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,QAAQ,EAAY,MAAM,SAAS,CAAC;AAI7C;IAA6C,2CAAQ;IACpD,iCAAY,MAAa;QAAzB,YACC,iBAAO,SAEP;QADC,KAAY,CAAC,MAAM,GAAG,MAAM,CAAC;;IAC/B,CAAC;IAED,wCAAM,GAAN,UAAO,QAAkB;QACxB,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,iBAAM,MAAM,YAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IAED,0CAAQ,GAAR,UAAS,IAAW,EAAE,KAAa,EAAE,MAAc;QAClD,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACF,8BAAC;AAAD,CAAC,AAjBD,CAA6C,QAAQ,GAiBpD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Graphics, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseReflowable } from \"./d-base-reflowable\";\n\nexport class DBaseOverflowMaskSimple extends Graphics implements DBaseReflowable {\n\tconstructor(parent: DBase) {\n\t\tsuper();\n\t\t(this as any).parent = parent;\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tthis.updateTransform();\n\t\tsuper.render(renderer);\n\t}\n\n\tonReflow(base: DBase, width: number, height: number): void {\n\t\tthis.clear();\n\t\tthis.beginFill(0xffffff, 1);\n\t\tthis.drawRect(0, 0, width, height);\n\t\tthis.endFill();\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-base-overflow-mask-simple.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-base-overflow-mask-simple.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,QAAQ,EAAY,MAAM,SAAS,CAAC;AAI7C;IAA6C,2CAAQ;IAKpD,iCAAY,MAAa;QAAzB,YACC,iBAAO,SAMP;QALA,KAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QAErB,KAAI,CAAC,cAAc,GAAG,KAAK,CAAC;QAC5B,KAAI,CAAC,MAAM,GAAG,KAAI,CAAC,KAAK,CAAC;QACzB,KAAI,CAAC,OAAO,GAAG,KAAI,CAAC,MAAM,CAAC;;IAC5B,CAAC;IAED,wCAAM,GAAN,UAAO,QAAkB;QACxB,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,iBAAM,MAAM,YAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IAED,0CAAQ,GAAR,UAAS,IAAW,EAAE,KAAa,EAAE,MAAc;QAClD,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,MAAM,KAAK,KAAK,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM,EAAE;YAC5E,OAAO;SACP;QACD,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;QAEtB,IAAI,CAAC,KAAK,EAAE,CAAC;QACb,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACF,8BAAC;AAAD,CAAC,AAhCD,CAA6C,QAAQ,GAgCpD","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Graphics, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseReflowable } from \"./d-base-reflowable\";\n\nexport class DBaseOverflowMaskSimple extends Graphics implements DBaseReflowable {\n\tprotected _isInitialized: boolean;\n\tprotected _width: number;\n\tprotected _height: number;\n\n\tconstructor(parent: DBase) {\n\t\tsuper();\n\t\tthis.parent = parent;\n\n\t\tthis._isInitialized = false;\n\t\tthis._width = this.width;\n\t\tthis._height = this.height;\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tthis.updateTransform();\n\t\tsuper.render(renderer);\n\t}\n\n\tonReflow(base: DBase, width: number, height: number): void {\n\t\tif (this._isInitialized && this._width === width && this._height === height) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isInitialized = true;\n\t\tthis._width = width;\n\t\tthis._height = height;\n\n\t\tthis.clear();\n\t\tthis.beginFill(0xffffff, 1);\n\t\tthis.drawRect(0, 0, width, height);\n\t\tthis.endFill();\n\t}\n}\n"]}
@@ -10,6 +10,11 @@ var DBaseOverflowMask = /** @class */ (function (_super) {
10
10
  function DBaseOverflowMask(parent) {
11
11
  var _this = _super.call(this) || this;
12
12
  _this.parent = parent;
13
+ _this._isInitialized = false;
14
+ _this._width = 0;
15
+ _this._height = 0;
16
+ _this._cornderRadius = 0;
17
+ _this._cornerMask = DCornerMask.NONE;
13
18
  return _this;
14
19
  }
15
20
  DBaseOverflowMask.prototype.render = function (renderer) {
@@ -17,11 +22,23 @@ var DBaseOverflowMask = /** @class */ (function (_super) {
17
22
  _super.prototype.render.call(this, renderer);
18
23
  };
19
24
  DBaseOverflowMask.prototype.onReflow = function (base, width, height) {
20
- var x = 0;
21
- var y = 0;
22
25
  var corner = base.corner;
23
26
  var cornerRadius = Math.max(0, corner.getRadius() - 0.5);
24
27
  var cornerMask = corner.getMask();
28
+ if (this._isInitialized &&
29
+ this._width === width &&
30
+ this._height === height &&
31
+ this._cornderRadius === cornerRadius &&
32
+ this._cornerMask === cornerMask) {
33
+ return;
34
+ }
35
+ this._isInitialized = true;
36
+ this._width = width;
37
+ this._height = height;
38
+ this._cornderRadius = cornerRadius;
39
+ this._cornerMask = cornerMask;
40
+ var x = 0;
41
+ var y = 0;
25
42
  var tl = cornerMask & DCornerMask.TOP_LEFT ? 0 : cornerRadius;
26
43
  var tr = cornerMask & DCornerMask.TOP_RIGHT ? 0 : cornerRadius;
27
44
  var bl = cornerMask & DCornerMask.BOTTOM_LEFT ? 0 : cornerRadius;
@@ -1 +1 @@
1
- {"version":3,"file":"d-base-overflow-mask.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-base-overflow-mask.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,QAAQ,EAAY,MAAM,SAAS,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;IAAuC,qCAAQ;IAC9C,2BAAY,MAAa;QAAzB,YACC,iBAAO,SAEP;QADC,KAAY,CAAC,MAAM,GAAG,MAAM,CAAC;;IAC/B,CAAC;IAED,kCAAM,GAAN,UAAO,QAAkB;QACxB,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,iBAAM,MAAM,YAAC,QAAQ,CAAC,CAAC;IACxB,CAAC;IAED,oCAAQ,GAAR,UAAS,IAAW,EAAE,KAAa,EAAE,MAAc;QAClD,IAAM,CAAC,GAAG,CAAC,CAAC;QACZ,IAAM,CAAC,GAAG,CAAC,CAAC;QACZ,IAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC3B,IAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,SAAS,EAAE,GAAG,GAAG,CAAC,CAAC;QAC3D,IAAM,UAAU,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;QACpC,IAAM,EAAE,GAAG,UAAU,GAAG,WA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AM,EAAE,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;aACrD;iBAAM;gBACN,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;aACnC;YACD,IAAI,CAAC,GAAG,EAAE,EAAE;gBACX,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;aACpC;iBAAM;gBACN,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;aAC3B;YACD,IAAI,CAAC,GAAG,EAAE,EAAE;gBACX,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;aACnC;iBAAM;gBACN,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAClB;SACD;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACF,wBAAC;AAAD,CAAC,AAnDD,CAAuC,QAAQ,GAmD9C","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Graphics, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseReflowable } from \"./d-base-reflowable\";\nimport { DCornerMask } from \"./d-corner-mask\";\n\nexport class DBaseOverflowMask extends Graphics implements DBaseReflowable {\n\tconstructor(parent: DBase) {\n\t\tsuper();\n\t\t(this as any).parent = parent;\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tthis.updateTransform();\n\t\tsuper.render(renderer);\n\t}\n\n\tonReflow(base: DBase, width: number, height: number): void {\n\t\tconst x = 0;\n\t\tconst y = 0;\n\t\tconst corner = base.corner;\n\t\tconst cornerRadius = Math.max(0, corner.getRadius() - 0.5);\n\t\tconst cornerMask = corner.getMask();\n\t\tconst tl = cornerMask & DCornerMask.TOP_LEFT ? 0 : cornerRadius;\n\t\tconst tr = cornerMask & DCornerMask.TOP_RIGHT ? 0 : cornerRadius;\n\t\tconst bl = cornerMask & DCornerMask.BOTTOM_LEFT ? 0 : cornerRadius;\n\t\tconst br = cornerMask & DCornerMask.BOTTOM_RIGHT ? 0 : cornerRadius;\n\t\tthis.clear();\n\t\tthis.beginFill(0xffffff, 1);\n\t\tthis.lineStyle(0, 0, 0, 0, false);\n\t\tif (tl <= 0 && tr <= 0 && bl <= 0 && br <= 0) {\n\t\t\tthis.drawRect(x, y, width, height);\n\t\t} else {\n\t\t\tthis.moveTo(x + tl, y);\n\t\t\tif (0 < tr) {\n\t\t\t\tthis.arcTo(x + width, y, x + width, y + height, tr);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x + width, y);\n\t\t\t}\n\t\t\tif (0 < br) {\n\t\t\t\tthis.arcTo(x + width, y + height, x, y + height, br);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x + width, y + height);\n\t\t\t}\n\t\t\tif (0 < bl) {\n\t\t\t\tthis.arcTo(x, y + height, x, y, bl);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x, y + height);\n\t\t\t}\n\t\t\tif (0 < tl) {\n\t\t\t\tthis.arcTo(x, y, x + width, y, tl);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x, y);\n\t\t\t}\n\t\t}\n\t\tthis.endFill();\n\t}\n}\n"]}
1
+ {"version":3,"file":"d-base-overflow-mask.js","sourceRoot":"","sources":["../../../src/main/typescript/wcardinal/ui/d-base-overflow-mask.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,EAAE,QAAQ,EAAY,MAAM,SAAS,CAAC;AAG7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C;IAAuC,qCAAQ;IAO9C,2BAAY,MAAa;QAAzB,YACC,iBAAO,SAQP;QAPA,KAAI,CAAC,MAAM,GAAG,MA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M;gBACN,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;aACnC;YACD,IAAI,CAAC,GAAG,EAAE,EAAE;gBACX,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;aACpC;iBAAM;gBACN,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC;aAC3B;YACD,IAAI,CAAC,GAAG,EAAE,EAAE;gBACX,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;aACnC;iBAAM;gBACN,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aAClB;SACD;QACD,IAAI,CAAC,OAAO,EAAE,CAAC;IAChB,CAAC;IACF,wBAAC;AAAD,CAAC,AA9ED,CAAuC,QAAQ,GA8E9C","sourcesContent":["/*\n * Copyright (C) 2019 Toshiba Corporation\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport { Graphics, Renderer } from \"pixi.js\";\nimport { DBase } from \"./d-base\";\nimport { DBaseReflowable } from \"./d-base-reflowable\";\nimport { DCornerMask } from \"./d-corner-mask\";\n\nexport class DBaseOverflowMask extends Graphics implements DBaseReflowable {\n\tprotected _isInitialized: boolean;\n\tprotected _width: number;\n\tprotected _height: number;\n\tprotected _cornderRadius: number;\n\tprotected _cornerMask: DCornerMask;\n\n\tconstructor(parent: DBase) {\n\t\tsuper();\n\t\tthis.parent = parent;\n\n\t\tthis._isInitialized = false;\n\t\tthis._width = 0;\n\t\tthis._height = 0;\n\t\tthis._cornderRadius = 0;\n\t\tthis._cornerMask = DCornerMask.NONE;\n\t}\n\n\trender(renderer: Renderer): void {\n\t\tthis.updateTransform();\n\t\tsuper.render(renderer);\n\t}\n\n\tonReflow(base: DBase, width: number, height: number): void {\n\t\tconst corner = base.corner;\n\t\tconst cornerRadius = Math.max(0, corner.getRadius() - 0.5);\n\t\tconst cornerMask = corner.getMask();\n\t\tif (\n\t\t\tthis._isInitialized &&\n\t\t\tthis._width === width &&\n\t\t\tthis._height === height &&\n\t\t\tthis._cornderRadius === cornerRadius &&\n\t\t\tthis._cornerMask === cornerMask\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tthis._isInitialized = true;\n\t\tthis._width = width;\n\t\tthis._height = height;\n\t\tthis._cornderRadius = cornerRadius;\n\t\tthis._cornerMask = cornerMask;\n\n\t\tconst x = 0;\n\t\tconst y = 0;\n\t\tconst tl = cornerMask & DCornerMask.TOP_LEFT ? 0 : cornerRadius;\n\t\tconst tr = cornerMask & DCornerMask.TOP_RIGHT ? 0 : cornerRadius;\n\t\tconst bl = cornerMask & DCornerMask.BOTTOM_LEFT ? 0 : cornerRadius;\n\t\tconst br = cornerMask & DCornerMask.BOTTOM_RIGHT ? 0 : cornerRadius;\n\t\tthis.clear();\n\t\tthis.beginFill(0xffffff, 1);\n\t\tthis.lineStyle(0, 0, 0, 0, false);\n\t\tif (tl <= 0 && tr <= 0 && bl <= 0 && br <= 0) {\n\t\t\tthis.drawRect(x, y, width, height);\n\t\t} else {\n\t\t\tthis.moveTo(x + tl, y);\n\t\t\tif (0 < tr) {\n\t\t\t\tthis.arcTo(x + width, y, x + width, y + height, tr);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x + width, y);\n\t\t\t}\n\t\t\tif (0 < br) {\n\t\t\t\tthis.arcTo(x + width, y + height, x, y + height, br);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x + width, y + height);\n\t\t\t}\n\t\t\tif (0 < bl) {\n\t\t\t\tthis.arcTo(x, y + height, x, y, bl);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x, y + height);\n\t\t\t}\n\t\t\tif (0 < tl) {\n\t\t\t\tthis.arcTo(x, y, x + width, y, tl);\n\t\t\t} else {\n\t\t\t\tthis.lineTo(x, y);\n\t\t\t}\n\t\t}\n\t\tthis.endFill();\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -15222,6 +15222,11 @@ var DBaseOverflowMask = /** @class */ (function (_super) {
15222
15222
  function DBaseOverflowMask(parent) {
15223
15223
  var _this = _super.call(this) || this;
15224
15224
  _this.parent = parent;
15225
+ _this._isInitialized = false;
15226
+ _this._width = 0;
15227
+ _this._height = 0;
15228
+ _this._cornderRadius = 0;
15229
+ _this._cornerMask = DCornerMask.NONE;
15225
15230
  return _this;
15226
15231
  }
15227
15232
  DBaseOverflowMask.prototype.render = function (renderer) {
@@ -15229,11 +15234,23 @@ var DBaseOverflowMask = /** @class */ (function (_super) {
15229
15234
  _super.prototype.render.call(this, renderer);
15230
15235
  };
15231
15236
  DBaseOverflowMask.prototype.onReflow = function (base, width, height) {
15232
- var x = 0;
15233
- var y = 0;
15234
15237
  var corner = base.corner;
15235
15238
  var cornerRadius = Math.max(0, corner.getRadius() - 0.5);
15236
15239
  var cornerMask = corner.getMask();
15240
+ if (this._isInitialized &&
15241
+ this._width === width &&
15242
+ this._height === height &&
15243
+ this._cornderRadius === cornerRadius &&
15244
+ this._cornerMask === cornerMask) {
15245
+ return;
15246
+ }
15247
+ this._isInitialized = true;
15248
+ this._width = width;
15249
+ this._height = height;
15250
+ this._cornderRadius = cornerRadius;
15251
+ this._cornerMask = cornerMask;
15252
+ var x = 0;
15253
+ var y = 0;
15237
15254
  var tl = cornerMask & DCornerMask.TOP_LEFT ? 0 : cornerRadius;
15238
15255
  var tr = cornerMask & DCornerMask.TOP_RIGHT ? 0 : cornerRadius;
15239
15256
  var bl = cornerMask & DCornerMask.BOTTOM_LEFT ? 0 : cornerRadius;
@@ -28161,6 +28178,9 @@ var DBaseOverflowMaskSimple = /** @class */ (function (_super) {
28161
28178
  function DBaseOverflowMaskSimple(parent) {
28162
28179
  var _this = _super.call(this) || this;
28163
28180
  _this.parent = parent;
28181
+ _this._isInitialized = false;
28182
+ _this._width = _this.width;
28183
+ _this._height = _this.height;
28164
28184
  return _this;
28165
28185
  }
28166
28186
  DBaseOverflowMaskSimple.prototype.render = function (renderer) {
@@ -28168,6 +28188,12 @@ var DBaseOverflowMaskSimple = /** @class */ (function (_super) {
28168
28188
  _super.prototype.render.call(this, renderer);
28169
28189
  };
28170
28190
  DBaseOverflowMaskSimple.prototype.onReflow = function (base, width, height) {
28191
+ if (this._isInitialized && this._width === width && this._height === height) {
28192
+ return;
28193
+ }
28194
+ this._isInitialized = true;
28195
+ this._width = width;
28196
+ this._height = height;
28171
28197
  this.clear();
28172
28198
  this.beginFill(0xffffff, 1);
28173
28199
  this.drawRect(0, 0, width, height);
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.403.0
2
+ Winter Cardinal UI v0.404.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -15219,6 +15219,11 @@
15219
15219
  function DBaseOverflowMask(parent) {
15220
15220
  var _this = _super.call(this) || this;
15221
15221
  _this.parent = parent;
15222
+ _this._isInitialized = false;
15223
+ _this._width = 0;
15224
+ _this._height = 0;
15225
+ _this._cornderRadius = 0;
15226
+ _this._cornerMask = DCornerMask.NONE;
15222
15227
  return _this;
15223
15228
  }
15224
15229
  DBaseOverflowMask.prototype.render = function (renderer) {
@@ -15226,11 +15231,23 @@
15226
15231
  _super.prototype.render.call(this, renderer);
15227
15232
  };
15228
15233
  DBaseOverflowMask.prototype.onReflow = function (base, width, height) {
15229
- var x = 0;
15230
- var y = 0;
15231
15234
  var corner = base.corner;
15232
15235
  var cornerRadius = Math.max(0, corner.getRadius() - 0.5);
15233
15236
  var cornerMask = corner.getMask();
15237
+ if (this._isInitialized &&
15238
+ this._width === width &&
15239
+ this._height === height &&
15240
+ this._cornderRadius === cornerRadius &&
15241
+ this._cornerMask === cornerMask) {
15242
+ return;
15243
+ }
15244
+ this._isInitialized = true;
15245
+ this._width = width;
15246
+ this._height = height;
15247
+ this._cornderRadius = cornerRadius;
15248
+ this._cornerMask = cornerMask;
15249
+ var x = 0;
15250
+ var y = 0;
15234
15251
  var tl = cornerMask & DCornerMask.TOP_LEFT ? 0 : cornerRadius;
15235
15252
  var tr = cornerMask & DCornerMask.TOP_RIGHT ? 0 : cornerRadius;
15236
15253
  var bl = cornerMask & DCornerMask.BOTTOM_LEFT ? 0 : cornerRadius;
@@ -28158,6 +28175,9 @@
28158
28175
  function DBaseOverflowMaskSimple(parent) {
28159
28176
  var _this = _super.call(this) || this;
28160
28177
  _this.parent = parent;
28178
+ _this._isInitialized = false;
28179
+ _this._width = _this.width;
28180
+ _this._height = _this.height;
28161
28181
  return _this;
28162
28182
  }
28163
28183
  DBaseOverflowMaskSimple.prototype.render = function (renderer) {
@@ -28165,6 +28185,12 @@
28165
28185
  _super.prototype.render.call(this, renderer);
28166
28186
  };
28167
28187
  DBaseOverflowMaskSimple.prototype.onReflow = function (base, width, height) {
28188
+ if (this._isInitialized && this._width === width && this._height === height) {
28189
+ return;
28190
+ }
28191
+ this._isInitialized = true;
28192
+ this._width = width;
28193
+ this._height = height;
28168
28194
  this.clear();
28169
28195
  this.beginFill(0xffffff, 1);
28170
28196
  this.drawRect(0, 0, width, height);