leafer-draw 1.3.2 → 1.3.3

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.
package/dist/web.js CHANGED
@@ -1536,10 +1536,10 @@ var LeaferUI = (function (exports) {
1536
1536
  Object.keys(merge).forEach(key => {
1537
1537
  var _a, _b;
1538
1538
  value = merge[key];
1539
- if ((value === null || value === void 0 ? void 0 : value.constructor) === Object && ((_a = t[key]) === null || _a === void 0 ? void 0 : _a.constructor) === Object)
1539
+ if ((value === null || value === undefined ? undefined : value.constructor) === Object && ((_a = t[key]) === null || _a === undefined ? undefined : _a.constructor) === Object)
1540
1540
  return assign(t[key], merge[key], exclude && exclude[key]);
1541
1541
  if (exclude && (key in exclude)) {
1542
- if (((_b = exclude[key]) === null || _b === void 0 ? void 0 : _b.constructor) === Object)
1542
+ if (((_b = exclude[key]) === null || _b === undefined ? undefined : _b.constructor) === Object)
1543
1543
  assign(t[key] = {}, merge[key], exclude[key]);
1544
1544
  return;
1545
1545
  }
@@ -1708,7 +1708,7 @@ var LeaferUI = (function (exports) {
1708
1708
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1709
1709
  PERFORMANCE OF THIS SOFTWARE.
1710
1710
  ***************************************************************************** */
1711
- /* global Reflect, Promise, SuppressedError, Symbol */
1711
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
1712
1712
 
1713
1713
 
1714
1714
  function __decorate(decorators, target, key, desc) {
@@ -1776,7 +1776,7 @@ var LeaferUI = (function (exports) {
1776
1776
  }
1777
1777
  setTransform(_a, _b, _c, _d, _e, _f) { }
1778
1778
  resetTransform() { }
1779
- getTransform() { return void 0; }
1779
+ getTransform() { return undefined; }
1780
1780
  save() { }
1781
1781
  restore() { }
1782
1782
  transform(a, b, c, d, e, f) {
@@ -1833,12 +1833,12 @@ var LeaferUI = (function (exports) {
1833
1833
  ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) { }
1834
1834
  rect(_x, _y, _width, _height) { }
1835
1835
  roundRect(_x, _y, _width, _height, _radius) { }
1836
- createConicGradient(_startAngle, _x, _y) { return void 0; }
1837
- createLinearGradient(_x0, _y0, _x1, _y1) { return void 0; }
1838
- createPattern(_image, _repetition) { return void 0; }
1839
- createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return void 0; }
1836
+ createConicGradient(_startAngle, _x, _y) { return undefined; }
1837
+ createLinearGradient(_x0, _y0, _x1, _y1) { return undefined; }
1838
+ createPattern(_image, _repetition) { return undefined; }
1839
+ createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return undefined; }
1840
1840
  fillText(_text, _x, _y, _maxWidth) { }
1841
- measureText(_text) { return void 0; }
1841
+ measureText(_text) { return undefined; }
1842
1842
  strokeText(_text, _x, _y, _maxWidth) { }
1843
1843
  destroy() {
1844
1844
  this.context = null;
@@ -1846,79 +1846,79 @@ var LeaferUI = (function (exports) {
1846
1846
  }
1847
1847
  __decorate([
1848
1848
  contextAttr('imageSmoothingEnabled')
1849
- ], Canvas.prototype, "smooth", void 0);
1849
+ ], Canvas.prototype, "smooth", undefined);
1850
1850
  __decorate([
1851
1851
  contextAttr('imageSmoothingQuality')
1852
- ], Canvas.prototype, "smoothLevel", void 0);
1852
+ ], Canvas.prototype, "smoothLevel", undefined);
1853
1853
  __decorate([
1854
1854
  contextAttr('globalAlpha')
1855
- ], Canvas.prototype, "opacity", void 0);
1855
+ ], Canvas.prototype, "opacity", undefined);
1856
1856
  __decorate([
1857
1857
  contextAttr()
1858
- ], Canvas.prototype, "fillStyle", void 0);
1858
+ ], Canvas.prototype, "fillStyle", undefined);
1859
1859
  __decorate([
1860
1860
  contextAttr()
1861
- ], Canvas.prototype, "strokeStyle", void 0);
1861
+ ], Canvas.prototype, "strokeStyle", undefined);
1862
1862
  __decorate([
1863
1863
  contextAttr('lineWidth')
1864
- ], Canvas.prototype, "strokeWidth", void 0);
1864
+ ], Canvas.prototype, "strokeWidth", undefined);
1865
1865
  __decorate([
1866
1866
  contextAttr('lineCap')
1867
- ], Canvas.prototype, "strokeCap", void 0);
1867
+ ], Canvas.prototype, "strokeCap", undefined);
1868
1868
  __decorate([
1869
1869
  contextAttr('lineJoin')
1870
- ], Canvas.prototype, "strokeJoin", void 0);
1870
+ ], Canvas.prototype, "strokeJoin", undefined);
1871
1871
  __decorate([
1872
1872
  contextAttr('lineDashOffset')
1873
- ], Canvas.prototype, "dashOffset", void 0);
1873
+ ], Canvas.prototype, "dashOffset", undefined);
1874
1874
  __decorate([
1875
1875
  contextAttr()
1876
- ], Canvas.prototype, "miterLimit", void 0);
1876
+ ], Canvas.prototype, "miterLimit", undefined);
1877
1877
  __decorate([
1878
1878
  contextAttr()
1879
- ], Canvas.prototype, "shadowBlur", void 0);
1879
+ ], Canvas.prototype, "shadowBlur", undefined);
1880
1880
  __decorate([
1881
1881
  contextAttr()
1882
- ], Canvas.prototype, "shadowColor", void 0);
1882
+ ], Canvas.prototype, "shadowColor", undefined);
1883
1883
  __decorate([
1884
1884
  contextAttr()
1885
- ], Canvas.prototype, "shadowOffsetX", void 0);
1885
+ ], Canvas.prototype, "shadowOffsetX", undefined);
1886
1886
  __decorate([
1887
1887
  contextAttr()
1888
- ], Canvas.prototype, "shadowOffsetY", void 0);
1888
+ ], Canvas.prototype, "shadowOffsetY", undefined);
1889
1889
  __decorate([
1890
1890
  contextAttr()
1891
- ], Canvas.prototype, "filter", void 0);
1891
+ ], Canvas.prototype, "filter", undefined);
1892
1892
  __decorate([
1893
1893
  contextAttr()
1894
- ], Canvas.prototype, "font", void 0);
1894
+ ], Canvas.prototype, "font", undefined);
1895
1895
  __decorate([
1896
1896
  contextAttr()
1897
- ], Canvas.prototype, "fontKerning", void 0);
1897
+ ], Canvas.prototype, "fontKerning", undefined);
1898
1898
  __decorate([
1899
1899
  contextAttr()
1900
- ], Canvas.prototype, "fontStretch", void 0);
1900
+ ], Canvas.prototype, "fontStretch", undefined);
1901
1901
  __decorate([
1902
1902
  contextAttr()
1903
- ], Canvas.prototype, "fontVariantCaps", void 0);
1903
+ ], Canvas.prototype, "fontVariantCaps", undefined);
1904
1904
  __decorate([
1905
1905
  contextAttr()
1906
- ], Canvas.prototype, "textAlign", void 0);
1906
+ ], Canvas.prototype, "textAlign", undefined);
1907
1907
  __decorate([
1908
1908
  contextAttr()
1909
- ], Canvas.prototype, "textBaseline", void 0);
1909
+ ], Canvas.prototype, "textBaseline", undefined);
1910
1910
  __decorate([
1911
1911
  contextAttr()
1912
- ], Canvas.prototype, "textRendering", void 0);
1912
+ ], Canvas.prototype, "textRendering", undefined);
1913
1913
  __decorate([
1914
1914
  contextAttr()
1915
- ], Canvas.prototype, "wordSpacing", void 0);
1915
+ ], Canvas.prototype, "wordSpacing", undefined);
1916
1916
  __decorate([
1917
1917
  contextAttr()
1918
- ], Canvas.prototype, "letterSpacing", void 0);
1918
+ ], Canvas.prototype, "letterSpacing", undefined);
1919
1919
  __decorate([
1920
1920
  contextAttr()
1921
- ], Canvas.prototype, "direction", void 0);
1921
+ ], Canvas.prototype, "direction", undefined);
1922
1922
  __decorate([
1923
1923
  contextMethod()
1924
1924
  ], Canvas.prototype, "setTransform", null);
@@ -3387,7 +3387,7 @@ var LeaferUI = (function (exports) {
3387
3387
  this.task = task;
3388
3388
  }
3389
3389
  run() {
3390
- return __awaiter(this, void 0, void 0, function* () {
3390
+ return __awaiter(this, undefined, undefined, function* () {
3391
3391
  try {
3392
3392
  if (this.task && !this.isComplete && this.parent.running)
3393
3393
  yield this.task();
@@ -3699,7 +3699,7 @@ var LeaferUI = (function (exports) {
3699
3699
  load(onSuccess, onError) {
3700
3700
  if (!this.loading) {
3701
3701
  this.loading = true;
3702
- ImageManager.tasker.add(() => __awaiter(this, void 0, void 0, function* () {
3702
+ ImageManager.tasker.add(() => __awaiter(this, undefined, undefined, function* () {
3703
3703
  return yield Platform.origin.loadImage(this.url).then((img) => {
3704
3704
  this.ready = true;
3705
3705
  this.width = img.naturalWidth || img.width;
@@ -5178,8 +5178,7 @@ var LeaferUI = (function (exports) {
5178
5178
  __updateAutoLayout() {
5179
5179
  this.__layout.matrixChanged = true;
5180
5180
  if (this.isBranch) {
5181
- if (this.leaferIsReady)
5182
- this.leafer.layouter.addExtra(this);
5181
+ this.__extraUpdate();
5183
5182
  if (this.__.flow) {
5184
5183
  if (this.__layout.boxChanged)
5185
5184
  this.__updateFlowLayout();
@@ -5332,7 +5331,7 @@ var LeaferUI = (function (exports) {
5332
5331
  get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
5333
5332
  get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
5334
5333
  get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
5335
- get __inLazyBounds() { const { leafer } = this; return leafer && leafer.created && leafer.lazyBounds.hit(this.__world); }
5334
+ get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
5336
5335
  get pathInputed() { return this.__.__pathInputed; }
5337
5336
  set event(map) { this.on(map); }
5338
5337
  constructor(data) {
@@ -5443,6 +5442,10 @@ var LeaferUI = (function (exports) {
5443
5442
  forceRender(_bounds, _sync) {
5444
5443
  this.forceUpdate('surface');
5445
5444
  }
5445
+ __extraUpdate() {
5446
+ if (this.leaferIsReady)
5447
+ this.leafer.layouter.addExtra(this);
5448
+ }
5446
5449
  __updateWorldMatrix() { }
5447
5450
  __updateLocalMatrix() { }
5448
5451
  __updateWorldBounds() { }
@@ -6010,7 +6013,7 @@ var LeaferUI = (function (exports) {
6010
6013
  }
6011
6014
  }
6012
6015
 
6013
- const version = "1.3.2";
6016
+ const version = "1.3.3";
6014
6017
 
6015
6018
  const debug$4 = Debug.get('LeaferCanvas');
6016
6019
  class LeaferCanvas extends LeaferCanvasBase {
@@ -6531,7 +6534,7 @@ var LeaferUI = (function (exports) {
6531
6534
  }
6532
6535
  partLayout() {
6533
6536
  var _a;
6534
- if (!((_a = this.__updatedList) === null || _a === void 0 ? void 0 : _a.length))
6537
+ if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
6535
6538
  return;
6536
6539
  const t = Run.start('PartLayout');
6537
6540
  const { target, __updatedList: updateList } = this;
@@ -6946,6 +6949,7 @@ var LeaferUI = (function (exports) {
6946
6949
  return t.fill && this.__hasStroke;
6947
6950
  }
6948
6951
  get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
6952
+ get __hasSurface() { const t = this; return (t.fill || t.stroke); }
6949
6953
  get __autoWidth() { return !this._width; }
6950
6954
  get __autoHeight() { return !this._height; }
6951
6955
  get __autoSide() { return !this._width || !this._height; }
@@ -7449,199 +7453,199 @@ var LeaferUI = (function (exports) {
7449
7453
  };
7450
7454
  __decorate([
7451
7455
  dataProcessor(UIData)
7452
- ], exports.UI.prototype, "__", void 0);
7456
+ ], exports.UI.prototype, "__", undefined);
7453
7457
  __decorate([
7454
7458
  zoomLayerType()
7455
- ], exports.UI.prototype, "zoomLayer", void 0);
7459
+ ], exports.UI.prototype, "zoomLayer", undefined);
7456
7460
  __decorate([
7457
7461
  dataType('')
7458
- ], exports.UI.prototype, "id", void 0);
7462
+ ], exports.UI.prototype, "id", undefined);
7459
7463
  __decorate([
7460
7464
  dataType('')
7461
- ], exports.UI.prototype, "name", void 0);
7465
+ ], exports.UI.prototype, "name", undefined);
7462
7466
  __decorate([
7463
7467
  dataType('')
7464
- ], exports.UI.prototype, "className", void 0);
7468
+ ], exports.UI.prototype, "className", undefined);
7465
7469
  __decorate([
7466
7470
  surfaceType('pass-through')
7467
- ], exports.UI.prototype, "blendMode", void 0);
7471
+ ], exports.UI.prototype, "blendMode", undefined);
7468
7472
  __decorate([
7469
7473
  opacityType(1)
7470
- ], exports.UI.prototype, "opacity", void 0);
7474
+ ], exports.UI.prototype, "opacity", undefined);
7471
7475
  __decorate([
7472
7476
  visibleType(true)
7473
- ], exports.UI.prototype, "visible", void 0);
7477
+ ], exports.UI.prototype, "visible", undefined);
7474
7478
  __decorate([
7475
7479
  surfaceType(false)
7476
- ], exports.UI.prototype, "locked", void 0);
7480
+ ], exports.UI.prototype, "locked", undefined);
7477
7481
  __decorate([
7478
7482
  sortType(0)
7479
- ], exports.UI.prototype, "zIndex", void 0);
7483
+ ], exports.UI.prototype, "zIndex", undefined);
7480
7484
  __decorate([
7481
7485
  maskType(false)
7482
- ], exports.UI.prototype, "mask", void 0);
7486
+ ], exports.UI.prototype, "mask", undefined);
7483
7487
  __decorate([
7484
7488
  eraserType(false)
7485
- ], exports.UI.prototype, "eraser", void 0);
7489
+ ], exports.UI.prototype, "eraser", undefined);
7486
7490
  __decorate([
7487
7491
  positionType(0, true)
7488
- ], exports.UI.prototype, "x", void 0);
7492
+ ], exports.UI.prototype, "x", undefined);
7489
7493
  __decorate([
7490
7494
  positionType(0, true)
7491
- ], exports.UI.prototype, "y", void 0);
7495
+ ], exports.UI.prototype, "y", undefined);
7492
7496
  __decorate([
7493
7497
  boundsType(100, true)
7494
- ], exports.UI.prototype, "width", void 0);
7498
+ ], exports.UI.prototype, "width", undefined);
7495
7499
  __decorate([
7496
7500
  boundsType(100, true)
7497
- ], exports.UI.prototype, "height", void 0);
7501
+ ], exports.UI.prototype, "height", undefined);
7498
7502
  __decorate([
7499
7503
  scaleType(1, true)
7500
- ], exports.UI.prototype, "scaleX", void 0);
7504
+ ], exports.UI.prototype, "scaleX", undefined);
7501
7505
  __decorate([
7502
7506
  scaleType(1, true)
7503
- ], exports.UI.prototype, "scaleY", void 0);
7507
+ ], exports.UI.prototype, "scaleY", undefined);
7504
7508
  __decorate([
7505
7509
  rotationType(0, true)
7506
- ], exports.UI.prototype, "rotation", void 0);
7510
+ ], exports.UI.prototype, "rotation", undefined);
7507
7511
  __decorate([
7508
7512
  rotationType(0, true)
7509
- ], exports.UI.prototype, "skewX", void 0);
7513
+ ], exports.UI.prototype, "skewX", undefined);
7510
7514
  __decorate([
7511
7515
  rotationType(0, true)
7512
- ], exports.UI.prototype, "skewY", void 0);
7516
+ ], exports.UI.prototype, "skewY", undefined);
7513
7517
  __decorate([
7514
7518
  positionType(0, true)
7515
- ], exports.UI.prototype, "offsetX", void 0);
7519
+ ], exports.UI.prototype, "offsetX", undefined);
7516
7520
  __decorate([
7517
7521
  positionType(0, true)
7518
- ], exports.UI.prototype, "offsetY", void 0);
7522
+ ], exports.UI.prototype, "offsetY", undefined);
7519
7523
  __decorate([
7520
7524
  positionType(0, true)
7521
- ], exports.UI.prototype, "scrollX", void 0);
7525
+ ], exports.UI.prototype, "scrollX", undefined);
7522
7526
  __decorate([
7523
7527
  positionType(0, true)
7524
- ], exports.UI.prototype, "scrollY", void 0);
7528
+ ], exports.UI.prototype, "scrollY", undefined);
7525
7529
  __decorate([
7526
7530
  autoLayoutType()
7527
- ], exports.UI.prototype, "origin", void 0);
7531
+ ], exports.UI.prototype, "origin", undefined);
7528
7532
  __decorate([
7529
7533
  autoLayoutType()
7530
- ], exports.UI.prototype, "around", void 0);
7534
+ ], exports.UI.prototype, "around", undefined);
7531
7535
  __decorate([
7532
7536
  dataType(false)
7533
- ], exports.UI.prototype, "lazy", void 0);
7537
+ ], exports.UI.prototype, "lazy", undefined);
7534
7538
  __decorate([
7535
7539
  naturalBoundsType(1)
7536
- ], exports.UI.prototype, "pixelRatio", void 0);
7540
+ ], exports.UI.prototype, "pixelRatio", undefined);
7537
7541
  __decorate([
7538
7542
  pathInputType()
7539
- ], exports.UI.prototype, "path", void 0);
7543
+ ], exports.UI.prototype, "path", undefined);
7540
7544
  __decorate([
7541
7545
  pathType()
7542
- ], exports.UI.prototype, "windingRule", void 0);
7546
+ ], exports.UI.prototype, "windingRule", undefined);
7543
7547
  __decorate([
7544
7548
  pathType(true)
7545
- ], exports.UI.prototype, "closed", void 0);
7549
+ ], exports.UI.prototype, "closed", undefined);
7546
7550
  __decorate([
7547
7551
  boundsType(0)
7548
- ], exports.UI.prototype, "padding", void 0);
7552
+ ], exports.UI.prototype, "padding", undefined);
7549
7553
  __decorate([
7550
7554
  boundsType(false)
7551
- ], exports.UI.prototype, "lockRatio", void 0);
7555
+ ], exports.UI.prototype, "lockRatio", undefined);
7552
7556
  __decorate([
7553
7557
  boundsType()
7554
- ], exports.UI.prototype, "widthRange", void 0);
7558
+ ], exports.UI.prototype, "widthRange", undefined);
7555
7559
  __decorate([
7556
7560
  boundsType()
7557
- ], exports.UI.prototype, "heightRange", void 0);
7561
+ ], exports.UI.prototype, "heightRange", undefined);
7558
7562
  __decorate([
7559
7563
  dataType(false)
7560
- ], exports.UI.prototype, "draggable", void 0);
7564
+ ], exports.UI.prototype, "draggable", undefined);
7561
7565
  __decorate([
7562
7566
  dataType()
7563
- ], exports.UI.prototype, "dragBounds", void 0);
7567
+ ], exports.UI.prototype, "dragBounds", undefined);
7564
7568
  __decorate([
7565
7569
  dataType(false)
7566
- ], exports.UI.prototype, "editable", void 0);
7570
+ ], exports.UI.prototype, "editable", undefined);
7567
7571
  __decorate([
7568
7572
  hitType(true)
7569
- ], exports.UI.prototype, "hittable", void 0);
7573
+ ], exports.UI.prototype, "hittable", undefined);
7570
7574
  __decorate([
7571
7575
  hitType('path')
7572
- ], exports.UI.prototype, "hitFill", void 0);
7576
+ ], exports.UI.prototype, "hitFill", undefined);
7573
7577
  __decorate([
7574
7578
  strokeType('path')
7575
- ], exports.UI.prototype, "hitStroke", void 0);
7579
+ ], exports.UI.prototype, "hitStroke", undefined);
7576
7580
  __decorate([
7577
7581
  hitType(false)
7578
- ], exports.UI.prototype, "hitBox", void 0);
7582
+ ], exports.UI.prototype, "hitBox", undefined);
7579
7583
  __decorate([
7580
7584
  hitType(true)
7581
- ], exports.UI.prototype, "hitChildren", void 0);
7585
+ ], exports.UI.prototype, "hitChildren", undefined);
7582
7586
  __decorate([
7583
7587
  hitType(true)
7584
- ], exports.UI.prototype, "hitSelf", void 0);
7588
+ ], exports.UI.prototype, "hitSelf", undefined);
7585
7589
  __decorate([
7586
7590
  hitType()
7587
- ], exports.UI.prototype, "hitRadius", void 0);
7591
+ ], exports.UI.prototype, "hitRadius", undefined);
7588
7592
  __decorate([
7589
7593
  cursorType('')
7590
- ], exports.UI.prototype, "cursor", void 0);
7594
+ ], exports.UI.prototype, "cursor", undefined);
7591
7595
  __decorate([
7592
7596
  surfaceType()
7593
- ], exports.UI.prototype, "fill", void 0);
7597
+ ], exports.UI.prototype, "fill", undefined);
7594
7598
  __decorate([
7595
7599
  strokeType()
7596
- ], exports.UI.prototype, "stroke", void 0);
7600
+ ], exports.UI.prototype, "stroke", undefined);
7597
7601
  __decorate([
7598
7602
  strokeType('inside')
7599
- ], exports.UI.prototype, "strokeAlign", void 0);
7603
+ ], exports.UI.prototype, "strokeAlign", undefined);
7600
7604
  __decorate([
7601
7605
  strokeType(1)
7602
- ], exports.UI.prototype, "strokeWidth", void 0);
7606
+ ], exports.UI.prototype, "strokeWidth", undefined);
7603
7607
  __decorate([
7604
7608
  strokeType(false)
7605
- ], exports.UI.prototype, "strokeWidthFixed", void 0);
7609
+ ], exports.UI.prototype, "strokeWidthFixed", undefined);
7606
7610
  __decorate([
7607
7611
  strokeType('none')
7608
- ], exports.UI.prototype, "strokeCap", void 0);
7612
+ ], exports.UI.prototype, "strokeCap", undefined);
7609
7613
  __decorate([
7610
7614
  strokeType('miter')
7611
- ], exports.UI.prototype, "strokeJoin", void 0);
7615
+ ], exports.UI.prototype, "strokeJoin", undefined);
7612
7616
  __decorate([
7613
7617
  strokeType()
7614
- ], exports.UI.prototype, "dashPattern", void 0);
7618
+ ], exports.UI.prototype, "dashPattern", undefined);
7615
7619
  __decorate([
7616
7620
  strokeType()
7617
- ], exports.UI.prototype, "dashOffset", void 0);
7621
+ ], exports.UI.prototype, "dashOffset", undefined);
7618
7622
  __decorate([
7619
7623
  strokeType(10)
7620
- ], exports.UI.prototype, "miterLimit", void 0);
7624
+ ], exports.UI.prototype, "miterLimit", undefined);
7621
7625
  __decorate([
7622
7626
  pathType(0)
7623
- ], exports.UI.prototype, "cornerRadius", void 0);
7627
+ ], exports.UI.prototype, "cornerRadius", undefined);
7624
7628
  __decorate([
7625
7629
  pathType()
7626
- ], exports.UI.prototype, "cornerSmoothing", void 0);
7630
+ ], exports.UI.prototype, "cornerSmoothing", undefined);
7627
7631
  __decorate([
7628
7632
  effectType()
7629
- ], exports.UI.prototype, "shadow", void 0);
7633
+ ], exports.UI.prototype, "shadow", undefined);
7630
7634
  __decorate([
7631
7635
  effectType()
7632
- ], exports.UI.prototype, "innerShadow", void 0);
7636
+ ], exports.UI.prototype, "innerShadow", undefined);
7633
7637
  __decorate([
7634
7638
  effectType()
7635
- ], exports.UI.prototype, "blur", void 0);
7639
+ ], exports.UI.prototype, "blur", undefined);
7636
7640
  __decorate([
7637
7641
  effectType()
7638
- ], exports.UI.prototype, "backgroundBlur", void 0);
7642
+ ], exports.UI.prototype, "backgroundBlur", undefined);
7639
7643
  __decorate([
7640
7644
  effectType()
7641
- ], exports.UI.prototype, "grayscale", void 0);
7645
+ ], exports.UI.prototype, "grayscale", undefined);
7642
7646
  __decorate([
7643
7647
  dataType({})
7644
- ], exports.UI.prototype, "data", void 0);
7648
+ ], exports.UI.prototype, "data", undefined);
7645
7649
  __decorate([
7646
7650
  rewrite(exports.Leaf.prototype.reset)
7647
7651
  ], exports.UI.prototype, "reset", null);
@@ -7702,7 +7706,7 @@ var LeaferUI = (function (exports) {
7702
7706
  };
7703
7707
  __decorate([
7704
7708
  dataProcessor(GroupData)
7705
- ], exports.Group.prototype, "__", void 0);
7709
+ ], exports.Group.prototype, "__", undefined);
7706
7710
  exports.Group = __decorate([
7707
7711
  useModule(exports.Branch),
7708
7712
  registerUI()
@@ -7873,8 +7877,6 @@ var LeaferUI = (function (exports) {
7873
7877
  __setAttr(attrName, newValue) {
7874
7878
  if (this.canvas) {
7875
7879
  if (canvasSizeAttrs.includes(attrName)) {
7876
- if (!newValue)
7877
- debug.warn(attrName + ' is 0');
7878
7880
  this.__changeCanvasSize(attrName, newValue);
7879
7881
  }
7880
7882
  else if (attrName === 'fill') {
@@ -8077,10 +8079,10 @@ var LeaferUI = (function (exports) {
8077
8079
  exports.Leafer.list = new LeafList();
8078
8080
  __decorate([
8079
8081
  dataProcessor(LeaferData)
8080
- ], exports.Leafer.prototype, "__", void 0);
8082
+ ], exports.Leafer.prototype, "__", undefined);
8081
8083
  __decorate([
8082
8084
  boundsType()
8083
- ], exports.Leafer.prototype, "pixelRatio", void 0);
8085
+ ], exports.Leafer.prototype, "pixelRatio", undefined);
8084
8086
  exports.Leafer = Leafer_1 = __decorate([
8085
8087
  registerUI()
8086
8088
  ], exports.Leafer);
@@ -8093,7 +8095,7 @@ var LeaferUI = (function (exports) {
8093
8095
  };
8094
8096
  __decorate([
8095
8097
  dataProcessor(RectData)
8096
- ], exports.Rect.prototype, "__", void 0);
8098
+ ], exports.Rect.prototype, "__", undefined);
8097
8099
  exports.Rect = __decorate([
8098
8100
  useModule(RectRender),
8099
8101
  rewriteAble(),
@@ -8118,6 +8120,8 @@ var LeaferUI = (function (exports) {
8118
8120
  const data = this.__;
8119
8121
  if (this.children.length) {
8120
8122
  if (data.__autoSide) {
8123
+ if (data.__hasSurface)
8124
+ this.__extraUpdate();
8121
8125
  super.__updateBoxBounds();
8122
8126
  const { boxBounds } = this.__layout;
8123
8127
  if (!data.__autoSize) {
@@ -8182,13 +8186,13 @@ var LeaferUI = (function (exports) {
8182
8186
  };
8183
8187
  __decorate([
8184
8188
  dataProcessor(BoxData)
8185
- ], exports.Box.prototype, "__", void 0);
8189
+ ], exports.Box.prototype, "__", undefined);
8186
8190
  __decorate([
8187
8191
  dataType(false)
8188
- ], exports.Box.prototype, "resizeChildren", void 0);
8192
+ ], exports.Box.prototype, "resizeChildren", undefined);
8189
8193
  __decorate([
8190
8194
  affectRenderBoundsType('show')
8191
- ], exports.Box.prototype, "overflow", void 0);
8195
+ ], exports.Box.prototype, "overflow", undefined);
8192
8196
  __decorate([
8193
8197
  rewrite(rect.__updateStrokeSpread)
8194
8198
  ], exports.Box.prototype, "__updateStrokeSpread", null);
@@ -8227,13 +8231,13 @@ var LeaferUI = (function (exports) {
8227
8231
  };
8228
8232
  __decorate([
8229
8233
  dataProcessor(FrameData)
8230
- ], exports.Frame.prototype, "__", void 0);
8234
+ ], exports.Frame.prototype, "__", undefined);
8231
8235
  __decorate([
8232
8236
  surfaceType('#FFFFFF')
8233
- ], exports.Frame.prototype, "fill", void 0);
8237
+ ], exports.Frame.prototype, "fill", undefined);
8234
8238
  __decorate([
8235
8239
  affectRenderBoundsType('hide')
8236
- ], exports.Frame.prototype, "overflow", void 0);
8240
+ ], exports.Frame.prototype, "overflow", undefined);
8237
8241
  exports.Frame = __decorate([
8238
8242
  registerUI()
8239
8243
  ], exports.Frame);
@@ -8280,16 +8284,16 @@ var LeaferUI = (function (exports) {
8280
8284
  };
8281
8285
  __decorate([
8282
8286
  dataProcessor(EllipseData)
8283
- ], exports.Ellipse.prototype, "__", void 0);
8287
+ ], exports.Ellipse.prototype, "__", undefined);
8284
8288
  __decorate([
8285
8289
  pathType(0)
8286
- ], exports.Ellipse.prototype, "innerRadius", void 0);
8290
+ ], exports.Ellipse.prototype, "innerRadius", undefined);
8287
8291
  __decorate([
8288
8292
  pathType(0)
8289
- ], exports.Ellipse.prototype, "startAngle", void 0);
8293
+ ], exports.Ellipse.prototype, "startAngle", undefined);
8290
8294
  __decorate([
8291
8295
  pathType(0)
8292
- ], exports.Ellipse.prototype, "endAngle", void 0);
8296
+ ], exports.Ellipse.prototype, "endAngle", undefined);
8293
8297
  exports.Ellipse = __decorate([
8294
8298
  registerUI()
8295
8299
  ], exports.Ellipse);
@@ -8348,22 +8352,22 @@ var LeaferUI = (function (exports) {
8348
8352
  };
8349
8353
  __decorate([
8350
8354
  dataProcessor(LineData)
8351
- ], exports.Line.prototype, "__", void 0);
8355
+ ], exports.Line.prototype, "__", undefined);
8352
8356
  __decorate([
8353
8357
  affectStrokeBoundsType('center')
8354
- ], exports.Line.prototype, "strokeAlign", void 0);
8358
+ ], exports.Line.prototype, "strokeAlign", undefined);
8355
8359
  __decorate([
8356
8360
  boundsType(0)
8357
- ], exports.Line.prototype, "height", void 0);
8361
+ ], exports.Line.prototype, "height", undefined);
8358
8362
  __decorate([
8359
8363
  pathType()
8360
- ], exports.Line.prototype, "points", void 0);
8364
+ ], exports.Line.prototype, "points", undefined);
8361
8365
  __decorate([
8362
8366
  pathType(0)
8363
- ], exports.Line.prototype, "curve", void 0);
8367
+ ], exports.Line.prototype, "curve", undefined);
8364
8368
  __decorate([
8365
8369
  pathType(false)
8366
- ], exports.Line.prototype, "closed", void 0);
8370
+ ], exports.Line.prototype, "closed", undefined);
8367
8371
  exports.Line = __decorate([
8368
8372
  registerUI()
8369
8373
  ], exports.Line);
@@ -8396,16 +8400,16 @@ var LeaferUI = (function (exports) {
8396
8400
  };
8397
8401
  __decorate([
8398
8402
  dataProcessor(PolygonData)
8399
- ], exports.Polygon.prototype, "__", void 0);
8403
+ ], exports.Polygon.prototype, "__", undefined);
8400
8404
  __decorate([
8401
8405
  pathType(3)
8402
- ], exports.Polygon.prototype, "sides", void 0);
8406
+ ], exports.Polygon.prototype, "sides", undefined);
8403
8407
  __decorate([
8404
8408
  pathType()
8405
- ], exports.Polygon.prototype, "points", void 0);
8409
+ ], exports.Polygon.prototype, "points", undefined);
8406
8410
  __decorate([
8407
8411
  pathType(0)
8408
- ], exports.Polygon.prototype, "curve", void 0);
8412
+ ], exports.Polygon.prototype, "curve", undefined);
8409
8413
  __decorate([
8410
8414
  rewrite(line.__updateRenderPath)
8411
8415
  ], exports.Polygon.prototype, "__updateRenderPath", null);
@@ -8437,13 +8441,13 @@ var LeaferUI = (function (exports) {
8437
8441
  };
8438
8442
  __decorate([
8439
8443
  dataProcessor(StarData)
8440
- ], exports.Star.prototype, "__", void 0);
8444
+ ], exports.Star.prototype, "__", undefined);
8441
8445
  __decorate([
8442
8446
  pathType(5)
8443
- ], exports.Star.prototype, "corners", void 0);
8447
+ ], exports.Star.prototype, "corners", undefined);
8444
8448
  __decorate([
8445
8449
  pathType(0.382)
8446
- ], exports.Star.prototype, "innerRadius", void 0);
8450
+ ], exports.Star.prototype, "innerRadius", undefined);
8447
8451
  exports.Star = __decorate([
8448
8452
  registerUI()
8449
8453
  ], exports.Star);
@@ -8465,10 +8469,10 @@ var LeaferUI = (function (exports) {
8465
8469
  };
8466
8470
  __decorate([
8467
8471
  dataProcessor(ImageData)
8468
- ], exports.Image.prototype, "__", void 0);
8472
+ ], exports.Image.prototype, "__", undefined);
8469
8473
  __decorate([
8470
8474
  boundsType('')
8471
- ], exports.Image.prototype, "url", void 0);
8475
+ ], exports.Image.prototype, "url", undefined);
8472
8476
  exports.Image = __decorate([
8473
8477
  registerUI()
8474
8478
  ], exports.Image);
@@ -8531,25 +8535,25 @@ var LeaferUI = (function (exports) {
8531
8535
  };
8532
8536
  __decorate([
8533
8537
  dataProcessor(CanvasData)
8534
- ], exports.Canvas.prototype, "__", void 0);
8538
+ ], exports.Canvas.prototype, "__", undefined);
8535
8539
  __decorate([
8536
8540
  resizeType(100)
8537
- ], exports.Canvas.prototype, "width", void 0);
8541
+ ], exports.Canvas.prototype, "width", undefined);
8538
8542
  __decorate([
8539
8543
  resizeType(100)
8540
- ], exports.Canvas.prototype, "height", void 0);
8544
+ ], exports.Canvas.prototype, "height", undefined);
8541
8545
  __decorate([
8542
8546
  resizeType(1)
8543
- ], exports.Canvas.prototype, "pixelRatio", void 0);
8547
+ ], exports.Canvas.prototype, "pixelRatio", undefined);
8544
8548
  __decorate([
8545
8549
  resizeType(true)
8546
- ], exports.Canvas.prototype, "smooth", void 0);
8550
+ ], exports.Canvas.prototype, "smooth", undefined);
8547
8551
  __decorate([
8548
8552
  dataType(false)
8549
- ], exports.Canvas.prototype, "safeResize", void 0);
8553
+ ], exports.Canvas.prototype, "safeResize", undefined);
8550
8554
  __decorate([
8551
8555
  resizeType()
8552
- ], exports.Canvas.prototype, "contextSettings", void 0);
8556
+ ], exports.Canvas.prototype, "contextSettings", undefined);
8553
8557
  exports.Canvas = __decorate([
8554
8558
  registerUI()
8555
8559
  ], exports.Canvas);
@@ -8640,76 +8644,76 @@ var LeaferUI = (function (exports) {
8640
8644
  };
8641
8645
  __decorate([
8642
8646
  dataProcessor(TextData)
8643
- ], exports.Text.prototype, "__", void 0);
8647
+ ], exports.Text.prototype, "__", undefined);
8644
8648
  __decorate([
8645
8649
  boundsType(0)
8646
- ], exports.Text.prototype, "width", void 0);
8650
+ ], exports.Text.prototype, "width", undefined);
8647
8651
  __decorate([
8648
8652
  boundsType(0)
8649
- ], exports.Text.prototype, "height", void 0);
8653
+ ], exports.Text.prototype, "height", undefined);
8650
8654
  __decorate([
8651
8655
  dataType(false)
8652
- ], exports.Text.prototype, "resizeFontSize", void 0);
8656
+ ], exports.Text.prototype, "resizeFontSize", undefined);
8653
8657
  __decorate([
8654
8658
  surfaceType('#000000')
8655
- ], exports.Text.prototype, "fill", void 0);
8659
+ ], exports.Text.prototype, "fill", undefined);
8656
8660
  __decorate([
8657
8661
  affectStrokeBoundsType('outside')
8658
- ], exports.Text.prototype, "strokeAlign", void 0);
8662
+ ], exports.Text.prototype, "strokeAlign", undefined);
8659
8663
  __decorate([
8660
8664
  hitType('all')
8661
- ], exports.Text.prototype, "hitFill", void 0);
8665
+ ], exports.Text.prototype, "hitFill", undefined);
8662
8666
  __decorate([
8663
8667
  boundsType('')
8664
- ], exports.Text.prototype, "text", void 0);
8668
+ ], exports.Text.prototype, "text", undefined);
8665
8669
  __decorate([
8666
- boundsType('L')
8667
- ], exports.Text.prototype, "fontFamily", void 0);
8670
+ boundsType('caption')
8671
+ ], exports.Text.prototype, "fontFamily", undefined);
8668
8672
  __decorate([
8669
8673
  boundsType(12)
8670
- ], exports.Text.prototype, "fontSize", void 0);
8674
+ ], exports.Text.prototype, "fontSize", undefined);
8671
8675
  __decorate([
8672
8676
  boundsType('normal')
8673
- ], exports.Text.prototype, "fontWeight", void 0);
8677
+ ], exports.Text.prototype, "fontWeight", undefined);
8674
8678
  __decorate([
8675
8679
  boundsType(false)
8676
- ], exports.Text.prototype, "italic", void 0);
8680
+ ], exports.Text.prototype, "italic", undefined);
8677
8681
  __decorate([
8678
8682
  boundsType('none')
8679
- ], exports.Text.prototype, "textCase", void 0);
8683
+ ], exports.Text.prototype, "textCase", undefined);
8680
8684
  __decorate([
8681
8685
  boundsType('none')
8682
- ], exports.Text.prototype, "textDecoration", void 0);
8686
+ ], exports.Text.prototype, "textDecoration", undefined);
8683
8687
  __decorate([
8684
8688
  boundsType(0)
8685
- ], exports.Text.prototype, "letterSpacing", void 0);
8689
+ ], exports.Text.prototype, "letterSpacing", undefined);
8686
8690
  __decorate([
8687
8691
  boundsType({ type: 'percent', value: 1.5 })
8688
- ], exports.Text.prototype, "lineHeight", void 0);
8692
+ ], exports.Text.prototype, "lineHeight", undefined);
8689
8693
  __decorate([
8690
8694
  boundsType(0)
8691
- ], exports.Text.prototype, "paraIndent", void 0);
8695
+ ], exports.Text.prototype, "paraIndent", undefined);
8692
8696
  __decorate([
8693
8697
  boundsType(0)
8694
- ], exports.Text.prototype, "paraSpacing", void 0);
8698
+ ], exports.Text.prototype, "paraSpacing", undefined);
8695
8699
  __decorate([
8696
8700
  boundsType('x')
8697
- ], exports.Text.prototype, "writingMode", void 0);
8701
+ ], exports.Text.prototype, "writingMode", undefined);
8698
8702
  __decorate([
8699
8703
  boundsType('left')
8700
- ], exports.Text.prototype, "textAlign", void 0);
8704
+ ], exports.Text.prototype, "textAlign", undefined);
8701
8705
  __decorate([
8702
8706
  boundsType('top')
8703
- ], exports.Text.prototype, "verticalAlign", void 0);
8707
+ ], exports.Text.prototype, "verticalAlign", undefined);
8704
8708
  __decorate([
8705
8709
  boundsType(true)
8706
- ], exports.Text.prototype, "autoSizeAlign", void 0);
8710
+ ], exports.Text.prototype, "autoSizeAlign", undefined);
8707
8711
  __decorate([
8708
8712
  boundsType('normal')
8709
- ], exports.Text.prototype, "textWrap", void 0);
8713
+ ], exports.Text.prototype, "textWrap", undefined);
8710
8714
  __decorate([
8711
8715
  boundsType('show')
8712
- ], exports.Text.prototype, "textOverflow", void 0);
8716
+ ], exports.Text.prototype, "textOverflow", undefined);
8713
8717
  exports.Text = __decorate([
8714
8718
  registerUI()
8715
8719
  ], exports.Text);
@@ -8722,10 +8726,10 @@ var LeaferUI = (function (exports) {
8722
8726
  };
8723
8727
  __decorate([
8724
8728
  dataProcessor(PathData)
8725
- ], exports.Path.prototype, "__", void 0);
8729
+ ], exports.Path.prototype, "__", undefined);
8726
8730
  __decorate([
8727
8731
  affectStrokeBoundsType('center')
8728
- ], exports.Path.prototype, "strokeAlign", void 0);
8732
+ ], exports.Path.prototype, "strokeAlign", undefined);
8729
8733
  exports.Path = __decorate([
8730
8734
  registerUI()
8731
8735
  ], exports.Path);
@@ -8764,10 +8768,10 @@ var LeaferUI = (function (exports) {
8764
8768
  };
8765
8769
  __decorate([
8766
8770
  dataProcessor(PenData)
8767
- ], exports.Pen.prototype, "__", void 0);
8771
+ ], exports.Pen.prototype, "__", undefined);
8768
8772
  __decorate([
8769
8773
  penPathType()
8770
- ], exports.Pen.prototype, "path", void 0);
8774
+ ], exports.Pen.prototype, "path", undefined);
8771
8775
  exports.Pen = __decorate([
8772
8776
  useModule(PathCreator, ['set', 'path', 'paint']),
8773
8777
  registerUI()
@@ -9401,7 +9405,7 @@ var LeaferUI = (function (exports) {
9401
9405
  }
9402
9406
  else {
9403
9407
  if (!paint.patternTask) {
9404
- paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
9408
+ paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
9405
9409
  paint.patternTask = null;
9406
9410
  if (canvas.bounds.hit(ui.__nowWorld))
9407
9411
  createPattern(ui, paint, pixelRatio);
@@ -9557,7 +9561,7 @@ var LeaferUI = (function (exports) {
9557
9561
  const end = shadow.length - 1;
9558
9562
  toOffsetOutBounds$1(bounds, offsetOutBounds$1);
9559
9563
  shadow.forEach((item, index) => {
9560
- other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
9564
+ other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
9561
9565
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
9562
9566
  drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
9563
9567
  copyBounds = bounds;
@@ -9633,7 +9637,7 @@ var LeaferUI = (function (exports) {
9633
9637
  other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
9634
9638
  copyBounds = bounds;
9635
9639
  }
9636
- other.fillWorld(copyBounds, item.color, 'source-in');
9640
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
9637
9641
  if (ui.__worldFlipped) {
9638
9642
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
9639
9643
  }