leafer-ui 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/README.md +14 -4
- package/dist/web.cjs +13 -10
- package/dist/web.esm.js +13 -10
- package/dist/web.esm.min.js +1 -1
- package/dist/web.js +207 -189
- package/dist/web.min.cjs +1 -1
- package/dist/web.min.js +1 -1
- package/dist/web.module.js +286 -268
- package/dist/web.module.min.js +1 -1
- package/package.json +12 -12
package/dist/web.js
CHANGED
|
@@ -1536,10 +1536,10 @@ var LeaferUI = (function (exports) {
|
|
|
1536
1536
|
Object.keys(merge).forEach(key => {
|
|
1537
1537
|
var _a, _b;
|
|
1538
1538
|
value = merge[key];
|
|
1539
|
-
if ((value === null || value ===
|
|
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
|
const debug$5 = Debug.get('LeaferCanvas');
|
|
6016
6019
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
@@ -6229,7 +6232,7 @@ var LeaferUI = (function (exports) {
|
|
|
6229
6232
|
},
|
|
6230
6233
|
loadImage(src) {
|
|
6231
6234
|
return new Promise((resolve, reject) => {
|
|
6232
|
-
const img = new Image();
|
|
6235
|
+
const img = new Platform.origin.Image();
|
|
6233
6236
|
const { crossOrigin } = Platform.image;
|
|
6234
6237
|
if (crossOrigin) {
|
|
6235
6238
|
img.setAttribute('crossOrigin', crossOrigin);
|
|
@@ -6239,7 +6242,10 @@ var LeaferUI = (function (exports) {
|
|
|
6239
6242
|
img.onerror = (e) => { reject(e); };
|
|
6240
6243
|
img.src = Platform.image.getRealURL(src);
|
|
6241
6244
|
});
|
|
6242
|
-
}
|
|
6245
|
+
},
|
|
6246
|
+
Image,
|
|
6247
|
+
PointerEvent,
|
|
6248
|
+
DragEvent
|
|
6243
6249
|
};
|
|
6244
6250
|
Platform.event = {
|
|
6245
6251
|
stopDefault(origin) { origin.preventDefault(); },
|
|
@@ -6528,7 +6534,7 @@ var LeaferUI = (function (exports) {
|
|
|
6528
6534
|
}
|
|
6529
6535
|
partLayout() {
|
|
6530
6536
|
var _a;
|
|
6531
|
-
if (!((_a = this.__updatedList) === null || _a ===
|
|
6537
|
+
if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
|
|
6532
6538
|
return;
|
|
6533
6539
|
const t = Run.start('PartLayout');
|
|
6534
6540
|
const { target, __updatedList: updateList } = this;
|
|
@@ -6715,7 +6721,7 @@ var LeaferUI = (function (exports) {
|
|
|
6715
6721
|
partRender() {
|
|
6716
6722
|
const { canvas, updateBlocks: list } = this;
|
|
6717
6723
|
if (!list)
|
|
6718
|
-
return
|
|
6724
|
+
return;
|
|
6719
6725
|
this.mergeBlocks();
|
|
6720
6726
|
list.forEach(block => { if (canvas.bounds.hit(block) && !block.isEmpty())
|
|
6721
6727
|
this.clipRender(block); });
|
|
@@ -7099,6 +7105,7 @@ var LeaferUI = (function (exports) {
|
|
|
7099
7105
|
return t.fill && this.__hasStroke;
|
|
7100
7106
|
}
|
|
7101
7107
|
get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
|
|
7108
|
+
get __hasSurface() { const t = this; return (t.fill || t.stroke); }
|
|
7102
7109
|
get __autoWidth() { return !this._width; }
|
|
7103
7110
|
get __autoHeight() { return !this._height; }
|
|
7104
7111
|
get __autoSide() { return !this._width || !this._height; }
|
|
@@ -7571,7 +7578,7 @@ var LeaferUI = (function (exports) {
|
|
|
7571
7578
|
animate(_keyframe, _options, _type, _isTemp) {
|
|
7572
7579
|
return Plugin.need('animate');
|
|
7573
7580
|
}
|
|
7574
|
-
killAnimate(_type,
|
|
7581
|
+
killAnimate(_type, _nextStyle) { }
|
|
7575
7582
|
export(_filename, _options) {
|
|
7576
7583
|
return Plugin.need('export');
|
|
7577
7584
|
}
|
|
@@ -7602,199 +7609,199 @@ var LeaferUI = (function (exports) {
|
|
|
7602
7609
|
};
|
|
7603
7610
|
__decorate([
|
|
7604
7611
|
dataProcessor(UIData)
|
|
7605
|
-
], exports.UI.prototype, "__",
|
|
7612
|
+
], exports.UI.prototype, "__", undefined);
|
|
7606
7613
|
__decorate([
|
|
7607
7614
|
zoomLayerType()
|
|
7608
|
-
], exports.UI.prototype, "zoomLayer",
|
|
7615
|
+
], exports.UI.prototype, "zoomLayer", undefined);
|
|
7609
7616
|
__decorate([
|
|
7610
7617
|
dataType('')
|
|
7611
|
-
], exports.UI.prototype, "id",
|
|
7618
|
+
], exports.UI.prototype, "id", undefined);
|
|
7612
7619
|
__decorate([
|
|
7613
7620
|
dataType('')
|
|
7614
|
-
], exports.UI.prototype, "name",
|
|
7621
|
+
], exports.UI.prototype, "name", undefined);
|
|
7615
7622
|
__decorate([
|
|
7616
7623
|
dataType('')
|
|
7617
|
-
], exports.UI.prototype, "className",
|
|
7624
|
+
], exports.UI.prototype, "className", undefined);
|
|
7618
7625
|
__decorate([
|
|
7619
7626
|
surfaceType('pass-through')
|
|
7620
|
-
], exports.UI.prototype, "blendMode",
|
|
7627
|
+
], exports.UI.prototype, "blendMode", undefined);
|
|
7621
7628
|
__decorate([
|
|
7622
7629
|
opacityType(1)
|
|
7623
|
-
], exports.UI.prototype, "opacity",
|
|
7630
|
+
], exports.UI.prototype, "opacity", undefined);
|
|
7624
7631
|
__decorate([
|
|
7625
7632
|
visibleType(true)
|
|
7626
|
-
], exports.UI.prototype, "visible",
|
|
7633
|
+
], exports.UI.prototype, "visible", undefined);
|
|
7627
7634
|
__decorate([
|
|
7628
7635
|
surfaceType(false)
|
|
7629
|
-
], exports.UI.prototype, "locked",
|
|
7636
|
+
], exports.UI.prototype, "locked", undefined);
|
|
7630
7637
|
__decorate([
|
|
7631
7638
|
sortType(0)
|
|
7632
|
-
], exports.UI.prototype, "zIndex",
|
|
7639
|
+
], exports.UI.prototype, "zIndex", undefined);
|
|
7633
7640
|
__decorate([
|
|
7634
7641
|
maskType(false)
|
|
7635
|
-
], exports.UI.prototype, "mask",
|
|
7642
|
+
], exports.UI.prototype, "mask", undefined);
|
|
7636
7643
|
__decorate([
|
|
7637
7644
|
eraserType(false)
|
|
7638
|
-
], exports.UI.prototype, "eraser",
|
|
7645
|
+
], exports.UI.prototype, "eraser", undefined);
|
|
7639
7646
|
__decorate([
|
|
7640
7647
|
positionType(0, true)
|
|
7641
|
-
], exports.UI.prototype, "x",
|
|
7648
|
+
], exports.UI.prototype, "x", undefined);
|
|
7642
7649
|
__decorate([
|
|
7643
7650
|
positionType(0, true)
|
|
7644
|
-
], exports.UI.prototype, "y",
|
|
7651
|
+
], exports.UI.prototype, "y", undefined);
|
|
7645
7652
|
__decorate([
|
|
7646
7653
|
boundsType(100, true)
|
|
7647
|
-
], exports.UI.prototype, "width",
|
|
7654
|
+
], exports.UI.prototype, "width", undefined);
|
|
7648
7655
|
__decorate([
|
|
7649
7656
|
boundsType(100, true)
|
|
7650
|
-
], exports.UI.prototype, "height",
|
|
7657
|
+
], exports.UI.prototype, "height", undefined);
|
|
7651
7658
|
__decorate([
|
|
7652
7659
|
scaleType(1, true)
|
|
7653
|
-
], exports.UI.prototype, "scaleX",
|
|
7660
|
+
], exports.UI.prototype, "scaleX", undefined);
|
|
7654
7661
|
__decorate([
|
|
7655
7662
|
scaleType(1, true)
|
|
7656
|
-
], exports.UI.prototype, "scaleY",
|
|
7663
|
+
], exports.UI.prototype, "scaleY", undefined);
|
|
7657
7664
|
__decorate([
|
|
7658
7665
|
rotationType(0, true)
|
|
7659
|
-
], exports.UI.prototype, "rotation",
|
|
7666
|
+
], exports.UI.prototype, "rotation", undefined);
|
|
7660
7667
|
__decorate([
|
|
7661
7668
|
rotationType(0, true)
|
|
7662
|
-
], exports.UI.prototype, "skewX",
|
|
7669
|
+
], exports.UI.prototype, "skewX", undefined);
|
|
7663
7670
|
__decorate([
|
|
7664
7671
|
rotationType(0, true)
|
|
7665
|
-
], exports.UI.prototype, "skewY",
|
|
7672
|
+
], exports.UI.prototype, "skewY", undefined);
|
|
7666
7673
|
__decorate([
|
|
7667
7674
|
positionType(0, true)
|
|
7668
|
-
], exports.UI.prototype, "offsetX",
|
|
7675
|
+
], exports.UI.prototype, "offsetX", undefined);
|
|
7669
7676
|
__decorate([
|
|
7670
7677
|
positionType(0, true)
|
|
7671
|
-
], exports.UI.prototype, "offsetY",
|
|
7678
|
+
], exports.UI.prototype, "offsetY", undefined);
|
|
7672
7679
|
__decorate([
|
|
7673
7680
|
positionType(0, true)
|
|
7674
|
-
], exports.UI.prototype, "scrollX",
|
|
7681
|
+
], exports.UI.prototype, "scrollX", undefined);
|
|
7675
7682
|
__decorate([
|
|
7676
7683
|
positionType(0, true)
|
|
7677
|
-
], exports.UI.prototype, "scrollY",
|
|
7684
|
+
], exports.UI.prototype, "scrollY", undefined);
|
|
7678
7685
|
__decorate([
|
|
7679
7686
|
autoLayoutType()
|
|
7680
|
-
], exports.UI.prototype, "origin",
|
|
7687
|
+
], exports.UI.prototype, "origin", undefined);
|
|
7681
7688
|
__decorate([
|
|
7682
7689
|
autoLayoutType()
|
|
7683
|
-
], exports.UI.prototype, "around",
|
|
7690
|
+
], exports.UI.prototype, "around", undefined);
|
|
7684
7691
|
__decorate([
|
|
7685
7692
|
dataType(false)
|
|
7686
|
-
], exports.UI.prototype, "lazy",
|
|
7693
|
+
], exports.UI.prototype, "lazy", undefined);
|
|
7687
7694
|
__decorate([
|
|
7688
7695
|
naturalBoundsType(1)
|
|
7689
|
-
], exports.UI.prototype, "pixelRatio",
|
|
7696
|
+
], exports.UI.prototype, "pixelRatio", undefined);
|
|
7690
7697
|
__decorate([
|
|
7691
7698
|
pathInputType()
|
|
7692
|
-
], exports.UI.prototype, "path",
|
|
7699
|
+
], exports.UI.prototype, "path", undefined);
|
|
7693
7700
|
__decorate([
|
|
7694
7701
|
pathType()
|
|
7695
|
-
], exports.UI.prototype, "windingRule",
|
|
7702
|
+
], exports.UI.prototype, "windingRule", undefined);
|
|
7696
7703
|
__decorate([
|
|
7697
7704
|
pathType(true)
|
|
7698
|
-
], exports.UI.prototype, "closed",
|
|
7705
|
+
], exports.UI.prototype, "closed", undefined);
|
|
7699
7706
|
__decorate([
|
|
7700
7707
|
boundsType(0)
|
|
7701
|
-
], exports.UI.prototype, "padding",
|
|
7708
|
+
], exports.UI.prototype, "padding", undefined);
|
|
7702
7709
|
__decorate([
|
|
7703
7710
|
boundsType(false)
|
|
7704
|
-
], exports.UI.prototype, "lockRatio",
|
|
7711
|
+
], exports.UI.prototype, "lockRatio", undefined);
|
|
7705
7712
|
__decorate([
|
|
7706
7713
|
boundsType()
|
|
7707
|
-
], exports.UI.prototype, "widthRange",
|
|
7714
|
+
], exports.UI.prototype, "widthRange", undefined);
|
|
7708
7715
|
__decorate([
|
|
7709
7716
|
boundsType()
|
|
7710
|
-
], exports.UI.prototype, "heightRange",
|
|
7717
|
+
], exports.UI.prototype, "heightRange", undefined);
|
|
7711
7718
|
__decorate([
|
|
7712
7719
|
dataType(false)
|
|
7713
|
-
], exports.UI.prototype, "draggable",
|
|
7720
|
+
], exports.UI.prototype, "draggable", undefined);
|
|
7714
7721
|
__decorate([
|
|
7715
7722
|
dataType()
|
|
7716
|
-
], exports.UI.prototype, "dragBounds",
|
|
7723
|
+
], exports.UI.prototype, "dragBounds", undefined);
|
|
7717
7724
|
__decorate([
|
|
7718
7725
|
dataType(false)
|
|
7719
|
-
], exports.UI.prototype, "editable",
|
|
7726
|
+
], exports.UI.prototype, "editable", undefined);
|
|
7720
7727
|
__decorate([
|
|
7721
7728
|
hitType(true)
|
|
7722
|
-
], exports.UI.prototype, "hittable",
|
|
7729
|
+
], exports.UI.prototype, "hittable", undefined);
|
|
7723
7730
|
__decorate([
|
|
7724
7731
|
hitType('path')
|
|
7725
|
-
], exports.UI.prototype, "hitFill",
|
|
7732
|
+
], exports.UI.prototype, "hitFill", undefined);
|
|
7726
7733
|
__decorate([
|
|
7727
7734
|
strokeType('path')
|
|
7728
|
-
], exports.UI.prototype, "hitStroke",
|
|
7735
|
+
], exports.UI.prototype, "hitStroke", undefined);
|
|
7729
7736
|
__decorate([
|
|
7730
7737
|
hitType(false)
|
|
7731
|
-
], exports.UI.prototype, "hitBox",
|
|
7738
|
+
], exports.UI.prototype, "hitBox", undefined);
|
|
7732
7739
|
__decorate([
|
|
7733
7740
|
hitType(true)
|
|
7734
|
-
], exports.UI.prototype, "hitChildren",
|
|
7741
|
+
], exports.UI.prototype, "hitChildren", undefined);
|
|
7735
7742
|
__decorate([
|
|
7736
7743
|
hitType(true)
|
|
7737
|
-
], exports.UI.prototype, "hitSelf",
|
|
7744
|
+
], exports.UI.prototype, "hitSelf", undefined);
|
|
7738
7745
|
__decorate([
|
|
7739
7746
|
hitType()
|
|
7740
|
-
], exports.UI.prototype, "hitRadius",
|
|
7747
|
+
], exports.UI.prototype, "hitRadius", undefined);
|
|
7741
7748
|
__decorate([
|
|
7742
7749
|
cursorType('')
|
|
7743
|
-
], exports.UI.prototype, "cursor",
|
|
7750
|
+
], exports.UI.prototype, "cursor", undefined);
|
|
7744
7751
|
__decorate([
|
|
7745
7752
|
surfaceType()
|
|
7746
|
-
], exports.UI.prototype, "fill",
|
|
7753
|
+
], exports.UI.prototype, "fill", undefined);
|
|
7747
7754
|
__decorate([
|
|
7748
7755
|
strokeType()
|
|
7749
|
-
], exports.UI.prototype, "stroke",
|
|
7756
|
+
], exports.UI.prototype, "stroke", undefined);
|
|
7750
7757
|
__decorate([
|
|
7751
7758
|
strokeType('inside')
|
|
7752
|
-
], exports.UI.prototype, "strokeAlign",
|
|
7759
|
+
], exports.UI.prototype, "strokeAlign", undefined);
|
|
7753
7760
|
__decorate([
|
|
7754
7761
|
strokeType(1)
|
|
7755
|
-
], exports.UI.prototype, "strokeWidth",
|
|
7762
|
+
], exports.UI.prototype, "strokeWidth", undefined);
|
|
7756
7763
|
__decorate([
|
|
7757
7764
|
strokeType(false)
|
|
7758
|
-
], exports.UI.prototype, "strokeWidthFixed",
|
|
7765
|
+
], exports.UI.prototype, "strokeWidthFixed", undefined);
|
|
7759
7766
|
__decorate([
|
|
7760
7767
|
strokeType('none')
|
|
7761
|
-
], exports.UI.prototype, "strokeCap",
|
|
7768
|
+
], exports.UI.prototype, "strokeCap", undefined);
|
|
7762
7769
|
__decorate([
|
|
7763
7770
|
strokeType('miter')
|
|
7764
|
-
], exports.UI.prototype, "strokeJoin",
|
|
7771
|
+
], exports.UI.prototype, "strokeJoin", undefined);
|
|
7765
7772
|
__decorate([
|
|
7766
7773
|
strokeType()
|
|
7767
|
-
], exports.UI.prototype, "dashPattern",
|
|
7774
|
+
], exports.UI.prototype, "dashPattern", undefined);
|
|
7768
7775
|
__decorate([
|
|
7769
7776
|
strokeType()
|
|
7770
|
-
], exports.UI.prototype, "dashOffset",
|
|
7777
|
+
], exports.UI.prototype, "dashOffset", undefined);
|
|
7771
7778
|
__decorate([
|
|
7772
7779
|
strokeType(10)
|
|
7773
|
-
], exports.UI.prototype, "miterLimit",
|
|
7780
|
+
], exports.UI.prototype, "miterLimit", undefined);
|
|
7774
7781
|
__decorate([
|
|
7775
7782
|
pathType(0)
|
|
7776
|
-
], exports.UI.prototype, "cornerRadius",
|
|
7783
|
+
], exports.UI.prototype, "cornerRadius", undefined);
|
|
7777
7784
|
__decorate([
|
|
7778
7785
|
pathType()
|
|
7779
|
-
], exports.UI.prototype, "cornerSmoothing",
|
|
7786
|
+
], exports.UI.prototype, "cornerSmoothing", undefined);
|
|
7780
7787
|
__decorate([
|
|
7781
7788
|
effectType()
|
|
7782
|
-
], exports.UI.prototype, "shadow",
|
|
7789
|
+
], exports.UI.prototype, "shadow", undefined);
|
|
7783
7790
|
__decorate([
|
|
7784
7791
|
effectType()
|
|
7785
|
-
], exports.UI.prototype, "innerShadow",
|
|
7792
|
+
], exports.UI.prototype, "innerShadow", undefined);
|
|
7786
7793
|
__decorate([
|
|
7787
7794
|
effectType()
|
|
7788
|
-
], exports.UI.prototype, "blur",
|
|
7795
|
+
], exports.UI.prototype, "blur", undefined);
|
|
7789
7796
|
__decorate([
|
|
7790
7797
|
effectType()
|
|
7791
|
-
], exports.UI.prototype, "backgroundBlur",
|
|
7798
|
+
], exports.UI.prototype, "backgroundBlur", undefined);
|
|
7792
7799
|
__decorate([
|
|
7793
7800
|
effectType()
|
|
7794
|
-
], exports.UI.prototype, "grayscale",
|
|
7801
|
+
], exports.UI.prototype, "grayscale", undefined);
|
|
7795
7802
|
__decorate([
|
|
7796
7803
|
dataType({})
|
|
7797
|
-
], exports.UI.prototype, "data",
|
|
7804
|
+
], exports.UI.prototype, "data", undefined);
|
|
7798
7805
|
__decorate([
|
|
7799
7806
|
rewrite(exports.Leaf.prototype.reset)
|
|
7800
7807
|
], exports.UI.prototype, "reset", null);
|
|
@@ -7855,7 +7862,7 @@ var LeaferUI = (function (exports) {
|
|
|
7855
7862
|
};
|
|
7856
7863
|
__decorate([
|
|
7857
7864
|
dataProcessor(GroupData)
|
|
7858
|
-
], exports.Group.prototype, "__",
|
|
7865
|
+
], exports.Group.prototype, "__", undefined);
|
|
7859
7866
|
exports.Group = __decorate([
|
|
7860
7867
|
useModule(exports.Branch),
|
|
7861
7868
|
registerUI()
|
|
@@ -8026,8 +8033,6 @@ var LeaferUI = (function (exports) {
|
|
|
8026
8033
|
__setAttr(attrName, newValue) {
|
|
8027
8034
|
if (this.canvas) {
|
|
8028
8035
|
if (canvasSizeAttrs.includes(attrName)) {
|
|
8029
|
-
if (!newValue)
|
|
8030
|
-
debug$1.warn(attrName + ' is 0');
|
|
8031
8036
|
this.__changeCanvasSize(attrName, newValue);
|
|
8032
8037
|
}
|
|
8033
8038
|
else if (attrName === 'fill') {
|
|
@@ -8067,8 +8072,6 @@ var LeaferUI = (function (exports) {
|
|
|
8067
8072
|
this.created = true;
|
|
8068
8073
|
}
|
|
8069
8074
|
__onReady() {
|
|
8070
|
-
if (this.ready)
|
|
8071
|
-
return;
|
|
8072
8075
|
this.ready = true;
|
|
8073
8076
|
this.emitLeafer(LeaferEvent.BEFORE_READY);
|
|
8074
8077
|
this.emitLeafer(LeaferEvent.READY);
|
|
@@ -8082,6 +8085,20 @@ var LeaferUI = (function (exports) {
|
|
|
8082
8085
|
this.emitLeafer(LeaferEvent.VIEW_READY);
|
|
8083
8086
|
WaitHelper.run(this.__viewReadyWait);
|
|
8084
8087
|
}
|
|
8088
|
+
__onLayoutEnd() {
|
|
8089
|
+
const { grow, growWidth, growHeight } = this.config;
|
|
8090
|
+
if (grow) {
|
|
8091
|
+
let { width, height, pixelRatio } = this;
|
|
8092
|
+
const bounds = grow === 'box' ? this.worldBoxBounds : this.__world;
|
|
8093
|
+
if (growWidth !== false)
|
|
8094
|
+
width = Math.max(1, bounds.x + bounds.width);
|
|
8095
|
+
if (growHeight !== false)
|
|
8096
|
+
height = Math.max(1, bounds.y + bounds.height);
|
|
8097
|
+
this.__doResize({ width, height, pixelRatio });
|
|
8098
|
+
}
|
|
8099
|
+
if (!this.ready)
|
|
8100
|
+
this.__onReady();
|
|
8101
|
+
}
|
|
8085
8102
|
__onNextRender() {
|
|
8086
8103
|
if (this.viewReady) {
|
|
8087
8104
|
WaitHelper.run(this.__nextRenderWait);
|
|
@@ -8175,10 +8192,9 @@ var LeaferUI = (function (exports) {
|
|
|
8175
8192
|
const runId = Run.start('FirstCreate ' + this.innerName);
|
|
8176
8193
|
this.once(LeaferEvent.START, () => Run.end(runId));
|
|
8177
8194
|
this.once(LayoutEvent.START, () => this.updateLazyBounds());
|
|
8178
|
-
this.once(LayoutEvent.END, () => this.__onReady());
|
|
8179
8195
|
this.once(RenderEvent.START, () => this.__onCreated());
|
|
8180
8196
|
this.once(RenderEvent.END, () => this.__onViewReady());
|
|
8181
|
-
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8197
|
+
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(LayoutEvent.END, this.__onLayoutEnd, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8182
8198
|
}
|
|
8183
8199
|
__removeListenEvents() {
|
|
8184
8200
|
this.off_(this.__eventIds);
|
|
@@ -8219,10 +8235,10 @@ var LeaferUI = (function (exports) {
|
|
|
8219
8235
|
exports.Leafer.list = new LeafList();
|
|
8220
8236
|
__decorate([
|
|
8221
8237
|
dataProcessor(LeaferData)
|
|
8222
|
-
], exports.Leafer.prototype, "__",
|
|
8238
|
+
], exports.Leafer.prototype, "__", undefined);
|
|
8223
8239
|
__decorate([
|
|
8224
8240
|
boundsType()
|
|
8225
|
-
], exports.Leafer.prototype, "pixelRatio",
|
|
8241
|
+
], exports.Leafer.prototype, "pixelRatio", undefined);
|
|
8226
8242
|
exports.Leafer = Leafer_1 = __decorate([
|
|
8227
8243
|
registerUI()
|
|
8228
8244
|
], exports.Leafer);
|
|
@@ -8235,7 +8251,7 @@ var LeaferUI = (function (exports) {
|
|
|
8235
8251
|
};
|
|
8236
8252
|
__decorate([
|
|
8237
8253
|
dataProcessor(RectData)
|
|
8238
|
-
], exports.Rect.prototype, "__",
|
|
8254
|
+
], exports.Rect.prototype, "__", undefined);
|
|
8239
8255
|
exports.Rect = __decorate([
|
|
8240
8256
|
useModule(RectRender),
|
|
8241
8257
|
rewriteAble(),
|
|
@@ -8260,6 +8276,8 @@ var LeaferUI = (function (exports) {
|
|
|
8260
8276
|
const data = this.__;
|
|
8261
8277
|
if (this.children.length) {
|
|
8262
8278
|
if (data.__autoSide) {
|
|
8279
|
+
if (data.__hasSurface)
|
|
8280
|
+
this.__extraUpdate();
|
|
8263
8281
|
super.__updateBoxBounds();
|
|
8264
8282
|
const { boxBounds } = this.__layout;
|
|
8265
8283
|
if (!data.__autoSize) {
|
|
@@ -8324,13 +8342,13 @@ var LeaferUI = (function (exports) {
|
|
|
8324
8342
|
};
|
|
8325
8343
|
__decorate([
|
|
8326
8344
|
dataProcessor(BoxData)
|
|
8327
|
-
], exports.Box.prototype, "__",
|
|
8345
|
+
], exports.Box.prototype, "__", undefined);
|
|
8328
8346
|
__decorate([
|
|
8329
8347
|
dataType(false)
|
|
8330
|
-
], exports.Box.prototype, "resizeChildren",
|
|
8348
|
+
], exports.Box.prototype, "resizeChildren", undefined);
|
|
8331
8349
|
__decorate([
|
|
8332
8350
|
affectRenderBoundsType('show')
|
|
8333
|
-
], exports.Box.prototype, "overflow",
|
|
8351
|
+
], exports.Box.prototype, "overflow", undefined);
|
|
8334
8352
|
__decorate([
|
|
8335
8353
|
rewrite(rect$1.__updateStrokeSpread)
|
|
8336
8354
|
], exports.Box.prototype, "__updateStrokeSpread", null);
|
|
@@ -8369,13 +8387,13 @@ var LeaferUI = (function (exports) {
|
|
|
8369
8387
|
};
|
|
8370
8388
|
__decorate([
|
|
8371
8389
|
dataProcessor(FrameData)
|
|
8372
|
-
], exports.Frame.prototype, "__",
|
|
8390
|
+
], exports.Frame.prototype, "__", undefined);
|
|
8373
8391
|
__decorate([
|
|
8374
8392
|
surfaceType('#FFFFFF')
|
|
8375
|
-
], exports.Frame.prototype, "fill",
|
|
8393
|
+
], exports.Frame.prototype, "fill", undefined);
|
|
8376
8394
|
__decorate([
|
|
8377
8395
|
affectRenderBoundsType('hide')
|
|
8378
|
-
], exports.Frame.prototype, "overflow",
|
|
8396
|
+
], exports.Frame.prototype, "overflow", undefined);
|
|
8379
8397
|
exports.Frame = __decorate([
|
|
8380
8398
|
registerUI()
|
|
8381
8399
|
], exports.Frame);
|
|
@@ -8422,16 +8440,16 @@ var LeaferUI = (function (exports) {
|
|
|
8422
8440
|
};
|
|
8423
8441
|
__decorate([
|
|
8424
8442
|
dataProcessor(EllipseData)
|
|
8425
|
-
], exports.Ellipse.prototype, "__",
|
|
8443
|
+
], exports.Ellipse.prototype, "__", undefined);
|
|
8426
8444
|
__decorate([
|
|
8427
8445
|
pathType(0)
|
|
8428
|
-
], exports.Ellipse.prototype, "innerRadius",
|
|
8446
|
+
], exports.Ellipse.prototype, "innerRadius", undefined);
|
|
8429
8447
|
__decorate([
|
|
8430
8448
|
pathType(0)
|
|
8431
|
-
], exports.Ellipse.prototype, "startAngle",
|
|
8449
|
+
], exports.Ellipse.prototype, "startAngle", undefined);
|
|
8432
8450
|
__decorate([
|
|
8433
8451
|
pathType(0)
|
|
8434
|
-
], exports.Ellipse.prototype, "endAngle",
|
|
8452
|
+
], exports.Ellipse.prototype, "endAngle", undefined);
|
|
8435
8453
|
exports.Ellipse = __decorate([
|
|
8436
8454
|
registerUI()
|
|
8437
8455
|
], exports.Ellipse);
|
|
@@ -8490,22 +8508,22 @@ var LeaferUI = (function (exports) {
|
|
|
8490
8508
|
};
|
|
8491
8509
|
__decorate([
|
|
8492
8510
|
dataProcessor(LineData)
|
|
8493
|
-
], exports.Line.prototype, "__",
|
|
8511
|
+
], exports.Line.prototype, "__", undefined);
|
|
8494
8512
|
__decorate([
|
|
8495
8513
|
affectStrokeBoundsType('center')
|
|
8496
|
-
], exports.Line.prototype, "strokeAlign",
|
|
8514
|
+
], exports.Line.prototype, "strokeAlign", undefined);
|
|
8497
8515
|
__decorate([
|
|
8498
8516
|
boundsType(0)
|
|
8499
|
-
], exports.Line.prototype, "height",
|
|
8517
|
+
], exports.Line.prototype, "height", undefined);
|
|
8500
8518
|
__decorate([
|
|
8501
8519
|
pathType()
|
|
8502
|
-
], exports.Line.prototype, "points",
|
|
8520
|
+
], exports.Line.prototype, "points", undefined);
|
|
8503
8521
|
__decorate([
|
|
8504
8522
|
pathType(0)
|
|
8505
|
-
], exports.Line.prototype, "curve",
|
|
8523
|
+
], exports.Line.prototype, "curve", undefined);
|
|
8506
8524
|
__decorate([
|
|
8507
8525
|
pathType(false)
|
|
8508
|
-
], exports.Line.prototype, "closed",
|
|
8526
|
+
], exports.Line.prototype, "closed", undefined);
|
|
8509
8527
|
exports.Line = __decorate([
|
|
8510
8528
|
registerUI()
|
|
8511
8529
|
], exports.Line);
|
|
@@ -8538,16 +8556,16 @@ var LeaferUI = (function (exports) {
|
|
|
8538
8556
|
};
|
|
8539
8557
|
__decorate([
|
|
8540
8558
|
dataProcessor(PolygonData)
|
|
8541
|
-
], exports.Polygon.prototype, "__",
|
|
8559
|
+
], exports.Polygon.prototype, "__", undefined);
|
|
8542
8560
|
__decorate([
|
|
8543
8561
|
pathType(3)
|
|
8544
|
-
], exports.Polygon.prototype, "sides",
|
|
8562
|
+
], exports.Polygon.prototype, "sides", undefined);
|
|
8545
8563
|
__decorate([
|
|
8546
8564
|
pathType()
|
|
8547
|
-
], exports.Polygon.prototype, "points",
|
|
8565
|
+
], exports.Polygon.prototype, "points", undefined);
|
|
8548
8566
|
__decorate([
|
|
8549
8567
|
pathType(0)
|
|
8550
|
-
], exports.Polygon.prototype, "curve",
|
|
8568
|
+
], exports.Polygon.prototype, "curve", undefined);
|
|
8551
8569
|
__decorate([
|
|
8552
8570
|
rewrite(line.__updateRenderPath)
|
|
8553
8571
|
], exports.Polygon.prototype, "__updateRenderPath", null);
|
|
@@ -8579,13 +8597,13 @@ var LeaferUI = (function (exports) {
|
|
|
8579
8597
|
};
|
|
8580
8598
|
__decorate([
|
|
8581
8599
|
dataProcessor(StarData)
|
|
8582
|
-
], exports.Star.prototype, "__",
|
|
8600
|
+
], exports.Star.prototype, "__", undefined);
|
|
8583
8601
|
__decorate([
|
|
8584
8602
|
pathType(5)
|
|
8585
|
-
], exports.Star.prototype, "corners",
|
|
8603
|
+
], exports.Star.prototype, "corners", undefined);
|
|
8586
8604
|
__decorate([
|
|
8587
8605
|
pathType(0.382)
|
|
8588
|
-
], exports.Star.prototype, "innerRadius",
|
|
8606
|
+
], exports.Star.prototype, "innerRadius", undefined);
|
|
8589
8607
|
exports.Star = __decorate([
|
|
8590
8608
|
registerUI()
|
|
8591
8609
|
], exports.Star);
|
|
@@ -8607,10 +8625,10 @@ var LeaferUI = (function (exports) {
|
|
|
8607
8625
|
};
|
|
8608
8626
|
__decorate([
|
|
8609
8627
|
dataProcessor(ImageData)
|
|
8610
|
-
], exports.Image.prototype, "__",
|
|
8628
|
+
], exports.Image.prototype, "__", undefined);
|
|
8611
8629
|
__decorate([
|
|
8612
8630
|
boundsType('')
|
|
8613
|
-
], exports.Image.prototype, "url",
|
|
8631
|
+
], exports.Image.prototype, "url", undefined);
|
|
8614
8632
|
exports.Image = __decorate([
|
|
8615
8633
|
registerUI()
|
|
8616
8634
|
], exports.Image);
|
|
@@ -8673,25 +8691,25 @@ var LeaferUI = (function (exports) {
|
|
|
8673
8691
|
};
|
|
8674
8692
|
__decorate([
|
|
8675
8693
|
dataProcessor(CanvasData)
|
|
8676
|
-
], exports.Canvas.prototype, "__",
|
|
8694
|
+
], exports.Canvas.prototype, "__", undefined);
|
|
8677
8695
|
__decorate([
|
|
8678
8696
|
resizeType(100)
|
|
8679
|
-
], exports.Canvas.prototype, "width",
|
|
8697
|
+
], exports.Canvas.prototype, "width", undefined);
|
|
8680
8698
|
__decorate([
|
|
8681
8699
|
resizeType(100)
|
|
8682
|
-
], exports.Canvas.prototype, "height",
|
|
8700
|
+
], exports.Canvas.prototype, "height", undefined);
|
|
8683
8701
|
__decorate([
|
|
8684
8702
|
resizeType(1)
|
|
8685
|
-
], exports.Canvas.prototype, "pixelRatio",
|
|
8703
|
+
], exports.Canvas.prototype, "pixelRatio", undefined);
|
|
8686
8704
|
__decorate([
|
|
8687
8705
|
resizeType(true)
|
|
8688
|
-
], exports.Canvas.prototype, "smooth",
|
|
8706
|
+
], exports.Canvas.prototype, "smooth", undefined);
|
|
8689
8707
|
__decorate([
|
|
8690
8708
|
dataType(false)
|
|
8691
|
-
], exports.Canvas.prototype, "safeResize",
|
|
8709
|
+
], exports.Canvas.prototype, "safeResize", undefined);
|
|
8692
8710
|
__decorate([
|
|
8693
8711
|
resizeType()
|
|
8694
|
-
], exports.Canvas.prototype, "contextSettings",
|
|
8712
|
+
], exports.Canvas.prototype, "contextSettings", undefined);
|
|
8695
8713
|
exports.Canvas = __decorate([
|
|
8696
8714
|
registerUI()
|
|
8697
8715
|
], exports.Canvas);
|
|
@@ -8782,76 +8800,76 @@ var LeaferUI = (function (exports) {
|
|
|
8782
8800
|
};
|
|
8783
8801
|
__decorate([
|
|
8784
8802
|
dataProcessor(TextData)
|
|
8785
|
-
], exports.Text.prototype, "__",
|
|
8803
|
+
], exports.Text.prototype, "__", undefined);
|
|
8786
8804
|
__decorate([
|
|
8787
8805
|
boundsType(0)
|
|
8788
|
-
], exports.Text.prototype, "width",
|
|
8806
|
+
], exports.Text.prototype, "width", undefined);
|
|
8789
8807
|
__decorate([
|
|
8790
8808
|
boundsType(0)
|
|
8791
|
-
], exports.Text.prototype, "height",
|
|
8809
|
+
], exports.Text.prototype, "height", undefined);
|
|
8792
8810
|
__decorate([
|
|
8793
8811
|
dataType(false)
|
|
8794
|
-
], exports.Text.prototype, "resizeFontSize",
|
|
8812
|
+
], exports.Text.prototype, "resizeFontSize", undefined);
|
|
8795
8813
|
__decorate([
|
|
8796
8814
|
surfaceType('#000000')
|
|
8797
|
-
], exports.Text.prototype, "fill",
|
|
8815
|
+
], exports.Text.prototype, "fill", undefined);
|
|
8798
8816
|
__decorate([
|
|
8799
8817
|
affectStrokeBoundsType('outside')
|
|
8800
|
-
], exports.Text.prototype, "strokeAlign",
|
|
8818
|
+
], exports.Text.prototype, "strokeAlign", undefined);
|
|
8801
8819
|
__decorate([
|
|
8802
8820
|
hitType('all')
|
|
8803
|
-
], exports.Text.prototype, "hitFill",
|
|
8821
|
+
], exports.Text.prototype, "hitFill", undefined);
|
|
8804
8822
|
__decorate([
|
|
8805
8823
|
boundsType('')
|
|
8806
|
-
], exports.Text.prototype, "text",
|
|
8824
|
+
], exports.Text.prototype, "text", undefined);
|
|
8807
8825
|
__decorate([
|
|
8808
|
-
boundsType('
|
|
8809
|
-
], exports.Text.prototype, "fontFamily",
|
|
8826
|
+
boundsType('caption')
|
|
8827
|
+
], exports.Text.prototype, "fontFamily", undefined);
|
|
8810
8828
|
__decorate([
|
|
8811
8829
|
boundsType(12)
|
|
8812
|
-
], exports.Text.prototype, "fontSize",
|
|
8830
|
+
], exports.Text.prototype, "fontSize", undefined);
|
|
8813
8831
|
__decorate([
|
|
8814
8832
|
boundsType('normal')
|
|
8815
|
-
], exports.Text.prototype, "fontWeight",
|
|
8833
|
+
], exports.Text.prototype, "fontWeight", undefined);
|
|
8816
8834
|
__decorate([
|
|
8817
8835
|
boundsType(false)
|
|
8818
|
-
], exports.Text.prototype, "italic",
|
|
8836
|
+
], exports.Text.prototype, "italic", undefined);
|
|
8819
8837
|
__decorate([
|
|
8820
8838
|
boundsType('none')
|
|
8821
|
-
], exports.Text.prototype, "textCase",
|
|
8839
|
+
], exports.Text.prototype, "textCase", undefined);
|
|
8822
8840
|
__decorate([
|
|
8823
8841
|
boundsType('none')
|
|
8824
|
-
], exports.Text.prototype, "textDecoration",
|
|
8842
|
+
], exports.Text.prototype, "textDecoration", undefined);
|
|
8825
8843
|
__decorate([
|
|
8826
8844
|
boundsType(0)
|
|
8827
|
-
], exports.Text.prototype, "letterSpacing",
|
|
8845
|
+
], exports.Text.prototype, "letterSpacing", undefined);
|
|
8828
8846
|
__decorate([
|
|
8829
8847
|
boundsType({ type: 'percent', value: 1.5 })
|
|
8830
|
-
], exports.Text.prototype, "lineHeight",
|
|
8848
|
+
], exports.Text.prototype, "lineHeight", undefined);
|
|
8831
8849
|
__decorate([
|
|
8832
8850
|
boundsType(0)
|
|
8833
|
-
], exports.Text.prototype, "paraIndent",
|
|
8851
|
+
], exports.Text.prototype, "paraIndent", undefined);
|
|
8834
8852
|
__decorate([
|
|
8835
8853
|
boundsType(0)
|
|
8836
|
-
], exports.Text.prototype, "paraSpacing",
|
|
8854
|
+
], exports.Text.prototype, "paraSpacing", undefined);
|
|
8837
8855
|
__decorate([
|
|
8838
8856
|
boundsType('x')
|
|
8839
|
-
], exports.Text.prototype, "writingMode",
|
|
8857
|
+
], exports.Text.prototype, "writingMode", undefined);
|
|
8840
8858
|
__decorate([
|
|
8841
8859
|
boundsType('left')
|
|
8842
|
-
], exports.Text.prototype, "textAlign",
|
|
8860
|
+
], exports.Text.prototype, "textAlign", undefined);
|
|
8843
8861
|
__decorate([
|
|
8844
8862
|
boundsType('top')
|
|
8845
|
-
], exports.Text.prototype, "verticalAlign",
|
|
8863
|
+
], exports.Text.prototype, "verticalAlign", undefined);
|
|
8846
8864
|
__decorate([
|
|
8847
8865
|
boundsType(true)
|
|
8848
|
-
], exports.Text.prototype, "autoSizeAlign",
|
|
8866
|
+
], exports.Text.prototype, "autoSizeAlign", undefined);
|
|
8849
8867
|
__decorate([
|
|
8850
8868
|
boundsType('normal')
|
|
8851
|
-
], exports.Text.prototype, "textWrap",
|
|
8869
|
+
], exports.Text.prototype, "textWrap", undefined);
|
|
8852
8870
|
__decorate([
|
|
8853
8871
|
boundsType('show')
|
|
8854
|
-
], exports.Text.prototype, "textOverflow",
|
|
8872
|
+
], exports.Text.prototype, "textOverflow", undefined);
|
|
8855
8873
|
exports.Text = __decorate([
|
|
8856
8874
|
registerUI()
|
|
8857
8875
|
], exports.Text);
|
|
@@ -8864,10 +8882,10 @@ var LeaferUI = (function (exports) {
|
|
|
8864
8882
|
};
|
|
8865
8883
|
__decorate([
|
|
8866
8884
|
dataProcessor(PathData)
|
|
8867
|
-
], exports.Path.prototype, "__",
|
|
8885
|
+
], exports.Path.prototype, "__", undefined);
|
|
8868
8886
|
__decorate([
|
|
8869
8887
|
affectStrokeBoundsType('center')
|
|
8870
|
-
], exports.Path.prototype, "strokeAlign",
|
|
8888
|
+
], exports.Path.prototype, "strokeAlign", undefined);
|
|
8871
8889
|
exports.Path = __decorate([
|
|
8872
8890
|
registerUI()
|
|
8873
8891
|
], exports.Path);
|
|
@@ -8906,10 +8924,10 @@ var LeaferUI = (function (exports) {
|
|
|
8906
8924
|
};
|
|
8907
8925
|
__decorate([
|
|
8908
8926
|
dataProcessor(PenData)
|
|
8909
|
-
], exports.Pen.prototype, "__",
|
|
8927
|
+
], exports.Pen.prototype, "__", undefined);
|
|
8910
8928
|
__decorate([
|
|
8911
8929
|
penPathType()
|
|
8912
|
-
], exports.Pen.prototype, "path",
|
|
8930
|
+
], exports.Pen.prototype, "path", undefined);
|
|
8913
8931
|
exports.Pen = __decorate([
|
|
8914
8932
|
useModule(PathCreator, ['set', 'path', 'paint']),
|
|
8915
8933
|
registerUI()
|
|
@@ -10094,9 +10112,9 @@ var LeaferUI = (function (exports) {
|
|
|
10094
10112
|
}
|
|
10095
10113
|
return this.__hit(inner);
|
|
10096
10114
|
};
|
|
10097
|
-
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10098
|
-
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10099
|
-
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10115
|
+
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitFill(inner, this.__.windingRule); };
|
|
10116
|
+
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitStroke(inner, strokeWidth); };
|
|
10117
|
+
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
|
|
10100
10118
|
leaf.__drawHitPath = function (canvas) { if (canvas)
|
|
10101
10119
|
this.__drawRenderPath(canvas); };
|
|
10102
10120
|
|
|
@@ -11135,7 +11153,7 @@ var LeaferUI = (function (exports) {
|
|
|
11135
11153
|
}
|
|
11136
11154
|
else {
|
|
11137
11155
|
if (!paint.patternTask) {
|
|
11138
|
-
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this,
|
|
11156
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
11139
11157
|
paint.patternTask = null;
|
|
11140
11158
|
if (canvas.bounds.hit(ui.__nowWorld))
|
|
11141
11159
|
createPattern(ui, paint, pixelRatio);
|
|
@@ -11291,7 +11309,7 @@ var LeaferUI = (function (exports) {
|
|
|
11291
11309
|
const end = shadow.length - 1;
|
|
11292
11310
|
toOffsetOutBounds$1(bounds, offsetOutBounds$1);
|
|
11293
11311
|
shadow.forEach((item, index) => {
|
|
11294
|
-
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
|
|
11312
|
+
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
|
|
11295
11313
|
spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
|
|
11296
11314
|
drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
|
|
11297
11315
|
copyBounds = bounds;
|
|
@@ -11367,7 +11385,7 @@ var LeaferUI = (function (exports) {
|
|
|
11367
11385
|
other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
|
|
11368
11386
|
copyBounds = bounds;
|
|
11369
11387
|
}
|
|
11370
|
-
other.fillWorld(copyBounds, item.color, 'source-in');
|
|
11388
|
+
other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
|
|
11371
11389
|
if (ui.__worldFlipped) {
|
|
11372
11390
|
current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
|
|
11373
11391
|
}
|
|
@@ -11729,7 +11747,7 @@ var LeaferUI = (function (exports) {
|
|
|
11729
11747
|
rows.forEach(row => {
|
|
11730
11748
|
if (row.words) {
|
|
11731
11749
|
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
11732
|
-
addWordWidth = (width && textAlign === 'justify' && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11750
|
+
addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11733
11751
|
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
11734
11752
|
if (row.isOverflow && !letterSpacing)
|
|
11735
11753
|
row.textMode = true;
|
|
@@ -11751,7 +11769,7 @@ var LeaferUI = (function (exports) {
|
|
|
11751
11769
|
else {
|
|
11752
11770
|
charX = toChar(word.data, charX, row.data, row.isOverflow);
|
|
11753
11771
|
}
|
|
11754
|
-
if (!row.paraEnd
|
|
11772
|
+
if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
|
|
11755
11773
|
charX += addWordWidth;
|
|
11756
11774
|
row.width += addWordWidth;
|
|
11757
11775
|
}
|