@leafer-draw/worker 1.3.2 → 1.4.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.
package/dist/worker.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;
@@ -3824,10 +3824,10 @@ var LeaferUI = (function (exports) {
3824
3824
  return decorateLeafAttr(defaultValue, (key) => attr({
3825
3825
  set(value) {
3826
3826
  if (this.__setAttr(key, value)) {
3827
- this.__layout.matrixChanged || this.__layout.matrixChange();
3828
3827
  this.__hasAutoLayout = !!(this.origin || this.around || this.flow);
3829
3828
  if (!this.__local)
3830
3829
  this.__layout.createLocal();
3830
+ doBoundsType(this);
3831
3831
  }
3832
3832
  }
3833
3833
  }));
@@ -4210,55 +4210,62 @@ var LeaferUI = (function (exports) {
4210
4210
  y += t.y;
4211
4211
  transition ? t.animate({ x, y }, transition) : (t.x = x, t.y = y);
4212
4212
  },
4213
- zoomOfWorld(t, origin, scaleX, scaleY, resize) {
4214
- L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize);
4213
+ zoomOfWorld(t, origin, scaleX, scaleY, resize, transition) {
4214
+ L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
4215
4215
  },
4216
- zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize) {
4217
- copy$6(matrix, t.__localMatrix);
4216
+ zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition) {
4217
+ const o = t.__localMatrix;
4218
+ if (typeof scaleY !== 'number') {
4219
+ if (scaleY)
4220
+ transition = scaleY;
4221
+ scaleY = scaleX;
4222
+ }
4223
+ copy$6(matrix, o);
4218
4224
  scaleOfOuter$2(matrix, origin, scaleX, scaleY);
4219
4225
  if (t.origin || t.around) {
4220
- L.setTransform(t, matrix, resize);
4226
+ L.setTransform(t, matrix, resize, transition);
4221
4227
  }
4222
4228
  else {
4223
- moveByMatrix(t, matrix);
4224
- t.scaleResize(scaleX, scaleY, resize !== true);
4229
+ const x = t.x + matrix.e - o.e, y = t.y + matrix.f - o.f;
4230
+ if (transition && !resize)
4231
+ t.animate({ x, y, scaleX: t.scaleX * scaleX, scaleY: t.scaleY * scaleY }, transition);
4232
+ else
4233
+ t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true);
4225
4234
  }
4226
4235
  },
4227
- rotateOfWorld(t, origin, angle) {
4228
- L.rotateOfLocal(t, getTempLocal(t, origin), angle);
4236
+ rotateOfWorld(t, origin, angle, transition) {
4237
+ L.rotateOfLocal(t, getTempLocal(t, origin), angle, transition);
4229
4238
  },
4230
- rotateOfLocal(t, origin, angle) {
4231
- copy$6(matrix, t.__localMatrix);
4239
+ rotateOfLocal(t, origin, angle, transition) {
4240
+ const o = t.__localMatrix;
4241
+ copy$6(matrix, o);
4232
4242
  rotateOfOuter$2(matrix, origin, angle);
4233
- if (t.origin || t.around) {
4234
- L.setTransform(t, matrix);
4235
- }
4236
- else {
4237
- moveByMatrix(t, matrix);
4238
- t.rotation = MathHelper.formatRotation(t.rotation + angle);
4239
- }
4243
+ if (t.origin || t.around)
4244
+ L.setTransform(t, matrix, false, transition);
4245
+ else
4246
+ t.set({ x: t.x + matrix.e - o.e, y: t.y + matrix.f - o.f, rotation: MathHelper.formatRotation(t.rotation + angle) }, transition);
4240
4247
  },
4241
- skewOfWorld(t, origin, skewX, skewY, resize) {
4242
- L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize);
4248
+ skewOfWorld(t, origin, skewX, skewY, resize, transition) {
4249
+ L.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY, resize, transition);
4243
4250
  },
4244
- skewOfLocal(t, origin, skewX, skewY = 0, resize) {
4251
+ skewOfLocal(t, origin, skewX, skewY = 0, resize, transition) {
4245
4252
  copy$6(matrix, t.__localMatrix);
4246
4253
  skewOfOuter(matrix, origin, skewX, skewY);
4247
- L.setTransform(t, matrix, resize);
4254
+ L.setTransform(t, matrix, resize, transition);
4248
4255
  },
4249
- transformWorld(t, transform, resize) {
4256
+ transformWorld(t, transform, resize, transition) {
4250
4257
  copy$6(matrix, t.worldTransform);
4251
4258
  multiplyParent$2(matrix, transform);
4252
4259
  if (t.parent)
4253
4260
  divideParent(matrix, t.parent.worldTransform);
4254
- L.setTransform(t, matrix, resize);
4261
+ L.setTransform(t, matrix, resize, transition);
4255
4262
  },
4256
- transform(t, transform, resize) {
4263
+ transform(t, transform, resize, transition) {
4257
4264
  copy$6(matrix, t.localTransform);
4258
4265
  multiplyParent$2(matrix, transform);
4259
- L.setTransform(t, matrix, resize);
4266
+ L.setTransform(t, matrix, resize, transition);
4260
4267
  },
4261
- setTransform(t, transform, resize) {
4268
+ setTransform(t, transform, resize, transition) {
4262
4269
  const data = t.__, originPoint = data.origin && L.getInnerOrigin(t, data.origin);
4263
4270
  const layout = getLayout(transform, originPoint, data.around && L.getInnerOrigin(t, data.around));
4264
4271
  if (resize) {
@@ -4273,7 +4280,7 @@ var LeaferUI = (function (exports) {
4273
4280
  t.scaleResize(scaleX, scaleY, false);
4274
4281
  }
4275
4282
  else
4276
- t.set(layout);
4283
+ t.set(layout, transition);
4277
4284
  },
4278
4285
  getFlipTransform(t, axis) {
4279
4286
  const m = getMatrixData();
@@ -4310,11 +4317,6 @@ var LeaferUI = (function (exports) {
4310
4317
  };
4311
4318
  const L = LeafHelper;
4312
4319
  const { updateAllMatrix: updateAllMatrix$3, updateMatrix: updateMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity$1, updateAllChange: updateAllChange$1 } = L;
4313
- function moveByMatrix(t, matrix) {
4314
- const { e, f } = t.__localMatrix;
4315
- t.x += matrix.e - e;
4316
- t.y += matrix.f - f;
4317
- }
4318
4320
  function getTempLocal(t, world) {
4319
4321
  t.__layout.update();
4320
4322
  return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world;
@@ -5178,8 +5180,7 @@ var LeaferUI = (function (exports) {
5178
5180
  __updateAutoLayout() {
5179
5181
  this.__layout.matrixChanged = true;
5180
5182
  if (this.isBranch) {
5181
- if (this.leaferIsReady)
5182
- this.leafer.layouter.addExtra(this);
5183
+ this.__extraUpdate();
5183
5184
  if (this.__.flow) {
5184
5185
  if (this.__layout.boxChanged)
5185
5186
  this.__updateFlowLayout();
@@ -5332,7 +5333,7 @@ var LeaferUI = (function (exports) {
5332
5333
  get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
5333
5334
  get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
5334
5335
  get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
5335
- get __inLazyBounds() { const { leafer } = this; return leafer && leafer.created && leafer.lazyBounds.hit(this.__world); }
5336
+ get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
5336
5337
  get pathInputed() { return this.__.__pathInputed; }
5337
5338
  set event(map) { this.on(map); }
5338
5339
  constructor(data) {
@@ -5443,6 +5444,10 @@ var LeaferUI = (function (exports) {
5443
5444
  forceRender(_bounds, _sync) {
5444
5445
  this.forceUpdate('surface');
5445
5446
  }
5447
+ __extraUpdate() {
5448
+ if (this.leaferIsReady)
5449
+ this.leafer.layouter.addExtra(this);
5450
+ }
5446
5451
  __updateWorldMatrix() { }
5447
5452
  __updateLocalMatrix() { }
5448
5453
  __updateWorldBounds() { }
@@ -5585,11 +5590,11 @@ var LeaferUI = (function (exports) {
5585
5590
  const layer = this.leafer ? this.leafer.zoomLayer : this;
5586
5591
  return layer.getWorldPoint(page, relative, distance, change);
5587
5592
  }
5588
- setTransform(matrix, resize) {
5589
- setTransform(this, matrix, resize);
5593
+ setTransform(matrix, resize, transition) {
5594
+ setTransform(this, matrix, resize, transition);
5590
5595
  }
5591
- transform(matrix, resize) {
5592
- transform(this, matrix, resize);
5596
+ transform(matrix, resize, transition) {
5597
+ transform(this, matrix, resize, transition);
5593
5598
  }
5594
5599
  move(x, y, transition) {
5595
5600
  moveLocal(this, x, y, transition);
@@ -5597,32 +5602,32 @@ var LeaferUI = (function (exports) {
5597
5602
  moveInner(x, y, transition) {
5598
5603
  moveWorld(this, x, y, true, transition);
5599
5604
  }
5600
- scaleOf(origin, scaleX, scaleY, resize) {
5601
- zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize);
5605
+ scaleOf(origin, scaleX, scaleY, resize, transition) {
5606
+ zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition);
5602
5607
  }
5603
- rotateOf(origin, rotation) {
5604
- rotateOfLocal(this, getLocalOrigin(this, origin), rotation);
5608
+ rotateOf(origin, rotation, transition) {
5609
+ rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition);
5605
5610
  }
5606
- skewOf(origin, skewX, skewY, resize) {
5607
- skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize);
5611
+ skewOf(origin, skewX, skewY, resize, transition) {
5612
+ skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition);
5608
5613
  }
5609
- transformWorld(worldTransform, resize) {
5610
- transformWorld(this, worldTransform, resize);
5614
+ transformWorld(worldTransform, resize, transition) {
5615
+ transformWorld(this, worldTransform, resize, transition);
5611
5616
  }
5612
5617
  moveWorld(x, y, transition) {
5613
5618
  moveWorld(this, x, y, false, transition);
5614
5619
  }
5615
- scaleOfWorld(worldOrigin, scaleX, scaleY, resize) {
5616
- zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize);
5620
+ scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition) {
5621
+ zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition);
5617
5622
  }
5618
5623
  rotateOfWorld(worldOrigin, rotation) {
5619
5624
  rotateOfWorld(this, worldOrigin, rotation);
5620
5625
  }
5621
- skewOfWorld(worldOrigin, skewX, skewY, resize) {
5622
- skewOfWorld(this, worldOrigin, skewX, skewY, resize);
5626
+ skewOfWorld(worldOrigin, skewX, skewY, resize, transition) {
5627
+ skewOfWorld(this, worldOrigin, skewX, skewY, resize, transition);
5623
5628
  }
5624
- flip(axis) {
5625
- transform(this, getFlipTransform(this, axis));
5629
+ flip(axis, transition) {
5630
+ transform(this, getFlipTransform(this, axis), false, transition);
5626
5631
  }
5627
5632
  scaleResize(scaleX, scaleY = scaleX, _noResize) {
5628
5633
  this.scaleX *= scaleX;
@@ -6010,7 +6015,7 @@ var LeaferUI = (function (exports) {
6010
6015
  }
6011
6016
  }
6012
6017
 
6013
- const version = "1.3.2";
6018
+ const version = "1.4.0";
6014
6019
 
6015
6020
  class LeaferCanvas extends LeaferCanvasBase {
6016
6021
  get allowBackgroundColor() { return true; }
@@ -6355,7 +6360,7 @@ var LeaferUI = (function (exports) {
6355
6360
  }
6356
6361
  partLayout() {
6357
6362
  var _a;
6358
- if (!((_a = this.__updatedList) === null || _a === void 0 ? void 0 : _a.length))
6363
+ if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
6359
6364
  return;
6360
6365
  const t = Run.start('PartLayout');
6361
6366
  const { target, __updatedList: updateList } = this;
@@ -6770,6 +6775,7 @@ var LeaferUI = (function (exports) {
6770
6775
  return t.fill && this.__hasStroke;
6771
6776
  }
6772
6777
  get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
6778
+ get __hasSurface() { const t = this; return (t.fill || t.stroke); }
6773
6779
  get __autoWidth() { return !this._width; }
6774
6780
  get __autoHeight() { return !this._height; }
6775
6781
  get __autoSide() { return !this._width || !this._height; }
@@ -7273,199 +7279,199 @@ var LeaferUI = (function (exports) {
7273
7279
  };
7274
7280
  __decorate([
7275
7281
  dataProcessor(UIData)
7276
- ], exports.UI.prototype, "__", void 0);
7282
+ ], exports.UI.prototype, "__", undefined);
7277
7283
  __decorate([
7278
7284
  zoomLayerType()
7279
- ], exports.UI.prototype, "zoomLayer", void 0);
7285
+ ], exports.UI.prototype, "zoomLayer", undefined);
7280
7286
  __decorate([
7281
7287
  dataType('')
7282
- ], exports.UI.prototype, "id", void 0);
7288
+ ], exports.UI.prototype, "id", undefined);
7283
7289
  __decorate([
7284
7290
  dataType('')
7285
- ], exports.UI.prototype, "name", void 0);
7291
+ ], exports.UI.prototype, "name", undefined);
7286
7292
  __decorate([
7287
7293
  dataType('')
7288
- ], exports.UI.prototype, "className", void 0);
7294
+ ], exports.UI.prototype, "className", undefined);
7289
7295
  __decorate([
7290
7296
  surfaceType('pass-through')
7291
- ], exports.UI.prototype, "blendMode", void 0);
7297
+ ], exports.UI.prototype, "blendMode", undefined);
7292
7298
  __decorate([
7293
7299
  opacityType(1)
7294
- ], exports.UI.prototype, "opacity", void 0);
7300
+ ], exports.UI.prototype, "opacity", undefined);
7295
7301
  __decorate([
7296
7302
  visibleType(true)
7297
- ], exports.UI.prototype, "visible", void 0);
7303
+ ], exports.UI.prototype, "visible", undefined);
7298
7304
  __decorate([
7299
7305
  surfaceType(false)
7300
- ], exports.UI.prototype, "locked", void 0);
7306
+ ], exports.UI.prototype, "locked", undefined);
7301
7307
  __decorate([
7302
7308
  sortType(0)
7303
- ], exports.UI.prototype, "zIndex", void 0);
7309
+ ], exports.UI.prototype, "zIndex", undefined);
7304
7310
  __decorate([
7305
7311
  maskType(false)
7306
- ], exports.UI.prototype, "mask", void 0);
7312
+ ], exports.UI.prototype, "mask", undefined);
7307
7313
  __decorate([
7308
7314
  eraserType(false)
7309
- ], exports.UI.prototype, "eraser", void 0);
7315
+ ], exports.UI.prototype, "eraser", undefined);
7310
7316
  __decorate([
7311
7317
  positionType(0, true)
7312
- ], exports.UI.prototype, "x", void 0);
7318
+ ], exports.UI.prototype, "x", undefined);
7313
7319
  __decorate([
7314
7320
  positionType(0, true)
7315
- ], exports.UI.prototype, "y", void 0);
7321
+ ], exports.UI.prototype, "y", undefined);
7316
7322
  __decorate([
7317
7323
  boundsType(100, true)
7318
- ], exports.UI.prototype, "width", void 0);
7324
+ ], exports.UI.prototype, "width", undefined);
7319
7325
  __decorate([
7320
7326
  boundsType(100, true)
7321
- ], exports.UI.prototype, "height", void 0);
7327
+ ], exports.UI.prototype, "height", undefined);
7322
7328
  __decorate([
7323
7329
  scaleType(1, true)
7324
- ], exports.UI.prototype, "scaleX", void 0);
7330
+ ], exports.UI.prototype, "scaleX", undefined);
7325
7331
  __decorate([
7326
7332
  scaleType(1, true)
7327
- ], exports.UI.prototype, "scaleY", void 0);
7333
+ ], exports.UI.prototype, "scaleY", undefined);
7328
7334
  __decorate([
7329
7335
  rotationType(0, true)
7330
- ], exports.UI.prototype, "rotation", void 0);
7336
+ ], exports.UI.prototype, "rotation", undefined);
7331
7337
  __decorate([
7332
7338
  rotationType(0, true)
7333
- ], exports.UI.prototype, "skewX", void 0);
7339
+ ], exports.UI.prototype, "skewX", undefined);
7334
7340
  __decorate([
7335
7341
  rotationType(0, true)
7336
- ], exports.UI.prototype, "skewY", void 0);
7342
+ ], exports.UI.prototype, "skewY", undefined);
7337
7343
  __decorate([
7338
7344
  positionType(0, true)
7339
- ], exports.UI.prototype, "offsetX", void 0);
7345
+ ], exports.UI.prototype, "offsetX", undefined);
7340
7346
  __decorate([
7341
7347
  positionType(0, true)
7342
- ], exports.UI.prototype, "offsetY", void 0);
7348
+ ], exports.UI.prototype, "offsetY", undefined);
7343
7349
  __decorate([
7344
7350
  positionType(0, true)
7345
- ], exports.UI.prototype, "scrollX", void 0);
7351
+ ], exports.UI.prototype, "scrollX", undefined);
7346
7352
  __decorate([
7347
7353
  positionType(0, true)
7348
- ], exports.UI.prototype, "scrollY", void 0);
7354
+ ], exports.UI.prototype, "scrollY", undefined);
7349
7355
  __decorate([
7350
7356
  autoLayoutType()
7351
- ], exports.UI.prototype, "origin", void 0);
7357
+ ], exports.UI.prototype, "origin", undefined);
7352
7358
  __decorate([
7353
7359
  autoLayoutType()
7354
- ], exports.UI.prototype, "around", void 0);
7360
+ ], exports.UI.prototype, "around", undefined);
7355
7361
  __decorate([
7356
7362
  dataType(false)
7357
- ], exports.UI.prototype, "lazy", void 0);
7363
+ ], exports.UI.prototype, "lazy", undefined);
7358
7364
  __decorate([
7359
7365
  naturalBoundsType(1)
7360
- ], exports.UI.prototype, "pixelRatio", void 0);
7366
+ ], exports.UI.prototype, "pixelRatio", undefined);
7361
7367
  __decorate([
7362
7368
  pathInputType()
7363
- ], exports.UI.prototype, "path", void 0);
7369
+ ], exports.UI.prototype, "path", undefined);
7364
7370
  __decorate([
7365
7371
  pathType()
7366
- ], exports.UI.prototype, "windingRule", void 0);
7372
+ ], exports.UI.prototype, "windingRule", undefined);
7367
7373
  __decorate([
7368
7374
  pathType(true)
7369
- ], exports.UI.prototype, "closed", void 0);
7375
+ ], exports.UI.prototype, "closed", undefined);
7370
7376
  __decorate([
7371
7377
  boundsType(0)
7372
- ], exports.UI.prototype, "padding", void 0);
7378
+ ], exports.UI.prototype, "padding", undefined);
7373
7379
  __decorate([
7374
7380
  boundsType(false)
7375
- ], exports.UI.prototype, "lockRatio", void 0);
7381
+ ], exports.UI.prototype, "lockRatio", undefined);
7376
7382
  __decorate([
7377
7383
  boundsType()
7378
- ], exports.UI.prototype, "widthRange", void 0);
7384
+ ], exports.UI.prototype, "widthRange", undefined);
7379
7385
  __decorate([
7380
7386
  boundsType()
7381
- ], exports.UI.prototype, "heightRange", void 0);
7387
+ ], exports.UI.prototype, "heightRange", undefined);
7382
7388
  __decorate([
7383
7389
  dataType(false)
7384
- ], exports.UI.prototype, "draggable", void 0);
7390
+ ], exports.UI.prototype, "draggable", undefined);
7385
7391
  __decorate([
7386
7392
  dataType()
7387
- ], exports.UI.prototype, "dragBounds", void 0);
7393
+ ], exports.UI.prototype, "dragBounds", undefined);
7388
7394
  __decorate([
7389
7395
  dataType(false)
7390
- ], exports.UI.prototype, "editable", void 0);
7396
+ ], exports.UI.prototype, "editable", undefined);
7391
7397
  __decorate([
7392
7398
  hitType(true)
7393
- ], exports.UI.prototype, "hittable", void 0);
7399
+ ], exports.UI.prototype, "hittable", undefined);
7394
7400
  __decorate([
7395
7401
  hitType('path')
7396
- ], exports.UI.prototype, "hitFill", void 0);
7402
+ ], exports.UI.prototype, "hitFill", undefined);
7397
7403
  __decorate([
7398
7404
  strokeType('path')
7399
- ], exports.UI.prototype, "hitStroke", void 0);
7405
+ ], exports.UI.prototype, "hitStroke", undefined);
7400
7406
  __decorate([
7401
7407
  hitType(false)
7402
- ], exports.UI.prototype, "hitBox", void 0);
7408
+ ], exports.UI.prototype, "hitBox", undefined);
7403
7409
  __decorate([
7404
7410
  hitType(true)
7405
- ], exports.UI.prototype, "hitChildren", void 0);
7411
+ ], exports.UI.prototype, "hitChildren", undefined);
7406
7412
  __decorate([
7407
7413
  hitType(true)
7408
- ], exports.UI.prototype, "hitSelf", void 0);
7414
+ ], exports.UI.prototype, "hitSelf", undefined);
7409
7415
  __decorate([
7410
7416
  hitType()
7411
- ], exports.UI.prototype, "hitRadius", void 0);
7417
+ ], exports.UI.prototype, "hitRadius", undefined);
7412
7418
  __decorate([
7413
7419
  cursorType('')
7414
- ], exports.UI.prototype, "cursor", void 0);
7420
+ ], exports.UI.prototype, "cursor", undefined);
7415
7421
  __decorate([
7416
7422
  surfaceType()
7417
- ], exports.UI.prototype, "fill", void 0);
7423
+ ], exports.UI.prototype, "fill", undefined);
7418
7424
  __decorate([
7419
7425
  strokeType()
7420
- ], exports.UI.prototype, "stroke", void 0);
7426
+ ], exports.UI.prototype, "stroke", undefined);
7421
7427
  __decorate([
7422
7428
  strokeType('inside')
7423
- ], exports.UI.prototype, "strokeAlign", void 0);
7429
+ ], exports.UI.prototype, "strokeAlign", undefined);
7424
7430
  __decorate([
7425
7431
  strokeType(1)
7426
- ], exports.UI.prototype, "strokeWidth", void 0);
7432
+ ], exports.UI.prototype, "strokeWidth", undefined);
7427
7433
  __decorate([
7428
7434
  strokeType(false)
7429
- ], exports.UI.prototype, "strokeWidthFixed", void 0);
7435
+ ], exports.UI.prototype, "strokeWidthFixed", undefined);
7430
7436
  __decorate([
7431
7437
  strokeType('none')
7432
- ], exports.UI.prototype, "strokeCap", void 0);
7438
+ ], exports.UI.prototype, "strokeCap", undefined);
7433
7439
  __decorate([
7434
7440
  strokeType('miter')
7435
- ], exports.UI.prototype, "strokeJoin", void 0);
7441
+ ], exports.UI.prototype, "strokeJoin", undefined);
7436
7442
  __decorate([
7437
7443
  strokeType()
7438
- ], exports.UI.prototype, "dashPattern", void 0);
7444
+ ], exports.UI.prototype, "dashPattern", undefined);
7439
7445
  __decorate([
7440
7446
  strokeType()
7441
- ], exports.UI.prototype, "dashOffset", void 0);
7447
+ ], exports.UI.prototype, "dashOffset", undefined);
7442
7448
  __decorate([
7443
7449
  strokeType(10)
7444
- ], exports.UI.prototype, "miterLimit", void 0);
7450
+ ], exports.UI.prototype, "miterLimit", undefined);
7445
7451
  __decorate([
7446
7452
  pathType(0)
7447
- ], exports.UI.prototype, "cornerRadius", void 0);
7453
+ ], exports.UI.prototype, "cornerRadius", undefined);
7448
7454
  __decorate([
7449
7455
  pathType()
7450
- ], exports.UI.prototype, "cornerSmoothing", void 0);
7456
+ ], exports.UI.prototype, "cornerSmoothing", undefined);
7451
7457
  __decorate([
7452
7458
  effectType()
7453
- ], exports.UI.prototype, "shadow", void 0);
7459
+ ], exports.UI.prototype, "shadow", undefined);
7454
7460
  __decorate([
7455
7461
  effectType()
7456
- ], exports.UI.prototype, "innerShadow", void 0);
7462
+ ], exports.UI.prototype, "innerShadow", undefined);
7457
7463
  __decorate([
7458
7464
  effectType()
7459
- ], exports.UI.prototype, "blur", void 0);
7465
+ ], exports.UI.prototype, "blur", undefined);
7460
7466
  __decorate([
7461
7467
  effectType()
7462
- ], exports.UI.prototype, "backgroundBlur", void 0);
7468
+ ], exports.UI.prototype, "backgroundBlur", undefined);
7463
7469
  __decorate([
7464
7470
  effectType()
7465
- ], exports.UI.prototype, "grayscale", void 0);
7471
+ ], exports.UI.prototype, "grayscale", undefined);
7466
7472
  __decorate([
7467
7473
  dataType({})
7468
- ], exports.UI.prototype, "data", void 0);
7474
+ ], exports.UI.prototype, "data", undefined);
7469
7475
  __decorate([
7470
7476
  rewrite(exports.Leaf.prototype.reset)
7471
7477
  ], exports.UI.prototype, "reset", null);
@@ -7526,7 +7532,7 @@ var LeaferUI = (function (exports) {
7526
7532
  };
7527
7533
  __decorate([
7528
7534
  dataProcessor(GroupData)
7529
- ], exports.Group.prototype, "__", void 0);
7535
+ ], exports.Group.prototype, "__", undefined);
7530
7536
  exports.Group = __decorate([
7531
7537
  useModule(exports.Branch),
7532
7538
  registerUI()
@@ -7697,8 +7703,6 @@ var LeaferUI = (function (exports) {
7697
7703
  __setAttr(attrName, newValue) {
7698
7704
  if (this.canvas) {
7699
7705
  if (canvasSizeAttrs.includes(attrName)) {
7700
- if (!newValue)
7701
- debug.warn(attrName + ' is 0');
7702
7706
  this.__changeCanvasSize(attrName, newValue);
7703
7707
  }
7704
7708
  else if (attrName === 'fill') {
@@ -7901,10 +7905,10 @@ var LeaferUI = (function (exports) {
7901
7905
  exports.Leafer.list = new LeafList();
7902
7906
  __decorate([
7903
7907
  dataProcessor(LeaferData)
7904
- ], exports.Leafer.prototype, "__", void 0);
7908
+ ], exports.Leafer.prototype, "__", undefined);
7905
7909
  __decorate([
7906
7910
  boundsType()
7907
- ], exports.Leafer.prototype, "pixelRatio", void 0);
7911
+ ], exports.Leafer.prototype, "pixelRatio", undefined);
7908
7912
  exports.Leafer = Leafer_1 = __decorate([
7909
7913
  registerUI()
7910
7914
  ], exports.Leafer);
@@ -7917,7 +7921,7 @@ var LeaferUI = (function (exports) {
7917
7921
  };
7918
7922
  __decorate([
7919
7923
  dataProcessor(RectData)
7920
- ], exports.Rect.prototype, "__", void 0);
7924
+ ], exports.Rect.prototype, "__", undefined);
7921
7925
  exports.Rect = __decorate([
7922
7926
  useModule(RectRender),
7923
7927
  rewriteAble(),
@@ -7942,6 +7946,8 @@ var LeaferUI = (function (exports) {
7942
7946
  const data = this.__;
7943
7947
  if (this.children.length) {
7944
7948
  if (data.__autoSide) {
7949
+ if (data.__hasSurface)
7950
+ this.__extraUpdate();
7945
7951
  super.__updateBoxBounds();
7946
7952
  const { boxBounds } = this.__layout;
7947
7953
  if (!data.__autoSize) {
@@ -8006,13 +8012,13 @@ var LeaferUI = (function (exports) {
8006
8012
  };
8007
8013
  __decorate([
8008
8014
  dataProcessor(BoxData)
8009
- ], exports.Box.prototype, "__", void 0);
8015
+ ], exports.Box.prototype, "__", undefined);
8010
8016
  __decorate([
8011
8017
  dataType(false)
8012
- ], exports.Box.prototype, "resizeChildren", void 0);
8018
+ ], exports.Box.prototype, "resizeChildren", undefined);
8013
8019
  __decorate([
8014
8020
  affectRenderBoundsType('show')
8015
- ], exports.Box.prototype, "overflow", void 0);
8021
+ ], exports.Box.prototype, "overflow", undefined);
8016
8022
  __decorate([
8017
8023
  rewrite(rect.__updateStrokeSpread)
8018
8024
  ], exports.Box.prototype, "__updateStrokeSpread", null);
@@ -8051,13 +8057,13 @@ var LeaferUI = (function (exports) {
8051
8057
  };
8052
8058
  __decorate([
8053
8059
  dataProcessor(FrameData)
8054
- ], exports.Frame.prototype, "__", void 0);
8060
+ ], exports.Frame.prototype, "__", undefined);
8055
8061
  __decorate([
8056
8062
  surfaceType('#FFFFFF')
8057
- ], exports.Frame.prototype, "fill", void 0);
8063
+ ], exports.Frame.prototype, "fill", undefined);
8058
8064
  __decorate([
8059
8065
  affectRenderBoundsType('hide')
8060
- ], exports.Frame.prototype, "overflow", void 0);
8066
+ ], exports.Frame.prototype, "overflow", undefined);
8061
8067
  exports.Frame = __decorate([
8062
8068
  registerUI()
8063
8069
  ], exports.Frame);
@@ -8104,16 +8110,16 @@ var LeaferUI = (function (exports) {
8104
8110
  };
8105
8111
  __decorate([
8106
8112
  dataProcessor(EllipseData)
8107
- ], exports.Ellipse.prototype, "__", void 0);
8113
+ ], exports.Ellipse.prototype, "__", undefined);
8108
8114
  __decorate([
8109
8115
  pathType(0)
8110
- ], exports.Ellipse.prototype, "innerRadius", void 0);
8116
+ ], exports.Ellipse.prototype, "innerRadius", undefined);
8111
8117
  __decorate([
8112
8118
  pathType(0)
8113
- ], exports.Ellipse.prototype, "startAngle", void 0);
8119
+ ], exports.Ellipse.prototype, "startAngle", undefined);
8114
8120
  __decorate([
8115
8121
  pathType(0)
8116
- ], exports.Ellipse.prototype, "endAngle", void 0);
8122
+ ], exports.Ellipse.prototype, "endAngle", undefined);
8117
8123
  exports.Ellipse = __decorate([
8118
8124
  registerUI()
8119
8125
  ], exports.Ellipse);
@@ -8172,22 +8178,22 @@ var LeaferUI = (function (exports) {
8172
8178
  };
8173
8179
  __decorate([
8174
8180
  dataProcessor(LineData)
8175
- ], exports.Line.prototype, "__", void 0);
8181
+ ], exports.Line.prototype, "__", undefined);
8176
8182
  __decorate([
8177
8183
  affectStrokeBoundsType('center')
8178
- ], exports.Line.prototype, "strokeAlign", void 0);
8184
+ ], exports.Line.prototype, "strokeAlign", undefined);
8179
8185
  __decorate([
8180
8186
  boundsType(0)
8181
- ], exports.Line.prototype, "height", void 0);
8187
+ ], exports.Line.prototype, "height", undefined);
8182
8188
  __decorate([
8183
8189
  pathType()
8184
- ], exports.Line.prototype, "points", void 0);
8190
+ ], exports.Line.prototype, "points", undefined);
8185
8191
  __decorate([
8186
8192
  pathType(0)
8187
- ], exports.Line.prototype, "curve", void 0);
8193
+ ], exports.Line.prototype, "curve", undefined);
8188
8194
  __decorate([
8189
8195
  pathType(false)
8190
- ], exports.Line.prototype, "closed", void 0);
8196
+ ], exports.Line.prototype, "closed", undefined);
8191
8197
  exports.Line = __decorate([
8192
8198
  registerUI()
8193
8199
  ], exports.Line);
@@ -8220,16 +8226,16 @@ var LeaferUI = (function (exports) {
8220
8226
  };
8221
8227
  __decorate([
8222
8228
  dataProcessor(PolygonData)
8223
- ], exports.Polygon.prototype, "__", void 0);
8229
+ ], exports.Polygon.prototype, "__", undefined);
8224
8230
  __decorate([
8225
8231
  pathType(3)
8226
- ], exports.Polygon.prototype, "sides", void 0);
8232
+ ], exports.Polygon.prototype, "sides", undefined);
8227
8233
  __decorate([
8228
8234
  pathType()
8229
- ], exports.Polygon.prototype, "points", void 0);
8235
+ ], exports.Polygon.prototype, "points", undefined);
8230
8236
  __decorate([
8231
8237
  pathType(0)
8232
- ], exports.Polygon.prototype, "curve", void 0);
8238
+ ], exports.Polygon.prototype, "curve", undefined);
8233
8239
  __decorate([
8234
8240
  rewrite(line.__updateRenderPath)
8235
8241
  ], exports.Polygon.prototype, "__updateRenderPath", null);
@@ -8261,13 +8267,13 @@ var LeaferUI = (function (exports) {
8261
8267
  };
8262
8268
  __decorate([
8263
8269
  dataProcessor(StarData)
8264
- ], exports.Star.prototype, "__", void 0);
8270
+ ], exports.Star.prototype, "__", undefined);
8265
8271
  __decorate([
8266
8272
  pathType(5)
8267
- ], exports.Star.prototype, "corners", void 0);
8273
+ ], exports.Star.prototype, "corners", undefined);
8268
8274
  __decorate([
8269
8275
  pathType(0.382)
8270
- ], exports.Star.prototype, "innerRadius", void 0);
8276
+ ], exports.Star.prototype, "innerRadius", undefined);
8271
8277
  exports.Star = __decorate([
8272
8278
  registerUI()
8273
8279
  ], exports.Star);
@@ -8289,10 +8295,10 @@ var LeaferUI = (function (exports) {
8289
8295
  };
8290
8296
  __decorate([
8291
8297
  dataProcessor(ImageData)
8292
- ], exports.Image.prototype, "__", void 0);
8298
+ ], exports.Image.prototype, "__", undefined);
8293
8299
  __decorate([
8294
8300
  boundsType('')
8295
- ], exports.Image.prototype, "url", void 0);
8301
+ ], exports.Image.prototype, "url", undefined);
8296
8302
  exports.Image = __decorate([
8297
8303
  registerUI()
8298
8304
  ], exports.Image);
@@ -8355,25 +8361,25 @@ var LeaferUI = (function (exports) {
8355
8361
  };
8356
8362
  __decorate([
8357
8363
  dataProcessor(CanvasData)
8358
- ], exports.Canvas.prototype, "__", void 0);
8364
+ ], exports.Canvas.prototype, "__", undefined);
8359
8365
  __decorate([
8360
8366
  resizeType(100)
8361
- ], exports.Canvas.prototype, "width", void 0);
8367
+ ], exports.Canvas.prototype, "width", undefined);
8362
8368
  __decorate([
8363
8369
  resizeType(100)
8364
- ], exports.Canvas.prototype, "height", void 0);
8370
+ ], exports.Canvas.prototype, "height", undefined);
8365
8371
  __decorate([
8366
8372
  resizeType(1)
8367
- ], exports.Canvas.prototype, "pixelRatio", void 0);
8373
+ ], exports.Canvas.prototype, "pixelRatio", undefined);
8368
8374
  __decorate([
8369
8375
  resizeType(true)
8370
- ], exports.Canvas.prototype, "smooth", void 0);
8376
+ ], exports.Canvas.prototype, "smooth", undefined);
8371
8377
  __decorate([
8372
8378
  dataType(false)
8373
- ], exports.Canvas.prototype, "safeResize", void 0);
8379
+ ], exports.Canvas.prototype, "safeResize", undefined);
8374
8380
  __decorate([
8375
8381
  resizeType()
8376
- ], exports.Canvas.prototype, "contextSettings", void 0);
8382
+ ], exports.Canvas.prototype, "contextSettings", undefined);
8377
8383
  exports.Canvas = __decorate([
8378
8384
  registerUI()
8379
8385
  ], exports.Canvas);
@@ -8464,76 +8470,76 @@ var LeaferUI = (function (exports) {
8464
8470
  };
8465
8471
  __decorate([
8466
8472
  dataProcessor(TextData)
8467
- ], exports.Text.prototype, "__", void 0);
8473
+ ], exports.Text.prototype, "__", undefined);
8468
8474
  __decorate([
8469
8475
  boundsType(0)
8470
- ], exports.Text.prototype, "width", void 0);
8476
+ ], exports.Text.prototype, "width", undefined);
8471
8477
  __decorate([
8472
8478
  boundsType(0)
8473
- ], exports.Text.prototype, "height", void 0);
8479
+ ], exports.Text.prototype, "height", undefined);
8474
8480
  __decorate([
8475
8481
  dataType(false)
8476
- ], exports.Text.prototype, "resizeFontSize", void 0);
8482
+ ], exports.Text.prototype, "resizeFontSize", undefined);
8477
8483
  __decorate([
8478
8484
  surfaceType('#000000')
8479
- ], exports.Text.prototype, "fill", void 0);
8485
+ ], exports.Text.prototype, "fill", undefined);
8480
8486
  __decorate([
8481
8487
  affectStrokeBoundsType('outside')
8482
- ], exports.Text.prototype, "strokeAlign", void 0);
8488
+ ], exports.Text.prototype, "strokeAlign", undefined);
8483
8489
  __decorate([
8484
8490
  hitType('all')
8485
- ], exports.Text.prototype, "hitFill", void 0);
8491
+ ], exports.Text.prototype, "hitFill", undefined);
8486
8492
  __decorate([
8487
8493
  boundsType('')
8488
- ], exports.Text.prototype, "text", void 0);
8494
+ ], exports.Text.prototype, "text", undefined);
8489
8495
  __decorate([
8490
- boundsType('L')
8491
- ], exports.Text.prototype, "fontFamily", void 0);
8496
+ boundsType('caption')
8497
+ ], exports.Text.prototype, "fontFamily", undefined);
8492
8498
  __decorate([
8493
8499
  boundsType(12)
8494
- ], exports.Text.prototype, "fontSize", void 0);
8500
+ ], exports.Text.prototype, "fontSize", undefined);
8495
8501
  __decorate([
8496
8502
  boundsType('normal')
8497
- ], exports.Text.prototype, "fontWeight", void 0);
8503
+ ], exports.Text.prototype, "fontWeight", undefined);
8498
8504
  __decorate([
8499
8505
  boundsType(false)
8500
- ], exports.Text.prototype, "italic", void 0);
8506
+ ], exports.Text.prototype, "italic", undefined);
8501
8507
  __decorate([
8502
8508
  boundsType('none')
8503
- ], exports.Text.prototype, "textCase", void 0);
8509
+ ], exports.Text.prototype, "textCase", undefined);
8504
8510
  __decorate([
8505
8511
  boundsType('none')
8506
- ], exports.Text.prototype, "textDecoration", void 0);
8512
+ ], exports.Text.prototype, "textDecoration", undefined);
8507
8513
  __decorate([
8508
8514
  boundsType(0)
8509
- ], exports.Text.prototype, "letterSpacing", void 0);
8515
+ ], exports.Text.prototype, "letterSpacing", undefined);
8510
8516
  __decorate([
8511
8517
  boundsType({ type: 'percent', value: 1.5 })
8512
- ], exports.Text.prototype, "lineHeight", void 0);
8518
+ ], exports.Text.prototype, "lineHeight", undefined);
8513
8519
  __decorate([
8514
8520
  boundsType(0)
8515
- ], exports.Text.prototype, "paraIndent", void 0);
8521
+ ], exports.Text.prototype, "paraIndent", undefined);
8516
8522
  __decorate([
8517
8523
  boundsType(0)
8518
- ], exports.Text.prototype, "paraSpacing", void 0);
8524
+ ], exports.Text.prototype, "paraSpacing", undefined);
8519
8525
  __decorate([
8520
8526
  boundsType('x')
8521
- ], exports.Text.prototype, "writingMode", void 0);
8527
+ ], exports.Text.prototype, "writingMode", undefined);
8522
8528
  __decorate([
8523
8529
  boundsType('left')
8524
- ], exports.Text.prototype, "textAlign", void 0);
8530
+ ], exports.Text.prototype, "textAlign", undefined);
8525
8531
  __decorate([
8526
8532
  boundsType('top')
8527
- ], exports.Text.prototype, "verticalAlign", void 0);
8533
+ ], exports.Text.prototype, "verticalAlign", undefined);
8528
8534
  __decorate([
8529
8535
  boundsType(true)
8530
- ], exports.Text.prototype, "autoSizeAlign", void 0);
8536
+ ], exports.Text.prototype, "autoSizeAlign", undefined);
8531
8537
  __decorate([
8532
8538
  boundsType('normal')
8533
- ], exports.Text.prototype, "textWrap", void 0);
8539
+ ], exports.Text.prototype, "textWrap", undefined);
8534
8540
  __decorate([
8535
8541
  boundsType('show')
8536
- ], exports.Text.prototype, "textOverflow", void 0);
8542
+ ], exports.Text.prototype, "textOverflow", undefined);
8537
8543
  exports.Text = __decorate([
8538
8544
  registerUI()
8539
8545
  ], exports.Text);
@@ -8546,10 +8552,10 @@ var LeaferUI = (function (exports) {
8546
8552
  };
8547
8553
  __decorate([
8548
8554
  dataProcessor(PathData)
8549
- ], exports.Path.prototype, "__", void 0);
8555
+ ], exports.Path.prototype, "__", undefined);
8550
8556
  __decorate([
8551
8557
  affectStrokeBoundsType('center')
8552
- ], exports.Path.prototype, "strokeAlign", void 0);
8558
+ ], exports.Path.prototype, "strokeAlign", undefined);
8553
8559
  exports.Path = __decorate([
8554
8560
  registerUI()
8555
8561
  ], exports.Path);
@@ -8588,10 +8594,10 @@ var LeaferUI = (function (exports) {
8588
8594
  };
8589
8595
  __decorate([
8590
8596
  dataProcessor(PenData)
8591
- ], exports.Pen.prototype, "__", void 0);
8597
+ ], exports.Pen.prototype, "__", undefined);
8592
8598
  __decorate([
8593
8599
  penPathType()
8594
- ], exports.Pen.prototype, "path", void 0);
8600
+ ], exports.Pen.prototype, "path", undefined);
8595
8601
  exports.Pen = __decorate([
8596
8602
  useModule(PathCreator, ['set', 'path', 'paint']),
8597
8603
  registerUI()
@@ -9225,7 +9231,7 @@ var LeaferUI = (function (exports) {
9225
9231
  }
9226
9232
  else {
9227
9233
  if (!paint.patternTask) {
9228
- paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
9234
+ paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
9229
9235
  paint.patternTask = null;
9230
9236
  if (canvas.bounds.hit(ui.__nowWorld))
9231
9237
  createPattern(ui, paint, pixelRatio);
@@ -9381,7 +9387,7 @@ var LeaferUI = (function (exports) {
9381
9387
  const end = shadow.length - 1;
9382
9388
  toOffsetOutBounds$1(bounds, offsetOutBounds$1);
9383
9389
  shadow.forEach((item, index) => {
9384
- other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
9390
+ other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
9385
9391
  spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
9386
9392
  drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
9387
9393
  copyBounds = bounds;
@@ -9457,7 +9463,7 @@ var LeaferUI = (function (exports) {
9457
9463
  other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
9458
9464
  copyBounds = bounds;
9459
9465
  }
9460
- other.fillWorld(copyBounds, item.color, 'source-in');
9466
+ other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
9461
9467
  if (ui.__worldFlipped) {
9462
9468
  current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
9463
9469
  }
@@ -9815,11 +9821,11 @@ var LeaferUI = (function (exports) {
9815
9821
  function layoutChar(drawData, style, width, _height) {
9816
9822
  const { rows } = drawData;
9817
9823
  const { textAlign, paraIndent, letterSpacing } = style;
9818
- let charX, addWordWidth, indentWidth, mode, wordChar;
9824
+ let charX, addWordWidth, indentWidth, mode, wordChar, wordsLength;
9819
9825
  rows.forEach(row => {
9820
9826
  if (row.words) {
9821
- indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
9822
- addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
9827
+ indentWidth = paraIndent && row.paraStart ? paraIndent : 0, wordsLength = row.words.length;
9828
+ addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && wordsLength > 1) ? (width - row.width - indentWidth) / (wordsLength - 1) : 0;
9823
9829
  mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
9824
9830
  if (row.isOverflow && !letterSpacing)
9825
9831
  row.textMode = true;
@@ -9831,7 +9837,7 @@ var LeaferUI = (function (exports) {
9831
9837
  row.x += indentWidth;
9832
9838
  charX = row.x;
9833
9839
  row.data = [];
9834
- row.words.forEach(word => {
9840
+ row.words.forEach((word, index) => {
9835
9841
  if (mode === WordMode) {
9836
9842
  wordChar = { char: '', x: charX };
9837
9843
  charX = toWordChar(word.data, charX, wordChar);
@@ -9841,7 +9847,7 @@ var LeaferUI = (function (exports) {
9841
9847
  else {
9842
9848
  charX = toChar(word.data, charX, row.data, row.isOverflow);
9843
9849
  }
9844
- if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
9850
+ if (addWordWidth && (!row.paraEnd || textAlign === 'both') && (index !== wordsLength - 1)) {
9845
9851
  charX += addWordWidth;
9846
9852
  row.width += addWordWidth;
9847
9853
  }
@@ -10250,3 +10256,4 @@ var LeaferUI = (function (exports) {
10250
10256
  return exports;
10251
10257
 
10252
10258
  })({});
10259
+ //# sourceMappingURL=worker.js.map