@leafer-draw/worker 1.3.1 → 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/worker.cjs +8 -8
- package/dist/worker.esm.js +8 -8
- package/dist/worker.esm.min.js +1 -1
- package/dist/worker.js +199 -184
- package/dist/worker.min.cjs +1 -1
- package/dist/worker.min.js +1 -1
- package/dist/worker.module.js +199 -184
- package/dist/worker.module.min.js +1 -1
- package/package.json +7 -7
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 ===
|
|
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 ===
|
|
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
|
|
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
|
|
1837
|
-
createLinearGradient(_x0, _y0, _x1, _y1) { return
|
|
1838
|
-
createPattern(_image, _repetition) { return
|
|
1839
|
-
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return
|
|
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
|
|
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",
|
|
1849
|
+
], Canvas.prototype, "smooth", undefined);
|
|
1850
1850
|
__decorate([
|
|
1851
1851
|
contextAttr('imageSmoothingQuality')
|
|
1852
|
-
], Canvas.prototype, "smoothLevel",
|
|
1852
|
+
], Canvas.prototype, "smoothLevel", undefined);
|
|
1853
1853
|
__decorate([
|
|
1854
1854
|
contextAttr('globalAlpha')
|
|
1855
|
-
], Canvas.prototype, "opacity",
|
|
1855
|
+
], Canvas.prototype, "opacity", undefined);
|
|
1856
1856
|
__decorate([
|
|
1857
1857
|
contextAttr()
|
|
1858
|
-
], Canvas.prototype, "fillStyle",
|
|
1858
|
+
], Canvas.prototype, "fillStyle", undefined);
|
|
1859
1859
|
__decorate([
|
|
1860
1860
|
contextAttr()
|
|
1861
|
-
], Canvas.prototype, "strokeStyle",
|
|
1861
|
+
], Canvas.prototype, "strokeStyle", undefined);
|
|
1862
1862
|
__decorate([
|
|
1863
1863
|
contextAttr('lineWidth')
|
|
1864
|
-
], Canvas.prototype, "strokeWidth",
|
|
1864
|
+
], Canvas.prototype, "strokeWidth", undefined);
|
|
1865
1865
|
__decorate([
|
|
1866
1866
|
contextAttr('lineCap')
|
|
1867
|
-
], Canvas.prototype, "strokeCap",
|
|
1867
|
+
], Canvas.prototype, "strokeCap", undefined);
|
|
1868
1868
|
__decorate([
|
|
1869
1869
|
contextAttr('lineJoin')
|
|
1870
|
-
], Canvas.prototype, "strokeJoin",
|
|
1870
|
+
], Canvas.prototype, "strokeJoin", undefined);
|
|
1871
1871
|
__decorate([
|
|
1872
1872
|
contextAttr('lineDashOffset')
|
|
1873
|
-
], Canvas.prototype, "dashOffset",
|
|
1873
|
+
], Canvas.prototype, "dashOffset", undefined);
|
|
1874
1874
|
__decorate([
|
|
1875
1875
|
contextAttr()
|
|
1876
|
-
], Canvas.prototype, "miterLimit",
|
|
1876
|
+
], Canvas.prototype, "miterLimit", undefined);
|
|
1877
1877
|
__decorate([
|
|
1878
1878
|
contextAttr()
|
|
1879
|
-
], Canvas.prototype, "shadowBlur",
|
|
1879
|
+
], Canvas.prototype, "shadowBlur", undefined);
|
|
1880
1880
|
__decorate([
|
|
1881
1881
|
contextAttr()
|
|
1882
|
-
], Canvas.prototype, "shadowColor",
|
|
1882
|
+
], Canvas.prototype, "shadowColor", undefined);
|
|
1883
1883
|
__decorate([
|
|
1884
1884
|
contextAttr()
|
|
1885
|
-
], Canvas.prototype, "shadowOffsetX",
|
|
1885
|
+
], Canvas.prototype, "shadowOffsetX", undefined);
|
|
1886
1886
|
__decorate([
|
|
1887
1887
|
contextAttr()
|
|
1888
|
-
], Canvas.prototype, "shadowOffsetY",
|
|
1888
|
+
], Canvas.prototype, "shadowOffsetY", undefined);
|
|
1889
1889
|
__decorate([
|
|
1890
1890
|
contextAttr()
|
|
1891
|
-
], Canvas.prototype, "filter",
|
|
1891
|
+
], Canvas.prototype, "filter", undefined);
|
|
1892
1892
|
__decorate([
|
|
1893
1893
|
contextAttr()
|
|
1894
|
-
], Canvas.prototype, "font",
|
|
1894
|
+
], Canvas.prototype, "font", undefined);
|
|
1895
1895
|
__decorate([
|
|
1896
1896
|
contextAttr()
|
|
1897
|
-
], Canvas.prototype, "fontKerning",
|
|
1897
|
+
], Canvas.prototype, "fontKerning", undefined);
|
|
1898
1898
|
__decorate([
|
|
1899
1899
|
contextAttr()
|
|
1900
|
-
], Canvas.prototype, "fontStretch",
|
|
1900
|
+
], Canvas.prototype, "fontStretch", undefined);
|
|
1901
1901
|
__decorate([
|
|
1902
1902
|
contextAttr()
|
|
1903
|
-
], Canvas.prototype, "fontVariantCaps",
|
|
1903
|
+
], Canvas.prototype, "fontVariantCaps", undefined);
|
|
1904
1904
|
__decorate([
|
|
1905
1905
|
contextAttr()
|
|
1906
|
-
], Canvas.prototype, "textAlign",
|
|
1906
|
+
], Canvas.prototype, "textAlign", undefined);
|
|
1907
1907
|
__decorate([
|
|
1908
1908
|
contextAttr()
|
|
1909
|
-
], Canvas.prototype, "textBaseline",
|
|
1909
|
+
], Canvas.prototype, "textBaseline", undefined);
|
|
1910
1910
|
__decorate([
|
|
1911
1911
|
contextAttr()
|
|
1912
|
-
], Canvas.prototype, "textRendering",
|
|
1912
|
+
], Canvas.prototype, "textRendering", undefined);
|
|
1913
1913
|
__decorate([
|
|
1914
1914
|
contextAttr()
|
|
1915
|
-
], Canvas.prototype, "wordSpacing",
|
|
1915
|
+
], Canvas.prototype, "wordSpacing", undefined);
|
|
1916
1916
|
__decorate([
|
|
1917
1917
|
contextAttr()
|
|
1918
|
-
], Canvas.prototype, "letterSpacing",
|
|
1918
|
+
], Canvas.prototype, "letterSpacing", undefined);
|
|
1919
1919
|
__decorate([
|
|
1920
1920
|
contextAttr()
|
|
1921
|
-
], Canvas.prototype, "direction",
|
|
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,
|
|
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,
|
|
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
|
-
|
|
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() {
|
|
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.
|
|
6016
|
+
const version = "1.3.3";
|
|
6014
6017
|
|
|
6015
6018
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6016
6019
|
get allowBackgroundColor() { return true; }
|
|
@@ -6355,7 +6358,7 @@ var LeaferUI = (function (exports) {
|
|
|
6355
6358
|
}
|
|
6356
6359
|
partLayout() {
|
|
6357
6360
|
var _a;
|
|
6358
|
-
if (!((_a = this.__updatedList) === null || _a ===
|
|
6361
|
+
if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
|
|
6359
6362
|
return;
|
|
6360
6363
|
const t = Run.start('PartLayout');
|
|
6361
6364
|
const { target, __updatedList: updateList } = this;
|
|
@@ -6542,7 +6545,7 @@ var LeaferUI = (function (exports) {
|
|
|
6542
6545
|
partRender() {
|
|
6543
6546
|
const { canvas, updateBlocks: list } = this;
|
|
6544
6547
|
if (!list)
|
|
6545
|
-
return
|
|
6548
|
+
return;
|
|
6546
6549
|
this.mergeBlocks();
|
|
6547
6550
|
list.forEach(block => { if (canvas.bounds.hit(block) && !block.isEmpty())
|
|
6548
6551
|
this.clipRender(block); });
|
|
@@ -6770,6 +6773,7 @@ var LeaferUI = (function (exports) {
|
|
|
6770
6773
|
return t.fill && this.__hasStroke;
|
|
6771
6774
|
}
|
|
6772
6775
|
get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
|
|
6776
|
+
get __hasSurface() { const t = this; return (t.fill || t.stroke); }
|
|
6773
6777
|
get __autoWidth() { return !this._width; }
|
|
6774
6778
|
get __autoHeight() { return !this._height; }
|
|
6775
6779
|
get __autoSide() { return !this._width || !this._height; }
|
|
@@ -7242,7 +7246,7 @@ var LeaferUI = (function (exports) {
|
|
|
7242
7246
|
animate(_keyframe, _options, _type, _isTemp) {
|
|
7243
7247
|
return Plugin.need('animate');
|
|
7244
7248
|
}
|
|
7245
|
-
killAnimate(_type,
|
|
7249
|
+
killAnimate(_type, _nextStyle) { }
|
|
7246
7250
|
export(_filename, _options) {
|
|
7247
7251
|
return Plugin.need('export');
|
|
7248
7252
|
}
|
|
@@ -7273,199 +7277,199 @@ var LeaferUI = (function (exports) {
|
|
|
7273
7277
|
};
|
|
7274
7278
|
__decorate([
|
|
7275
7279
|
dataProcessor(UIData)
|
|
7276
|
-
], exports.UI.prototype, "__",
|
|
7280
|
+
], exports.UI.prototype, "__", undefined);
|
|
7277
7281
|
__decorate([
|
|
7278
7282
|
zoomLayerType()
|
|
7279
|
-
], exports.UI.prototype, "zoomLayer",
|
|
7283
|
+
], exports.UI.prototype, "zoomLayer", undefined);
|
|
7280
7284
|
__decorate([
|
|
7281
7285
|
dataType('')
|
|
7282
|
-
], exports.UI.prototype, "id",
|
|
7286
|
+
], exports.UI.prototype, "id", undefined);
|
|
7283
7287
|
__decorate([
|
|
7284
7288
|
dataType('')
|
|
7285
|
-
], exports.UI.prototype, "name",
|
|
7289
|
+
], exports.UI.prototype, "name", undefined);
|
|
7286
7290
|
__decorate([
|
|
7287
7291
|
dataType('')
|
|
7288
|
-
], exports.UI.prototype, "className",
|
|
7292
|
+
], exports.UI.prototype, "className", undefined);
|
|
7289
7293
|
__decorate([
|
|
7290
7294
|
surfaceType('pass-through')
|
|
7291
|
-
], exports.UI.prototype, "blendMode",
|
|
7295
|
+
], exports.UI.prototype, "blendMode", undefined);
|
|
7292
7296
|
__decorate([
|
|
7293
7297
|
opacityType(1)
|
|
7294
|
-
], exports.UI.prototype, "opacity",
|
|
7298
|
+
], exports.UI.prototype, "opacity", undefined);
|
|
7295
7299
|
__decorate([
|
|
7296
7300
|
visibleType(true)
|
|
7297
|
-
], exports.UI.prototype, "visible",
|
|
7301
|
+
], exports.UI.prototype, "visible", undefined);
|
|
7298
7302
|
__decorate([
|
|
7299
7303
|
surfaceType(false)
|
|
7300
|
-
], exports.UI.prototype, "locked",
|
|
7304
|
+
], exports.UI.prototype, "locked", undefined);
|
|
7301
7305
|
__decorate([
|
|
7302
7306
|
sortType(0)
|
|
7303
|
-
], exports.UI.prototype, "zIndex",
|
|
7307
|
+
], exports.UI.prototype, "zIndex", undefined);
|
|
7304
7308
|
__decorate([
|
|
7305
7309
|
maskType(false)
|
|
7306
|
-
], exports.UI.prototype, "mask",
|
|
7310
|
+
], exports.UI.prototype, "mask", undefined);
|
|
7307
7311
|
__decorate([
|
|
7308
7312
|
eraserType(false)
|
|
7309
|
-
], exports.UI.prototype, "eraser",
|
|
7313
|
+
], exports.UI.prototype, "eraser", undefined);
|
|
7310
7314
|
__decorate([
|
|
7311
7315
|
positionType(0, true)
|
|
7312
|
-
], exports.UI.prototype, "x",
|
|
7316
|
+
], exports.UI.prototype, "x", undefined);
|
|
7313
7317
|
__decorate([
|
|
7314
7318
|
positionType(0, true)
|
|
7315
|
-
], exports.UI.prototype, "y",
|
|
7319
|
+
], exports.UI.prototype, "y", undefined);
|
|
7316
7320
|
__decorate([
|
|
7317
7321
|
boundsType(100, true)
|
|
7318
|
-
], exports.UI.prototype, "width",
|
|
7322
|
+
], exports.UI.prototype, "width", undefined);
|
|
7319
7323
|
__decorate([
|
|
7320
7324
|
boundsType(100, true)
|
|
7321
|
-
], exports.UI.prototype, "height",
|
|
7325
|
+
], exports.UI.prototype, "height", undefined);
|
|
7322
7326
|
__decorate([
|
|
7323
7327
|
scaleType(1, true)
|
|
7324
|
-
], exports.UI.prototype, "scaleX",
|
|
7328
|
+
], exports.UI.prototype, "scaleX", undefined);
|
|
7325
7329
|
__decorate([
|
|
7326
7330
|
scaleType(1, true)
|
|
7327
|
-
], exports.UI.prototype, "scaleY",
|
|
7331
|
+
], exports.UI.prototype, "scaleY", undefined);
|
|
7328
7332
|
__decorate([
|
|
7329
7333
|
rotationType(0, true)
|
|
7330
|
-
], exports.UI.prototype, "rotation",
|
|
7334
|
+
], exports.UI.prototype, "rotation", undefined);
|
|
7331
7335
|
__decorate([
|
|
7332
7336
|
rotationType(0, true)
|
|
7333
|
-
], exports.UI.prototype, "skewX",
|
|
7337
|
+
], exports.UI.prototype, "skewX", undefined);
|
|
7334
7338
|
__decorate([
|
|
7335
7339
|
rotationType(0, true)
|
|
7336
|
-
], exports.UI.prototype, "skewY",
|
|
7340
|
+
], exports.UI.prototype, "skewY", undefined);
|
|
7337
7341
|
__decorate([
|
|
7338
7342
|
positionType(0, true)
|
|
7339
|
-
], exports.UI.prototype, "offsetX",
|
|
7343
|
+
], exports.UI.prototype, "offsetX", undefined);
|
|
7340
7344
|
__decorate([
|
|
7341
7345
|
positionType(0, true)
|
|
7342
|
-
], exports.UI.prototype, "offsetY",
|
|
7346
|
+
], exports.UI.prototype, "offsetY", undefined);
|
|
7343
7347
|
__decorate([
|
|
7344
7348
|
positionType(0, true)
|
|
7345
|
-
], exports.UI.prototype, "scrollX",
|
|
7349
|
+
], exports.UI.prototype, "scrollX", undefined);
|
|
7346
7350
|
__decorate([
|
|
7347
7351
|
positionType(0, true)
|
|
7348
|
-
], exports.UI.prototype, "scrollY",
|
|
7352
|
+
], exports.UI.prototype, "scrollY", undefined);
|
|
7349
7353
|
__decorate([
|
|
7350
7354
|
autoLayoutType()
|
|
7351
|
-
], exports.UI.prototype, "origin",
|
|
7355
|
+
], exports.UI.prototype, "origin", undefined);
|
|
7352
7356
|
__decorate([
|
|
7353
7357
|
autoLayoutType()
|
|
7354
|
-
], exports.UI.prototype, "around",
|
|
7358
|
+
], exports.UI.prototype, "around", undefined);
|
|
7355
7359
|
__decorate([
|
|
7356
7360
|
dataType(false)
|
|
7357
|
-
], exports.UI.prototype, "lazy",
|
|
7361
|
+
], exports.UI.prototype, "lazy", undefined);
|
|
7358
7362
|
__decorate([
|
|
7359
7363
|
naturalBoundsType(1)
|
|
7360
|
-
], exports.UI.prototype, "pixelRatio",
|
|
7364
|
+
], exports.UI.prototype, "pixelRatio", undefined);
|
|
7361
7365
|
__decorate([
|
|
7362
7366
|
pathInputType()
|
|
7363
|
-
], exports.UI.prototype, "path",
|
|
7367
|
+
], exports.UI.prototype, "path", undefined);
|
|
7364
7368
|
__decorate([
|
|
7365
7369
|
pathType()
|
|
7366
|
-
], exports.UI.prototype, "windingRule",
|
|
7370
|
+
], exports.UI.prototype, "windingRule", undefined);
|
|
7367
7371
|
__decorate([
|
|
7368
7372
|
pathType(true)
|
|
7369
|
-
], exports.UI.prototype, "closed",
|
|
7373
|
+
], exports.UI.prototype, "closed", undefined);
|
|
7370
7374
|
__decorate([
|
|
7371
7375
|
boundsType(0)
|
|
7372
|
-
], exports.UI.prototype, "padding",
|
|
7376
|
+
], exports.UI.prototype, "padding", undefined);
|
|
7373
7377
|
__decorate([
|
|
7374
7378
|
boundsType(false)
|
|
7375
|
-
], exports.UI.prototype, "lockRatio",
|
|
7379
|
+
], exports.UI.prototype, "lockRatio", undefined);
|
|
7376
7380
|
__decorate([
|
|
7377
7381
|
boundsType()
|
|
7378
|
-
], exports.UI.prototype, "widthRange",
|
|
7382
|
+
], exports.UI.prototype, "widthRange", undefined);
|
|
7379
7383
|
__decorate([
|
|
7380
7384
|
boundsType()
|
|
7381
|
-
], exports.UI.prototype, "heightRange",
|
|
7385
|
+
], exports.UI.prototype, "heightRange", undefined);
|
|
7382
7386
|
__decorate([
|
|
7383
7387
|
dataType(false)
|
|
7384
|
-
], exports.UI.prototype, "draggable",
|
|
7388
|
+
], exports.UI.prototype, "draggable", undefined);
|
|
7385
7389
|
__decorate([
|
|
7386
7390
|
dataType()
|
|
7387
|
-
], exports.UI.prototype, "dragBounds",
|
|
7391
|
+
], exports.UI.prototype, "dragBounds", undefined);
|
|
7388
7392
|
__decorate([
|
|
7389
7393
|
dataType(false)
|
|
7390
|
-
], exports.UI.prototype, "editable",
|
|
7394
|
+
], exports.UI.prototype, "editable", undefined);
|
|
7391
7395
|
__decorate([
|
|
7392
7396
|
hitType(true)
|
|
7393
|
-
], exports.UI.prototype, "hittable",
|
|
7397
|
+
], exports.UI.prototype, "hittable", undefined);
|
|
7394
7398
|
__decorate([
|
|
7395
7399
|
hitType('path')
|
|
7396
|
-
], exports.UI.prototype, "hitFill",
|
|
7400
|
+
], exports.UI.prototype, "hitFill", undefined);
|
|
7397
7401
|
__decorate([
|
|
7398
7402
|
strokeType('path')
|
|
7399
|
-
], exports.UI.prototype, "hitStroke",
|
|
7403
|
+
], exports.UI.prototype, "hitStroke", undefined);
|
|
7400
7404
|
__decorate([
|
|
7401
7405
|
hitType(false)
|
|
7402
|
-
], exports.UI.prototype, "hitBox",
|
|
7406
|
+
], exports.UI.prototype, "hitBox", undefined);
|
|
7403
7407
|
__decorate([
|
|
7404
7408
|
hitType(true)
|
|
7405
|
-
], exports.UI.prototype, "hitChildren",
|
|
7409
|
+
], exports.UI.prototype, "hitChildren", undefined);
|
|
7406
7410
|
__decorate([
|
|
7407
7411
|
hitType(true)
|
|
7408
|
-
], exports.UI.prototype, "hitSelf",
|
|
7412
|
+
], exports.UI.prototype, "hitSelf", undefined);
|
|
7409
7413
|
__decorate([
|
|
7410
7414
|
hitType()
|
|
7411
|
-
], exports.UI.prototype, "hitRadius",
|
|
7415
|
+
], exports.UI.prototype, "hitRadius", undefined);
|
|
7412
7416
|
__decorate([
|
|
7413
7417
|
cursorType('')
|
|
7414
|
-
], exports.UI.prototype, "cursor",
|
|
7418
|
+
], exports.UI.prototype, "cursor", undefined);
|
|
7415
7419
|
__decorate([
|
|
7416
7420
|
surfaceType()
|
|
7417
|
-
], exports.UI.prototype, "fill",
|
|
7421
|
+
], exports.UI.prototype, "fill", undefined);
|
|
7418
7422
|
__decorate([
|
|
7419
7423
|
strokeType()
|
|
7420
|
-
], exports.UI.prototype, "stroke",
|
|
7424
|
+
], exports.UI.prototype, "stroke", undefined);
|
|
7421
7425
|
__decorate([
|
|
7422
7426
|
strokeType('inside')
|
|
7423
|
-
], exports.UI.prototype, "strokeAlign",
|
|
7427
|
+
], exports.UI.prototype, "strokeAlign", undefined);
|
|
7424
7428
|
__decorate([
|
|
7425
7429
|
strokeType(1)
|
|
7426
|
-
], exports.UI.prototype, "strokeWidth",
|
|
7430
|
+
], exports.UI.prototype, "strokeWidth", undefined);
|
|
7427
7431
|
__decorate([
|
|
7428
7432
|
strokeType(false)
|
|
7429
|
-
], exports.UI.prototype, "strokeWidthFixed",
|
|
7433
|
+
], exports.UI.prototype, "strokeWidthFixed", undefined);
|
|
7430
7434
|
__decorate([
|
|
7431
7435
|
strokeType('none')
|
|
7432
|
-
], exports.UI.prototype, "strokeCap",
|
|
7436
|
+
], exports.UI.prototype, "strokeCap", undefined);
|
|
7433
7437
|
__decorate([
|
|
7434
7438
|
strokeType('miter')
|
|
7435
|
-
], exports.UI.prototype, "strokeJoin",
|
|
7439
|
+
], exports.UI.prototype, "strokeJoin", undefined);
|
|
7436
7440
|
__decorate([
|
|
7437
7441
|
strokeType()
|
|
7438
|
-
], exports.UI.prototype, "dashPattern",
|
|
7442
|
+
], exports.UI.prototype, "dashPattern", undefined);
|
|
7439
7443
|
__decorate([
|
|
7440
7444
|
strokeType()
|
|
7441
|
-
], exports.UI.prototype, "dashOffset",
|
|
7445
|
+
], exports.UI.prototype, "dashOffset", undefined);
|
|
7442
7446
|
__decorate([
|
|
7443
7447
|
strokeType(10)
|
|
7444
|
-
], exports.UI.prototype, "miterLimit",
|
|
7448
|
+
], exports.UI.prototype, "miterLimit", undefined);
|
|
7445
7449
|
__decorate([
|
|
7446
7450
|
pathType(0)
|
|
7447
|
-
], exports.UI.prototype, "cornerRadius",
|
|
7451
|
+
], exports.UI.prototype, "cornerRadius", undefined);
|
|
7448
7452
|
__decorate([
|
|
7449
7453
|
pathType()
|
|
7450
|
-
], exports.UI.prototype, "cornerSmoothing",
|
|
7454
|
+
], exports.UI.prototype, "cornerSmoothing", undefined);
|
|
7451
7455
|
__decorate([
|
|
7452
7456
|
effectType()
|
|
7453
|
-
], exports.UI.prototype, "shadow",
|
|
7457
|
+
], exports.UI.prototype, "shadow", undefined);
|
|
7454
7458
|
__decorate([
|
|
7455
7459
|
effectType()
|
|
7456
|
-
], exports.UI.prototype, "innerShadow",
|
|
7460
|
+
], exports.UI.prototype, "innerShadow", undefined);
|
|
7457
7461
|
__decorate([
|
|
7458
7462
|
effectType()
|
|
7459
|
-
], exports.UI.prototype, "blur",
|
|
7463
|
+
], exports.UI.prototype, "blur", undefined);
|
|
7460
7464
|
__decorate([
|
|
7461
7465
|
effectType()
|
|
7462
|
-
], exports.UI.prototype, "backgroundBlur",
|
|
7466
|
+
], exports.UI.prototype, "backgroundBlur", undefined);
|
|
7463
7467
|
__decorate([
|
|
7464
7468
|
effectType()
|
|
7465
|
-
], exports.UI.prototype, "grayscale",
|
|
7469
|
+
], exports.UI.prototype, "grayscale", undefined);
|
|
7466
7470
|
__decorate([
|
|
7467
7471
|
dataType({})
|
|
7468
|
-
], exports.UI.prototype, "data",
|
|
7472
|
+
], exports.UI.prototype, "data", undefined);
|
|
7469
7473
|
__decorate([
|
|
7470
7474
|
rewrite(exports.Leaf.prototype.reset)
|
|
7471
7475
|
], exports.UI.prototype, "reset", null);
|
|
@@ -7526,7 +7530,7 @@ var LeaferUI = (function (exports) {
|
|
|
7526
7530
|
};
|
|
7527
7531
|
__decorate([
|
|
7528
7532
|
dataProcessor(GroupData)
|
|
7529
|
-
], exports.Group.prototype, "__",
|
|
7533
|
+
], exports.Group.prototype, "__", undefined);
|
|
7530
7534
|
exports.Group = __decorate([
|
|
7531
7535
|
useModule(exports.Branch),
|
|
7532
7536
|
registerUI()
|
|
@@ -7697,8 +7701,6 @@ var LeaferUI = (function (exports) {
|
|
|
7697
7701
|
__setAttr(attrName, newValue) {
|
|
7698
7702
|
if (this.canvas) {
|
|
7699
7703
|
if (canvasSizeAttrs.includes(attrName)) {
|
|
7700
|
-
if (!newValue)
|
|
7701
|
-
debug.warn(attrName + ' is 0');
|
|
7702
7704
|
this.__changeCanvasSize(attrName, newValue);
|
|
7703
7705
|
}
|
|
7704
7706
|
else if (attrName === 'fill') {
|
|
@@ -7738,8 +7740,6 @@ var LeaferUI = (function (exports) {
|
|
|
7738
7740
|
this.created = true;
|
|
7739
7741
|
}
|
|
7740
7742
|
__onReady() {
|
|
7741
|
-
if (this.ready)
|
|
7742
|
-
return;
|
|
7743
7743
|
this.ready = true;
|
|
7744
7744
|
this.emitLeafer(LeaferEvent.BEFORE_READY);
|
|
7745
7745
|
this.emitLeafer(LeaferEvent.READY);
|
|
@@ -7753,6 +7753,20 @@ var LeaferUI = (function (exports) {
|
|
|
7753
7753
|
this.emitLeafer(LeaferEvent.VIEW_READY);
|
|
7754
7754
|
WaitHelper.run(this.__viewReadyWait);
|
|
7755
7755
|
}
|
|
7756
|
+
__onLayoutEnd() {
|
|
7757
|
+
const { grow, growWidth, growHeight } = this.config;
|
|
7758
|
+
if (grow) {
|
|
7759
|
+
let { width, height, pixelRatio } = this;
|
|
7760
|
+
const bounds = grow === 'box' ? this.worldBoxBounds : this.__world;
|
|
7761
|
+
if (growWidth !== false)
|
|
7762
|
+
width = Math.max(1, bounds.x + bounds.width);
|
|
7763
|
+
if (growHeight !== false)
|
|
7764
|
+
height = Math.max(1, bounds.y + bounds.height);
|
|
7765
|
+
this.__doResize({ width, height, pixelRatio });
|
|
7766
|
+
}
|
|
7767
|
+
if (!this.ready)
|
|
7768
|
+
this.__onReady();
|
|
7769
|
+
}
|
|
7756
7770
|
__onNextRender() {
|
|
7757
7771
|
if (this.viewReady) {
|
|
7758
7772
|
WaitHelper.run(this.__nextRenderWait);
|
|
@@ -7846,10 +7860,9 @@ var LeaferUI = (function (exports) {
|
|
|
7846
7860
|
const runId = Run.start('FirstCreate ' + this.innerName);
|
|
7847
7861
|
this.once(LeaferEvent.START, () => Run.end(runId));
|
|
7848
7862
|
this.once(LayoutEvent.START, () => this.updateLazyBounds());
|
|
7849
|
-
this.once(LayoutEvent.END, () => this.__onReady());
|
|
7850
7863
|
this.once(RenderEvent.START, () => this.__onCreated());
|
|
7851
7864
|
this.once(RenderEvent.END, () => this.__onViewReady());
|
|
7852
|
-
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
7865
|
+
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(LayoutEvent.END, this.__onLayoutEnd, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
7853
7866
|
}
|
|
7854
7867
|
__removeListenEvents() {
|
|
7855
7868
|
this.off_(this.__eventIds);
|
|
@@ -7890,10 +7903,10 @@ var LeaferUI = (function (exports) {
|
|
|
7890
7903
|
exports.Leafer.list = new LeafList();
|
|
7891
7904
|
__decorate([
|
|
7892
7905
|
dataProcessor(LeaferData)
|
|
7893
|
-
], exports.Leafer.prototype, "__",
|
|
7906
|
+
], exports.Leafer.prototype, "__", undefined);
|
|
7894
7907
|
__decorate([
|
|
7895
7908
|
boundsType()
|
|
7896
|
-
], exports.Leafer.prototype, "pixelRatio",
|
|
7909
|
+
], exports.Leafer.prototype, "pixelRatio", undefined);
|
|
7897
7910
|
exports.Leafer = Leafer_1 = __decorate([
|
|
7898
7911
|
registerUI()
|
|
7899
7912
|
], exports.Leafer);
|
|
@@ -7906,7 +7919,7 @@ var LeaferUI = (function (exports) {
|
|
|
7906
7919
|
};
|
|
7907
7920
|
__decorate([
|
|
7908
7921
|
dataProcessor(RectData)
|
|
7909
|
-
], exports.Rect.prototype, "__",
|
|
7922
|
+
], exports.Rect.prototype, "__", undefined);
|
|
7910
7923
|
exports.Rect = __decorate([
|
|
7911
7924
|
useModule(RectRender),
|
|
7912
7925
|
rewriteAble(),
|
|
@@ -7931,6 +7944,8 @@ var LeaferUI = (function (exports) {
|
|
|
7931
7944
|
const data = this.__;
|
|
7932
7945
|
if (this.children.length) {
|
|
7933
7946
|
if (data.__autoSide) {
|
|
7947
|
+
if (data.__hasSurface)
|
|
7948
|
+
this.__extraUpdate();
|
|
7934
7949
|
super.__updateBoxBounds();
|
|
7935
7950
|
const { boxBounds } = this.__layout;
|
|
7936
7951
|
if (!data.__autoSize) {
|
|
@@ -7995,13 +8010,13 @@ var LeaferUI = (function (exports) {
|
|
|
7995
8010
|
};
|
|
7996
8011
|
__decorate([
|
|
7997
8012
|
dataProcessor(BoxData)
|
|
7998
|
-
], exports.Box.prototype, "__",
|
|
8013
|
+
], exports.Box.prototype, "__", undefined);
|
|
7999
8014
|
__decorate([
|
|
8000
8015
|
dataType(false)
|
|
8001
|
-
], exports.Box.prototype, "resizeChildren",
|
|
8016
|
+
], exports.Box.prototype, "resizeChildren", undefined);
|
|
8002
8017
|
__decorate([
|
|
8003
8018
|
affectRenderBoundsType('show')
|
|
8004
|
-
], exports.Box.prototype, "overflow",
|
|
8019
|
+
], exports.Box.prototype, "overflow", undefined);
|
|
8005
8020
|
__decorate([
|
|
8006
8021
|
rewrite(rect.__updateStrokeSpread)
|
|
8007
8022
|
], exports.Box.prototype, "__updateStrokeSpread", null);
|
|
@@ -8040,13 +8055,13 @@ var LeaferUI = (function (exports) {
|
|
|
8040
8055
|
};
|
|
8041
8056
|
__decorate([
|
|
8042
8057
|
dataProcessor(FrameData)
|
|
8043
|
-
], exports.Frame.prototype, "__",
|
|
8058
|
+
], exports.Frame.prototype, "__", undefined);
|
|
8044
8059
|
__decorate([
|
|
8045
8060
|
surfaceType('#FFFFFF')
|
|
8046
|
-
], exports.Frame.prototype, "fill",
|
|
8061
|
+
], exports.Frame.prototype, "fill", undefined);
|
|
8047
8062
|
__decorate([
|
|
8048
8063
|
affectRenderBoundsType('hide')
|
|
8049
|
-
], exports.Frame.prototype, "overflow",
|
|
8064
|
+
], exports.Frame.prototype, "overflow", undefined);
|
|
8050
8065
|
exports.Frame = __decorate([
|
|
8051
8066
|
registerUI()
|
|
8052
8067
|
], exports.Frame);
|
|
@@ -8093,16 +8108,16 @@ var LeaferUI = (function (exports) {
|
|
|
8093
8108
|
};
|
|
8094
8109
|
__decorate([
|
|
8095
8110
|
dataProcessor(EllipseData)
|
|
8096
|
-
], exports.Ellipse.prototype, "__",
|
|
8111
|
+
], exports.Ellipse.prototype, "__", undefined);
|
|
8097
8112
|
__decorate([
|
|
8098
8113
|
pathType(0)
|
|
8099
|
-
], exports.Ellipse.prototype, "innerRadius",
|
|
8114
|
+
], exports.Ellipse.prototype, "innerRadius", undefined);
|
|
8100
8115
|
__decorate([
|
|
8101
8116
|
pathType(0)
|
|
8102
|
-
], exports.Ellipse.prototype, "startAngle",
|
|
8117
|
+
], exports.Ellipse.prototype, "startAngle", undefined);
|
|
8103
8118
|
__decorate([
|
|
8104
8119
|
pathType(0)
|
|
8105
|
-
], exports.Ellipse.prototype, "endAngle",
|
|
8120
|
+
], exports.Ellipse.prototype, "endAngle", undefined);
|
|
8106
8121
|
exports.Ellipse = __decorate([
|
|
8107
8122
|
registerUI()
|
|
8108
8123
|
], exports.Ellipse);
|
|
@@ -8161,22 +8176,22 @@ var LeaferUI = (function (exports) {
|
|
|
8161
8176
|
};
|
|
8162
8177
|
__decorate([
|
|
8163
8178
|
dataProcessor(LineData)
|
|
8164
|
-
], exports.Line.prototype, "__",
|
|
8179
|
+
], exports.Line.prototype, "__", undefined);
|
|
8165
8180
|
__decorate([
|
|
8166
8181
|
affectStrokeBoundsType('center')
|
|
8167
|
-
], exports.Line.prototype, "strokeAlign",
|
|
8182
|
+
], exports.Line.prototype, "strokeAlign", undefined);
|
|
8168
8183
|
__decorate([
|
|
8169
8184
|
boundsType(0)
|
|
8170
|
-
], exports.Line.prototype, "height",
|
|
8185
|
+
], exports.Line.prototype, "height", undefined);
|
|
8171
8186
|
__decorate([
|
|
8172
8187
|
pathType()
|
|
8173
|
-
], exports.Line.prototype, "points",
|
|
8188
|
+
], exports.Line.prototype, "points", undefined);
|
|
8174
8189
|
__decorate([
|
|
8175
8190
|
pathType(0)
|
|
8176
|
-
], exports.Line.prototype, "curve",
|
|
8191
|
+
], exports.Line.prototype, "curve", undefined);
|
|
8177
8192
|
__decorate([
|
|
8178
8193
|
pathType(false)
|
|
8179
|
-
], exports.Line.prototype, "closed",
|
|
8194
|
+
], exports.Line.prototype, "closed", undefined);
|
|
8180
8195
|
exports.Line = __decorate([
|
|
8181
8196
|
registerUI()
|
|
8182
8197
|
], exports.Line);
|
|
@@ -8209,16 +8224,16 @@ var LeaferUI = (function (exports) {
|
|
|
8209
8224
|
};
|
|
8210
8225
|
__decorate([
|
|
8211
8226
|
dataProcessor(PolygonData)
|
|
8212
|
-
], exports.Polygon.prototype, "__",
|
|
8227
|
+
], exports.Polygon.prototype, "__", undefined);
|
|
8213
8228
|
__decorate([
|
|
8214
8229
|
pathType(3)
|
|
8215
|
-
], exports.Polygon.prototype, "sides",
|
|
8230
|
+
], exports.Polygon.prototype, "sides", undefined);
|
|
8216
8231
|
__decorate([
|
|
8217
8232
|
pathType()
|
|
8218
|
-
], exports.Polygon.prototype, "points",
|
|
8233
|
+
], exports.Polygon.prototype, "points", undefined);
|
|
8219
8234
|
__decorate([
|
|
8220
8235
|
pathType(0)
|
|
8221
|
-
], exports.Polygon.prototype, "curve",
|
|
8236
|
+
], exports.Polygon.prototype, "curve", undefined);
|
|
8222
8237
|
__decorate([
|
|
8223
8238
|
rewrite(line.__updateRenderPath)
|
|
8224
8239
|
], exports.Polygon.prototype, "__updateRenderPath", null);
|
|
@@ -8250,13 +8265,13 @@ var LeaferUI = (function (exports) {
|
|
|
8250
8265
|
};
|
|
8251
8266
|
__decorate([
|
|
8252
8267
|
dataProcessor(StarData)
|
|
8253
|
-
], exports.Star.prototype, "__",
|
|
8268
|
+
], exports.Star.prototype, "__", undefined);
|
|
8254
8269
|
__decorate([
|
|
8255
8270
|
pathType(5)
|
|
8256
|
-
], exports.Star.prototype, "corners",
|
|
8271
|
+
], exports.Star.prototype, "corners", undefined);
|
|
8257
8272
|
__decorate([
|
|
8258
8273
|
pathType(0.382)
|
|
8259
|
-
], exports.Star.prototype, "innerRadius",
|
|
8274
|
+
], exports.Star.prototype, "innerRadius", undefined);
|
|
8260
8275
|
exports.Star = __decorate([
|
|
8261
8276
|
registerUI()
|
|
8262
8277
|
], exports.Star);
|
|
@@ -8278,10 +8293,10 @@ var LeaferUI = (function (exports) {
|
|
|
8278
8293
|
};
|
|
8279
8294
|
__decorate([
|
|
8280
8295
|
dataProcessor(ImageData)
|
|
8281
|
-
], exports.Image.prototype, "__",
|
|
8296
|
+
], exports.Image.prototype, "__", undefined);
|
|
8282
8297
|
__decorate([
|
|
8283
8298
|
boundsType('')
|
|
8284
|
-
], exports.Image.prototype, "url",
|
|
8299
|
+
], exports.Image.prototype, "url", undefined);
|
|
8285
8300
|
exports.Image = __decorate([
|
|
8286
8301
|
registerUI()
|
|
8287
8302
|
], exports.Image);
|
|
@@ -8344,25 +8359,25 @@ var LeaferUI = (function (exports) {
|
|
|
8344
8359
|
};
|
|
8345
8360
|
__decorate([
|
|
8346
8361
|
dataProcessor(CanvasData)
|
|
8347
|
-
], exports.Canvas.prototype, "__",
|
|
8362
|
+
], exports.Canvas.prototype, "__", undefined);
|
|
8348
8363
|
__decorate([
|
|
8349
8364
|
resizeType(100)
|
|
8350
|
-
], exports.Canvas.prototype, "width",
|
|
8365
|
+
], exports.Canvas.prototype, "width", undefined);
|
|
8351
8366
|
__decorate([
|
|
8352
8367
|
resizeType(100)
|
|
8353
|
-
], exports.Canvas.prototype, "height",
|
|
8368
|
+
], exports.Canvas.prototype, "height", undefined);
|
|
8354
8369
|
__decorate([
|
|
8355
8370
|
resizeType(1)
|
|
8356
|
-
], exports.Canvas.prototype, "pixelRatio",
|
|
8371
|
+
], exports.Canvas.prototype, "pixelRatio", undefined);
|
|
8357
8372
|
__decorate([
|
|
8358
8373
|
resizeType(true)
|
|
8359
|
-
], exports.Canvas.prototype, "smooth",
|
|
8374
|
+
], exports.Canvas.prototype, "smooth", undefined);
|
|
8360
8375
|
__decorate([
|
|
8361
8376
|
dataType(false)
|
|
8362
|
-
], exports.Canvas.prototype, "safeResize",
|
|
8377
|
+
], exports.Canvas.prototype, "safeResize", undefined);
|
|
8363
8378
|
__decorate([
|
|
8364
8379
|
resizeType()
|
|
8365
|
-
], exports.Canvas.prototype, "contextSettings",
|
|
8380
|
+
], exports.Canvas.prototype, "contextSettings", undefined);
|
|
8366
8381
|
exports.Canvas = __decorate([
|
|
8367
8382
|
registerUI()
|
|
8368
8383
|
], exports.Canvas);
|
|
@@ -8453,76 +8468,76 @@ var LeaferUI = (function (exports) {
|
|
|
8453
8468
|
};
|
|
8454
8469
|
__decorate([
|
|
8455
8470
|
dataProcessor(TextData)
|
|
8456
|
-
], exports.Text.prototype, "__",
|
|
8471
|
+
], exports.Text.prototype, "__", undefined);
|
|
8457
8472
|
__decorate([
|
|
8458
8473
|
boundsType(0)
|
|
8459
|
-
], exports.Text.prototype, "width",
|
|
8474
|
+
], exports.Text.prototype, "width", undefined);
|
|
8460
8475
|
__decorate([
|
|
8461
8476
|
boundsType(0)
|
|
8462
|
-
], exports.Text.prototype, "height",
|
|
8477
|
+
], exports.Text.prototype, "height", undefined);
|
|
8463
8478
|
__decorate([
|
|
8464
8479
|
dataType(false)
|
|
8465
|
-
], exports.Text.prototype, "resizeFontSize",
|
|
8480
|
+
], exports.Text.prototype, "resizeFontSize", undefined);
|
|
8466
8481
|
__decorate([
|
|
8467
8482
|
surfaceType('#000000')
|
|
8468
|
-
], exports.Text.prototype, "fill",
|
|
8483
|
+
], exports.Text.prototype, "fill", undefined);
|
|
8469
8484
|
__decorate([
|
|
8470
8485
|
affectStrokeBoundsType('outside')
|
|
8471
|
-
], exports.Text.prototype, "strokeAlign",
|
|
8486
|
+
], exports.Text.prototype, "strokeAlign", undefined);
|
|
8472
8487
|
__decorate([
|
|
8473
8488
|
hitType('all')
|
|
8474
|
-
], exports.Text.prototype, "hitFill",
|
|
8489
|
+
], exports.Text.prototype, "hitFill", undefined);
|
|
8475
8490
|
__decorate([
|
|
8476
8491
|
boundsType('')
|
|
8477
|
-
], exports.Text.prototype, "text",
|
|
8492
|
+
], exports.Text.prototype, "text", undefined);
|
|
8478
8493
|
__decorate([
|
|
8479
|
-
boundsType('
|
|
8480
|
-
], exports.Text.prototype, "fontFamily",
|
|
8494
|
+
boundsType('caption')
|
|
8495
|
+
], exports.Text.prototype, "fontFamily", undefined);
|
|
8481
8496
|
__decorate([
|
|
8482
8497
|
boundsType(12)
|
|
8483
|
-
], exports.Text.prototype, "fontSize",
|
|
8498
|
+
], exports.Text.prototype, "fontSize", undefined);
|
|
8484
8499
|
__decorate([
|
|
8485
8500
|
boundsType('normal')
|
|
8486
|
-
], exports.Text.prototype, "fontWeight",
|
|
8501
|
+
], exports.Text.prototype, "fontWeight", undefined);
|
|
8487
8502
|
__decorate([
|
|
8488
8503
|
boundsType(false)
|
|
8489
|
-
], exports.Text.prototype, "italic",
|
|
8504
|
+
], exports.Text.prototype, "italic", undefined);
|
|
8490
8505
|
__decorate([
|
|
8491
8506
|
boundsType('none')
|
|
8492
|
-
], exports.Text.prototype, "textCase",
|
|
8507
|
+
], exports.Text.prototype, "textCase", undefined);
|
|
8493
8508
|
__decorate([
|
|
8494
8509
|
boundsType('none')
|
|
8495
|
-
], exports.Text.prototype, "textDecoration",
|
|
8510
|
+
], exports.Text.prototype, "textDecoration", undefined);
|
|
8496
8511
|
__decorate([
|
|
8497
8512
|
boundsType(0)
|
|
8498
|
-
], exports.Text.prototype, "letterSpacing",
|
|
8513
|
+
], exports.Text.prototype, "letterSpacing", undefined);
|
|
8499
8514
|
__decorate([
|
|
8500
8515
|
boundsType({ type: 'percent', value: 1.5 })
|
|
8501
|
-
], exports.Text.prototype, "lineHeight",
|
|
8516
|
+
], exports.Text.prototype, "lineHeight", undefined);
|
|
8502
8517
|
__decorate([
|
|
8503
8518
|
boundsType(0)
|
|
8504
|
-
], exports.Text.prototype, "paraIndent",
|
|
8519
|
+
], exports.Text.prototype, "paraIndent", undefined);
|
|
8505
8520
|
__decorate([
|
|
8506
8521
|
boundsType(0)
|
|
8507
|
-
], exports.Text.prototype, "paraSpacing",
|
|
8522
|
+
], exports.Text.prototype, "paraSpacing", undefined);
|
|
8508
8523
|
__decorate([
|
|
8509
8524
|
boundsType('x')
|
|
8510
|
-
], exports.Text.prototype, "writingMode",
|
|
8525
|
+
], exports.Text.prototype, "writingMode", undefined);
|
|
8511
8526
|
__decorate([
|
|
8512
8527
|
boundsType('left')
|
|
8513
|
-
], exports.Text.prototype, "textAlign",
|
|
8528
|
+
], exports.Text.prototype, "textAlign", undefined);
|
|
8514
8529
|
__decorate([
|
|
8515
8530
|
boundsType('top')
|
|
8516
|
-
], exports.Text.prototype, "verticalAlign",
|
|
8531
|
+
], exports.Text.prototype, "verticalAlign", undefined);
|
|
8517
8532
|
__decorate([
|
|
8518
8533
|
boundsType(true)
|
|
8519
|
-
], exports.Text.prototype, "autoSizeAlign",
|
|
8534
|
+
], exports.Text.prototype, "autoSizeAlign", undefined);
|
|
8520
8535
|
__decorate([
|
|
8521
8536
|
boundsType('normal')
|
|
8522
|
-
], exports.Text.prototype, "textWrap",
|
|
8537
|
+
], exports.Text.prototype, "textWrap", undefined);
|
|
8523
8538
|
__decorate([
|
|
8524
8539
|
boundsType('show')
|
|
8525
|
-
], exports.Text.prototype, "textOverflow",
|
|
8540
|
+
], exports.Text.prototype, "textOverflow", undefined);
|
|
8526
8541
|
exports.Text = __decorate([
|
|
8527
8542
|
registerUI()
|
|
8528
8543
|
], exports.Text);
|
|
@@ -8535,10 +8550,10 @@ var LeaferUI = (function (exports) {
|
|
|
8535
8550
|
};
|
|
8536
8551
|
__decorate([
|
|
8537
8552
|
dataProcessor(PathData)
|
|
8538
|
-
], exports.Path.prototype, "__",
|
|
8553
|
+
], exports.Path.prototype, "__", undefined);
|
|
8539
8554
|
__decorate([
|
|
8540
8555
|
affectStrokeBoundsType('center')
|
|
8541
|
-
], exports.Path.prototype, "strokeAlign",
|
|
8556
|
+
], exports.Path.prototype, "strokeAlign", undefined);
|
|
8542
8557
|
exports.Path = __decorate([
|
|
8543
8558
|
registerUI()
|
|
8544
8559
|
], exports.Path);
|
|
@@ -8577,10 +8592,10 @@ var LeaferUI = (function (exports) {
|
|
|
8577
8592
|
};
|
|
8578
8593
|
__decorate([
|
|
8579
8594
|
dataProcessor(PenData)
|
|
8580
|
-
], exports.Pen.prototype, "__",
|
|
8595
|
+
], exports.Pen.prototype, "__", undefined);
|
|
8581
8596
|
__decorate([
|
|
8582
8597
|
penPathType()
|
|
8583
|
-
], exports.Pen.prototype, "path",
|
|
8598
|
+
], exports.Pen.prototype, "path", undefined);
|
|
8584
8599
|
exports.Pen = __decorate([
|
|
8585
8600
|
useModule(PathCreator, ['set', 'path', 'paint']),
|
|
8586
8601
|
registerUI()
|
|
@@ -9214,7 +9229,7 @@ var LeaferUI = (function (exports) {
|
|
|
9214
9229
|
}
|
|
9215
9230
|
else {
|
|
9216
9231
|
if (!paint.patternTask) {
|
|
9217
|
-
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this,
|
|
9232
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
9218
9233
|
paint.patternTask = null;
|
|
9219
9234
|
if (canvas.bounds.hit(ui.__nowWorld))
|
|
9220
9235
|
createPattern(ui, paint, pixelRatio);
|
|
@@ -9370,7 +9385,7 @@ var LeaferUI = (function (exports) {
|
|
|
9370
9385
|
const end = shadow.length - 1;
|
|
9371
9386
|
toOffsetOutBounds$1(bounds, offsetOutBounds$1);
|
|
9372
9387
|
shadow.forEach((item, index) => {
|
|
9373
|
-
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
|
|
9388
|
+
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
|
|
9374
9389
|
spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
|
|
9375
9390
|
drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
|
|
9376
9391
|
copyBounds = bounds;
|
|
@@ -9446,7 +9461,7 @@ var LeaferUI = (function (exports) {
|
|
|
9446
9461
|
other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
|
|
9447
9462
|
copyBounds = bounds;
|
|
9448
9463
|
}
|
|
9449
|
-
other.fillWorld(copyBounds, item.color, 'source-in');
|
|
9464
|
+
other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
|
|
9450
9465
|
if (ui.__worldFlipped) {
|
|
9451
9466
|
current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
|
|
9452
9467
|
}
|
|
@@ -9808,7 +9823,7 @@ var LeaferUI = (function (exports) {
|
|
|
9808
9823
|
rows.forEach(row => {
|
|
9809
9824
|
if (row.words) {
|
|
9810
9825
|
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
9811
|
-
addWordWidth = (width && textAlign === 'justify' && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
9826
|
+
addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
9812
9827
|
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
9813
9828
|
if (row.isOverflow && !letterSpacing)
|
|
9814
9829
|
row.textMode = true;
|
|
@@ -9830,7 +9845,7 @@ var LeaferUI = (function (exports) {
|
|
|
9830
9845
|
else {
|
|
9831
9846
|
charX = toChar(word.data, charX, row.data, row.isOverflow);
|
|
9832
9847
|
}
|
|
9833
|
-
if (!row.paraEnd
|
|
9848
|
+
if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
|
|
9834
9849
|
charX += addWordWidth;
|
|
9835
9850
|
row.width += addWordWidth;
|
|
9836
9851
|
}
|