@leafer-ui/miniapp 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/miniapp.cjs +8 -8
- package/dist/miniapp.esm.js +8 -8
- package/dist/miniapp.esm.min.js +1 -1
- package/dist/miniapp.min.cjs +1 -1
- package/dist/miniapp.module.js +202 -187
- package/dist/miniapp.module.min.js +1 -1
- package/package.json +11 -11
package/dist/miniapp.module.js
CHANGED
|
@@ -1533,10 +1533,10 @@ const DataHelper = {
|
|
|
1533
1533
|
Object.keys(merge).forEach(key => {
|
|
1534
1534
|
var _a, _b;
|
|
1535
1535
|
value = merge[key];
|
|
1536
|
-
if ((value === null || value ===
|
|
1536
|
+
if ((value === null || value === undefined ? undefined : value.constructor) === Object && ((_a = t[key]) === null || _a === undefined ? undefined : _a.constructor) === Object)
|
|
1537
1537
|
return assign(t[key], merge[key], exclude && exclude[key]);
|
|
1538
1538
|
if (exclude && (key in exclude)) {
|
|
1539
|
-
if (((_b = exclude[key]) === null || _b ===
|
|
1539
|
+
if (((_b = exclude[key]) === null || _b === undefined ? undefined : _b.constructor) === Object)
|
|
1540
1540
|
assign(t[key] = {}, merge[key], exclude[key]);
|
|
1541
1541
|
return;
|
|
1542
1542
|
}
|
|
@@ -1705,7 +1705,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
1705
1705
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
1706
1706
|
PERFORMANCE OF THIS SOFTWARE.
|
|
1707
1707
|
***************************************************************************** */
|
|
1708
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
1708
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
1709
1709
|
|
|
1710
1710
|
|
|
1711
1711
|
function __decorate(decorators, target, key, desc) {
|
|
@@ -1773,7 +1773,7 @@ let Canvas$1 = class Canvas {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
setTransform(_a, _b, _c, _d, _e, _f) { }
|
|
1775
1775
|
resetTransform() { }
|
|
1776
|
-
getTransform() { return
|
|
1776
|
+
getTransform() { return undefined; }
|
|
1777
1777
|
save() { }
|
|
1778
1778
|
restore() { }
|
|
1779
1779
|
transform(a, b, c, d, e, f) {
|
|
@@ -1830,12 +1830,12 @@ let Canvas$1 = class Canvas {
|
|
|
1830
1830
|
ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) { }
|
|
1831
1831
|
rect(_x, _y, _width, _height) { }
|
|
1832
1832
|
roundRect(_x, _y, _width, _height, _radius) { }
|
|
1833
|
-
createConicGradient(_startAngle, _x, _y) { return
|
|
1834
|
-
createLinearGradient(_x0, _y0, _x1, _y1) { return
|
|
1835
|
-
createPattern(_image, _repetition) { return
|
|
1836
|
-
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return
|
|
1833
|
+
createConicGradient(_startAngle, _x, _y) { return undefined; }
|
|
1834
|
+
createLinearGradient(_x0, _y0, _x1, _y1) { return undefined; }
|
|
1835
|
+
createPattern(_image, _repetition) { return undefined; }
|
|
1836
|
+
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return undefined; }
|
|
1837
1837
|
fillText(_text, _x, _y, _maxWidth) { }
|
|
1838
|
-
measureText(_text) { return
|
|
1838
|
+
measureText(_text) { return undefined; }
|
|
1839
1839
|
strokeText(_text, _x, _y, _maxWidth) { }
|
|
1840
1840
|
destroy() {
|
|
1841
1841
|
this.context = null;
|
|
@@ -1843,79 +1843,79 @@ let Canvas$1 = class Canvas {
|
|
|
1843
1843
|
};
|
|
1844
1844
|
__decorate([
|
|
1845
1845
|
contextAttr('imageSmoothingEnabled')
|
|
1846
|
-
], Canvas$1.prototype, "smooth",
|
|
1846
|
+
], Canvas$1.prototype, "smooth", undefined);
|
|
1847
1847
|
__decorate([
|
|
1848
1848
|
contextAttr('imageSmoothingQuality')
|
|
1849
|
-
], Canvas$1.prototype, "smoothLevel",
|
|
1849
|
+
], Canvas$1.prototype, "smoothLevel", undefined);
|
|
1850
1850
|
__decorate([
|
|
1851
1851
|
contextAttr('globalAlpha')
|
|
1852
|
-
], Canvas$1.prototype, "opacity",
|
|
1852
|
+
], Canvas$1.prototype, "opacity", undefined);
|
|
1853
1853
|
__decorate([
|
|
1854
1854
|
contextAttr()
|
|
1855
|
-
], Canvas$1.prototype, "fillStyle",
|
|
1855
|
+
], Canvas$1.prototype, "fillStyle", undefined);
|
|
1856
1856
|
__decorate([
|
|
1857
1857
|
contextAttr()
|
|
1858
|
-
], Canvas$1.prototype, "strokeStyle",
|
|
1858
|
+
], Canvas$1.prototype, "strokeStyle", undefined);
|
|
1859
1859
|
__decorate([
|
|
1860
1860
|
contextAttr('lineWidth')
|
|
1861
|
-
], Canvas$1.prototype, "strokeWidth",
|
|
1861
|
+
], Canvas$1.prototype, "strokeWidth", undefined);
|
|
1862
1862
|
__decorate([
|
|
1863
1863
|
contextAttr('lineCap')
|
|
1864
|
-
], Canvas$1.prototype, "strokeCap",
|
|
1864
|
+
], Canvas$1.prototype, "strokeCap", undefined);
|
|
1865
1865
|
__decorate([
|
|
1866
1866
|
contextAttr('lineJoin')
|
|
1867
|
-
], Canvas$1.prototype, "strokeJoin",
|
|
1867
|
+
], Canvas$1.prototype, "strokeJoin", undefined);
|
|
1868
1868
|
__decorate([
|
|
1869
1869
|
contextAttr('lineDashOffset')
|
|
1870
|
-
], Canvas$1.prototype, "dashOffset",
|
|
1870
|
+
], Canvas$1.prototype, "dashOffset", undefined);
|
|
1871
1871
|
__decorate([
|
|
1872
1872
|
contextAttr()
|
|
1873
|
-
], Canvas$1.prototype, "miterLimit",
|
|
1873
|
+
], Canvas$1.prototype, "miterLimit", undefined);
|
|
1874
1874
|
__decorate([
|
|
1875
1875
|
contextAttr()
|
|
1876
|
-
], Canvas$1.prototype, "shadowBlur",
|
|
1876
|
+
], Canvas$1.prototype, "shadowBlur", undefined);
|
|
1877
1877
|
__decorate([
|
|
1878
1878
|
contextAttr()
|
|
1879
|
-
], Canvas$1.prototype, "shadowColor",
|
|
1879
|
+
], Canvas$1.prototype, "shadowColor", undefined);
|
|
1880
1880
|
__decorate([
|
|
1881
1881
|
contextAttr()
|
|
1882
|
-
], Canvas$1.prototype, "shadowOffsetX",
|
|
1882
|
+
], Canvas$1.prototype, "shadowOffsetX", undefined);
|
|
1883
1883
|
__decorate([
|
|
1884
1884
|
contextAttr()
|
|
1885
|
-
], Canvas$1.prototype, "shadowOffsetY",
|
|
1885
|
+
], Canvas$1.prototype, "shadowOffsetY", undefined);
|
|
1886
1886
|
__decorate([
|
|
1887
1887
|
contextAttr()
|
|
1888
|
-
], Canvas$1.prototype, "filter",
|
|
1888
|
+
], Canvas$1.prototype, "filter", undefined);
|
|
1889
1889
|
__decorate([
|
|
1890
1890
|
contextAttr()
|
|
1891
|
-
], Canvas$1.prototype, "font",
|
|
1891
|
+
], Canvas$1.prototype, "font", undefined);
|
|
1892
1892
|
__decorate([
|
|
1893
1893
|
contextAttr()
|
|
1894
|
-
], Canvas$1.prototype, "fontKerning",
|
|
1894
|
+
], Canvas$1.prototype, "fontKerning", undefined);
|
|
1895
1895
|
__decorate([
|
|
1896
1896
|
contextAttr()
|
|
1897
|
-
], Canvas$1.prototype, "fontStretch",
|
|
1897
|
+
], Canvas$1.prototype, "fontStretch", undefined);
|
|
1898
1898
|
__decorate([
|
|
1899
1899
|
contextAttr()
|
|
1900
|
-
], Canvas$1.prototype, "fontVariantCaps",
|
|
1900
|
+
], Canvas$1.prototype, "fontVariantCaps", undefined);
|
|
1901
1901
|
__decorate([
|
|
1902
1902
|
contextAttr()
|
|
1903
|
-
], Canvas$1.prototype, "textAlign",
|
|
1903
|
+
], Canvas$1.prototype, "textAlign", undefined);
|
|
1904
1904
|
__decorate([
|
|
1905
1905
|
contextAttr()
|
|
1906
|
-
], Canvas$1.prototype, "textBaseline",
|
|
1906
|
+
], Canvas$1.prototype, "textBaseline", undefined);
|
|
1907
1907
|
__decorate([
|
|
1908
1908
|
contextAttr()
|
|
1909
|
-
], Canvas$1.prototype, "textRendering",
|
|
1909
|
+
], Canvas$1.prototype, "textRendering", undefined);
|
|
1910
1910
|
__decorate([
|
|
1911
1911
|
contextAttr()
|
|
1912
|
-
], Canvas$1.prototype, "wordSpacing",
|
|
1912
|
+
], Canvas$1.prototype, "wordSpacing", undefined);
|
|
1913
1913
|
__decorate([
|
|
1914
1914
|
contextAttr()
|
|
1915
|
-
], Canvas$1.prototype, "letterSpacing",
|
|
1915
|
+
], Canvas$1.prototype, "letterSpacing", undefined);
|
|
1916
1916
|
__decorate([
|
|
1917
1917
|
contextAttr()
|
|
1918
|
-
], Canvas$1.prototype, "direction",
|
|
1918
|
+
], Canvas$1.prototype, "direction", undefined);
|
|
1919
1919
|
__decorate([
|
|
1920
1920
|
contextMethod()
|
|
1921
1921
|
], Canvas$1.prototype, "setTransform", null);
|
|
@@ -3384,7 +3384,7 @@ class TaskItem {
|
|
|
3384
3384
|
this.task = task;
|
|
3385
3385
|
}
|
|
3386
3386
|
run() {
|
|
3387
|
-
return __awaiter(this,
|
|
3387
|
+
return __awaiter(this, undefined, undefined, function* () {
|
|
3388
3388
|
try {
|
|
3389
3389
|
if (this.task && !this.isComplete && this.parent.running)
|
|
3390
3390
|
yield this.task();
|
|
@@ -3696,7 +3696,7 @@ class LeaferImage {
|
|
|
3696
3696
|
load(onSuccess, onError) {
|
|
3697
3697
|
if (!this.loading) {
|
|
3698
3698
|
this.loading = true;
|
|
3699
|
-
ImageManager.tasker.add(() => __awaiter(this,
|
|
3699
|
+
ImageManager.tasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
3700
3700
|
return yield Platform.origin.loadImage(this.url).then((img) => {
|
|
3701
3701
|
this.ready = true;
|
|
3702
3702
|
this.width = img.naturalWidth || img.width;
|
|
@@ -5175,8 +5175,7 @@ const LeafBounds = {
|
|
|
5175
5175
|
__updateAutoLayout() {
|
|
5176
5176
|
this.__layout.matrixChanged = true;
|
|
5177
5177
|
if (this.isBranch) {
|
|
5178
|
-
|
|
5179
|
-
this.leafer.layouter.addExtra(this);
|
|
5178
|
+
this.__extraUpdate();
|
|
5180
5179
|
if (this.__.flow) {
|
|
5181
5180
|
if (this.__layout.boxChanged)
|
|
5182
5181
|
this.__updateFlowLayout();
|
|
@@ -5329,7 +5328,7 @@ let Leaf = class Leaf {
|
|
|
5329
5328
|
get __worldFlipped() { return this.__world.scaleX < 0 || this.__world.scaleY < 0; }
|
|
5330
5329
|
get __onlyHitMask() { return this.__hasMask && !this.__.hitChildren; }
|
|
5331
5330
|
get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
|
|
5332
|
-
get __inLazyBounds() {
|
|
5331
|
+
get __inLazyBounds() { return this.leaferIsCreated && this.leafer.lazyBounds.hit(this.__world); }
|
|
5333
5332
|
get pathInputed() { return this.__.__pathInputed; }
|
|
5334
5333
|
set event(map) { this.on(map); }
|
|
5335
5334
|
constructor(data) {
|
|
@@ -5440,6 +5439,10 @@ let Leaf = class Leaf {
|
|
|
5440
5439
|
forceRender(_bounds, _sync) {
|
|
5441
5440
|
this.forceUpdate('surface');
|
|
5442
5441
|
}
|
|
5442
|
+
__extraUpdate() {
|
|
5443
|
+
if (this.leaferIsReady)
|
|
5444
|
+
this.leafer.layouter.addExtra(this);
|
|
5445
|
+
}
|
|
5443
5446
|
__updateWorldMatrix() { }
|
|
5444
5447
|
__updateLocalMatrix() { }
|
|
5445
5448
|
__updateWorldBounds() { }
|
|
@@ -6007,7 +6010,7 @@ class LeafLevelList {
|
|
|
6007
6010
|
}
|
|
6008
6011
|
}
|
|
6009
6012
|
|
|
6010
|
-
const version = "1.3.
|
|
6013
|
+
const version = "1.3.3";
|
|
6011
6014
|
|
|
6012
6015
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6013
6016
|
get allowBackgroundColor() { return false; }
|
|
@@ -6491,7 +6494,7 @@ class Layouter {
|
|
|
6491
6494
|
}
|
|
6492
6495
|
partLayout() {
|
|
6493
6496
|
var _a;
|
|
6494
|
-
if (!((_a = this.__updatedList) === null || _a ===
|
|
6497
|
+
if (!((_a = this.__updatedList) === null || _a === undefined ? undefined : _a.length))
|
|
6495
6498
|
return;
|
|
6496
6499
|
const t = Run.start('PartLayout');
|
|
6497
6500
|
const { target, __updatedList: updateList } = this;
|
|
@@ -6678,7 +6681,7 @@ class Renderer {
|
|
|
6678
6681
|
partRender() {
|
|
6679
6682
|
const { canvas, updateBlocks: list } = this;
|
|
6680
6683
|
if (!list)
|
|
6681
|
-
return
|
|
6684
|
+
return;
|
|
6682
6685
|
this.mergeBlocks();
|
|
6683
6686
|
list.forEach(block => { if (canvas.bounds.hit(block) && !block.isEmpty())
|
|
6684
6687
|
this.clipRender(block); });
|
|
@@ -7062,6 +7065,7 @@ class UIData extends LeafData {
|
|
|
7062
7065
|
return t.fill && this.__hasStroke;
|
|
7063
7066
|
}
|
|
7064
7067
|
get __clipAfterFill() { const t = this; return (t.cornerRadius || t.innerShadow || t.__pathInputed); }
|
|
7068
|
+
get __hasSurface() { const t = this; return (t.fill || t.stroke); }
|
|
7065
7069
|
get __autoWidth() { return !this._width; }
|
|
7066
7070
|
get __autoHeight() { return !this._height; }
|
|
7067
7071
|
get __autoSide() { return !this._width || !this._height; }
|
|
@@ -7534,7 +7538,7 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7534
7538
|
animate(_keyframe, _options, _type, _isTemp) {
|
|
7535
7539
|
return Plugin.need('animate');
|
|
7536
7540
|
}
|
|
7537
|
-
killAnimate(_type,
|
|
7541
|
+
killAnimate(_type, _nextStyle) { }
|
|
7538
7542
|
export(_filename, _options) {
|
|
7539
7543
|
return Plugin.need('export');
|
|
7540
7544
|
}
|
|
@@ -7565,199 +7569,199 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7565
7569
|
};
|
|
7566
7570
|
__decorate([
|
|
7567
7571
|
dataProcessor(UIData)
|
|
7568
|
-
], UI.prototype, "__",
|
|
7572
|
+
], UI.prototype, "__", undefined);
|
|
7569
7573
|
__decorate([
|
|
7570
7574
|
zoomLayerType()
|
|
7571
|
-
], UI.prototype, "zoomLayer",
|
|
7575
|
+
], UI.prototype, "zoomLayer", undefined);
|
|
7572
7576
|
__decorate([
|
|
7573
7577
|
dataType('')
|
|
7574
|
-
], UI.prototype, "id",
|
|
7578
|
+
], UI.prototype, "id", undefined);
|
|
7575
7579
|
__decorate([
|
|
7576
7580
|
dataType('')
|
|
7577
|
-
], UI.prototype, "name",
|
|
7581
|
+
], UI.prototype, "name", undefined);
|
|
7578
7582
|
__decorate([
|
|
7579
7583
|
dataType('')
|
|
7580
|
-
], UI.prototype, "className",
|
|
7584
|
+
], UI.prototype, "className", undefined);
|
|
7581
7585
|
__decorate([
|
|
7582
7586
|
surfaceType('pass-through')
|
|
7583
|
-
], UI.prototype, "blendMode",
|
|
7587
|
+
], UI.prototype, "blendMode", undefined);
|
|
7584
7588
|
__decorate([
|
|
7585
7589
|
opacityType(1)
|
|
7586
|
-
], UI.prototype, "opacity",
|
|
7590
|
+
], UI.prototype, "opacity", undefined);
|
|
7587
7591
|
__decorate([
|
|
7588
7592
|
visibleType(true)
|
|
7589
|
-
], UI.prototype, "visible",
|
|
7593
|
+
], UI.prototype, "visible", undefined);
|
|
7590
7594
|
__decorate([
|
|
7591
7595
|
surfaceType(false)
|
|
7592
|
-
], UI.prototype, "locked",
|
|
7596
|
+
], UI.prototype, "locked", undefined);
|
|
7593
7597
|
__decorate([
|
|
7594
7598
|
sortType(0)
|
|
7595
|
-
], UI.prototype, "zIndex",
|
|
7599
|
+
], UI.prototype, "zIndex", undefined);
|
|
7596
7600
|
__decorate([
|
|
7597
7601
|
maskType(false)
|
|
7598
|
-
], UI.prototype, "mask",
|
|
7602
|
+
], UI.prototype, "mask", undefined);
|
|
7599
7603
|
__decorate([
|
|
7600
7604
|
eraserType(false)
|
|
7601
|
-
], UI.prototype, "eraser",
|
|
7605
|
+
], UI.prototype, "eraser", undefined);
|
|
7602
7606
|
__decorate([
|
|
7603
7607
|
positionType(0, true)
|
|
7604
|
-
], UI.prototype, "x",
|
|
7608
|
+
], UI.prototype, "x", undefined);
|
|
7605
7609
|
__decorate([
|
|
7606
7610
|
positionType(0, true)
|
|
7607
|
-
], UI.prototype, "y",
|
|
7611
|
+
], UI.prototype, "y", undefined);
|
|
7608
7612
|
__decorate([
|
|
7609
7613
|
boundsType(100, true)
|
|
7610
|
-
], UI.prototype, "width",
|
|
7614
|
+
], UI.prototype, "width", undefined);
|
|
7611
7615
|
__decorate([
|
|
7612
7616
|
boundsType(100, true)
|
|
7613
|
-
], UI.prototype, "height",
|
|
7617
|
+
], UI.prototype, "height", undefined);
|
|
7614
7618
|
__decorate([
|
|
7615
7619
|
scaleType(1, true)
|
|
7616
|
-
], UI.prototype, "scaleX",
|
|
7620
|
+
], UI.prototype, "scaleX", undefined);
|
|
7617
7621
|
__decorate([
|
|
7618
7622
|
scaleType(1, true)
|
|
7619
|
-
], UI.prototype, "scaleY",
|
|
7623
|
+
], UI.prototype, "scaleY", undefined);
|
|
7620
7624
|
__decorate([
|
|
7621
7625
|
rotationType(0, true)
|
|
7622
|
-
], UI.prototype, "rotation",
|
|
7626
|
+
], UI.prototype, "rotation", undefined);
|
|
7623
7627
|
__decorate([
|
|
7624
7628
|
rotationType(0, true)
|
|
7625
|
-
], UI.prototype, "skewX",
|
|
7629
|
+
], UI.prototype, "skewX", undefined);
|
|
7626
7630
|
__decorate([
|
|
7627
7631
|
rotationType(0, true)
|
|
7628
|
-
], UI.prototype, "skewY",
|
|
7632
|
+
], UI.prototype, "skewY", undefined);
|
|
7629
7633
|
__decorate([
|
|
7630
7634
|
positionType(0, true)
|
|
7631
|
-
], UI.prototype, "offsetX",
|
|
7635
|
+
], UI.prototype, "offsetX", undefined);
|
|
7632
7636
|
__decorate([
|
|
7633
7637
|
positionType(0, true)
|
|
7634
|
-
], UI.prototype, "offsetY",
|
|
7638
|
+
], UI.prototype, "offsetY", undefined);
|
|
7635
7639
|
__decorate([
|
|
7636
7640
|
positionType(0, true)
|
|
7637
|
-
], UI.prototype, "scrollX",
|
|
7641
|
+
], UI.prototype, "scrollX", undefined);
|
|
7638
7642
|
__decorate([
|
|
7639
7643
|
positionType(0, true)
|
|
7640
|
-
], UI.prototype, "scrollY",
|
|
7644
|
+
], UI.prototype, "scrollY", undefined);
|
|
7641
7645
|
__decorate([
|
|
7642
7646
|
autoLayoutType()
|
|
7643
|
-
], UI.prototype, "origin",
|
|
7647
|
+
], UI.prototype, "origin", undefined);
|
|
7644
7648
|
__decorate([
|
|
7645
7649
|
autoLayoutType()
|
|
7646
|
-
], UI.prototype, "around",
|
|
7650
|
+
], UI.prototype, "around", undefined);
|
|
7647
7651
|
__decorate([
|
|
7648
7652
|
dataType(false)
|
|
7649
|
-
], UI.prototype, "lazy",
|
|
7653
|
+
], UI.prototype, "lazy", undefined);
|
|
7650
7654
|
__decorate([
|
|
7651
7655
|
naturalBoundsType(1)
|
|
7652
|
-
], UI.prototype, "pixelRatio",
|
|
7656
|
+
], UI.prototype, "pixelRatio", undefined);
|
|
7653
7657
|
__decorate([
|
|
7654
7658
|
pathInputType()
|
|
7655
|
-
], UI.prototype, "path",
|
|
7659
|
+
], UI.prototype, "path", undefined);
|
|
7656
7660
|
__decorate([
|
|
7657
7661
|
pathType()
|
|
7658
|
-
], UI.prototype, "windingRule",
|
|
7662
|
+
], UI.prototype, "windingRule", undefined);
|
|
7659
7663
|
__decorate([
|
|
7660
7664
|
pathType(true)
|
|
7661
|
-
], UI.prototype, "closed",
|
|
7665
|
+
], UI.prototype, "closed", undefined);
|
|
7662
7666
|
__decorate([
|
|
7663
7667
|
boundsType(0)
|
|
7664
|
-
], UI.prototype, "padding",
|
|
7668
|
+
], UI.prototype, "padding", undefined);
|
|
7665
7669
|
__decorate([
|
|
7666
7670
|
boundsType(false)
|
|
7667
|
-
], UI.prototype, "lockRatio",
|
|
7671
|
+
], UI.prototype, "lockRatio", undefined);
|
|
7668
7672
|
__decorate([
|
|
7669
7673
|
boundsType()
|
|
7670
|
-
], UI.prototype, "widthRange",
|
|
7674
|
+
], UI.prototype, "widthRange", undefined);
|
|
7671
7675
|
__decorate([
|
|
7672
7676
|
boundsType()
|
|
7673
|
-
], UI.prototype, "heightRange",
|
|
7677
|
+
], UI.prototype, "heightRange", undefined);
|
|
7674
7678
|
__decorate([
|
|
7675
7679
|
dataType(false)
|
|
7676
|
-
], UI.prototype, "draggable",
|
|
7680
|
+
], UI.prototype, "draggable", undefined);
|
|
7677
7681
|
__decorate([
|
|
7678
7682
|
dataType()
|
|
7679
|
-
], UI.prototype, "dragBounds",
|
|
7683
|
+
], UI.prototype, "dragBounds", undefined);
|
|
7680
7684
|
__decorate([
|
|
7681
7685
|
dataType(false)
|
|
7682
|
-
], UI.prototype, "editable",
|
|
7686
|
+
], UI.prototype, "editable", undefined);
|
|
7683
7687
|
__decorate([
|
|
7684
7688
|
hitType(true)
|
|
7685
|
-
], UI.prototype, "hittable",
|
|
7689
|
+
], UI.prototype, "hittable", undefined);
|
|
7686
7690
|
__decorate([
|
|
7687
7691
|
hitType('path')
|
|
7688
|
-
], UI.prototype, "hitFill",
|
|
7692
|
+
], UI.prototype, "hitFill", undefined);
|
|
7689
7693
|
__decorate([
|
|
7690
7694
|
strokeType('path')
|
|
7691
|
-
], UI.prototype, "hitStroke",
|
|
7695
|
+
], UI.prototype, "hitStroke", undefined);
|
|
7692
7696
|
__decorate([
|
|
7693
7697
|
hitType(false)
|
|
7694
|
-
], UI.prototype, "hitBox",
|
|
7698
|
+
], UI.prototype, "hitBox", undefined);
|
|
7695
7699
|
__decorate([
|
|
7696
7700
|
hitType(true)
|
|
7697
|
-
], UI.prototype, "hitChildren",
|
|
7701
|
+
], UI.prototype, "hitChildren", undefined);
|
|
7698
7702
|
__decorate([
|
|
7699
7703
|
hitType(true)
|
|
7700
|
-
], UI.prototype, "hitSelf",
|
|
7704
|
+
], UI.prototype, "hitSelf", undefined);
|
|
7701
7705
|
__decorate([
|
|
7702
7706
|
hitType()
|
|
7703
|
-
], UI.prototype, "hitRadius",
|
|
7707
|
+
], UI.prototype, "hitRadius", undefined);
|
|
7704
7708
|
__decorate([
|
|
7705
7709
|
cursorType('')
|
|
7706
|
-
], UI.prototype, "cursor",
|
|
7710
|
+
], UI.prototype, "cursor", undefined);
|
|
7707
7711
|
__decorate([
|
|
7708
7712
|
surfaceType()
|
|
7709
|
-
], UI.prototype, "fill",
|
|
7713
|
+
], UI.prototype, "fill", undefined);
|
|
7710
7714
|
__decorate([
|
|
7711
7715
|
strokeType()
|
|
7712
|
-
], UI.prototype, "stroke",
|
|
7716
|
+
], UI.prototype, "stroke", undefined);
|
|
7713
7717
|
__decorate([
|
|
7714
7718
|
strokeType('inside')
|
|
7715
|
-
], UI.prototype, "strokeAlign",
|
|
7719
|
+
], UI.prototype, "strokeAlign", undefined);
|
|
7716
7720
|
__decorate([
|
|
7717
7721
|
strokeType(1)
|
|
7718
|
-
], UI.prototype, "strokeWidth",
|
|
7722
|
+
], UI.prototype, "strokeWidth", undefined);
|
|
7719
7723
|
__decorate([
|
|
7720
7724
|
strokeType(false)
|
|
7721
|
-
], UI.prototype, "strokeWidthFixed",
|
|
7725
|
+
], UI.prototype, "strokeWidthFixed", undefined);
|
|
7722
7726
|
__decorate([
|
|
7723
7727
|
strokeType('none')
|
|
7724
|
-
], UI.prototype, "strokeCap",
|
|
7728
|
+
], UI.prototype, "strokeCap", undefined);
|
|
7725
7729
|
__decorate([
|
|
7726
7730
|
strokeType('miter')
|
|
7727
|
-
], UI.prototype, "strokeJoin",
|
|
7731
|
+
], UI.prototype, "strokeJoin", undefined);
|
|
7728
7732
|
__decorate([
|
|
7729
7733
|
strokeType()
|
|
7730
|
-
], UI.prototype, "dashPattern",
|
|
7734
|
+
], UI.prototype, "dashPattern", undefined);
|
|
7731
7735
|
__decorate([
|
|
7732
7736
|
strokeType()
|
|
7733
|
-
], UI.prototype, "dashOffset",
|
|
7737
|
+
], UI.prototype, "dashOffset", undefined);
|
|
7734
7738
|
__decorate([
|
|
7735
7739
|
strokeType(10)
|
|
7736
|
-
], UI.prototype, "miterLimit",
|
|
7740
|
+
], UI.prototype, "miterLimit", undefined);
|
|
7737
7741
|
__decorate([
|
|
7738
7742
|
pathType(0)
|
|
7739
|
-
], UI.prototype, "cornerRadius",
|
|
7743
|
+
], UI.prototype, "cornerRadius", undefined);
|
|
7740
7744
|
__decorate([
|
|
7741
7745
|
pathType()
|
|
7742
|
-
], UI.prototype, "cornerSmoothing",
|
|
7746
|
+
], UI.prototype, "cornerSmoothing", undefined);
|
|
7743
7747
|
__decorate([
|
|
7744
7748
|
effectType()
|
|
7745
|
-
], UI.prototype, "shadow",
|
|
7749
|
+
], UI.prototype, "shadow", undefined);
|
|
7746
7750
|
__decorate([
|
|
7747
7751
|
effectType()
|
|
7748
|
-
], UI.prototype, "innerShadow",
|
|
7752
|
+
], UI.prototype, "innerShadow", undefined);
|
|
7749
7753
|
__decorate([
|
|
7750
7754
|
effectType()
|
|
7751
|
-
], UI.prototype, "blur",
|
|
7755
|
+
], UI.prototype, "blur", undefined);
|
|
7752
7756
|
__decorate([
|
|
7753
7757
|
effectType()
|
|
7754
|
-
], UI.prototype, "backgroundBlur",
|
|
7758
|
+
], UI.prototype, "backgroundBlur", undefined);
|
|
7755
7759
|
__decorate([
|
|
7756
7760
|
effectType()
|
|
7757
|
-
], UI.prototype, "grayscale",
|
|
7761
|
+
], UI.prototype, "grayscale", undefined);
|
|
7758
7762
|
__decorate([
|
|
7759
7763
|
dataType({})
|
|
7760
|
-
], UI.prototype, "data",
|
|
7764
|
+
], UI.prototype, "data", undefined);
|
|
7761
7765
|
__decorate([
|
|
7762
7766
|
rewrite(Leaf.prototype.reset)
|
|
7763
7767
|
], UI.prototype, "reset", null);
|
|
@@ -7818,7 +7822,7 @@ let Group = class Group extends UI {
|
|
|
7818
7822
|
};
|
|
7819
7823
|
__decorate([
|
|
7820
7824
|
dataProcessor(GroupData)
|
|
7821
|
-
], Group.prototype, "__",
|
|
7825
|
+
], Group.prototype, "__", undefined);
|
|
7822
7826
|
Group = __decorate([
|
|
7823
7827
|
useModule(Branch),
|
|
7824
7828
|
registerUI()
|
|
@@ -7989,8 +7993,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
7989
7993
|
__setAttr(attrName, newValue) {
|
|
7990
7994
|
if (this.canvas) {
|
|
7991
7995
|
if (canvasSizeAttrs.includes(attrName)) {
|
|
7992
|
-
if (!newValue)
|
|
7993
|
-
debug$1.warn(attrName + ' is 0');
|
|
7994
7996
|
this.__changeCanvasSize(attrName, newValue);
|
|
7995
7997
|
}
|
|
7996
7998
|
else if (attrName === 'fill') {
|
|
@@ -8030,8 +8032,6 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8030
8032
|
this.created = true;
|
|
8031
8033
|
}
|
|
8032
8034
|
__onReady() {
|
|
8033
|
-
if (this.ready)
|
|
8034
|
-
return;
|
|
8035
8035
|
this.ready = true;
|
|
8036
8036
|
this.emitLeafer(LeaferEvent.BEFORE_READY);
|
|
8037
8037
|
this.emitLeafer(LeaferEvent.READY);
|
|
@@ -8045,6 +8045,20 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8045
8045
|
this.emitLeafer(LeaferEvent.VIEW_READY);
|
|
8046
8046
|
WaitHelper.run(this.__viewReadyWait);
|
|
8047
8047
|
}
|
|
8048
|
+
__onLayoutEnd() {
|
|
8049
|
+
const { grow, growWidth, growHeight } = this.config;
|
|
8050
|
+
if (grow) {
|
|
8051
|
+
let { width, height, pixelRatio } = this;
|
|
8052
|
+
const bounds = grow === 'box' ? this.worldBoxBounds : this.__world;
|
|
8053
|
+
if (growWidth !== false)
|
|
8054
|
+
width = Math.max(1, bounds.x + bounds.width);
|
|
8055
|
+
if (growHeight !== false)
|
|
8056
|
+
height = Math.max(1, bounds.y + bounds.height);
|
|
8057
|
+
this.__doResize({ width, height, pixelRatio });
|
|
8058
|
+
}
|
|
8059
|
+
if (!this.ready)
|
|
8060
|
+
this.__onReady();
|
|
8061
|
+
}
|
|
8048
8062
|
__onNextRender() {
|
|
8049
8063
|
if (this.viewReady) {
|
|
8050
8064
|
WaitHelper.run(this.__nextRenderWait);
|
|
@@ -8138,10 +8152,9 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8138
8152
|
const runId = Run.start('FirstCreate ' + this.innerName);
|
|
8139
8153
|
this.once(LeaferEvent.START, () => Run.end(runId));
|
|
8140
8154
|
this.once(LayoutEvent.START, () => this.updateLazyBounds());
|
|
8141
|
-
this.once(LayoutEvent.END, () => this.__onReady());
|
|
8142
8155
|
this.once(RenderEvent.START, () => this.__onCreated());
|
|
8143
8156
|
this.once(RenderEvent.END, () => this.__onViewReady());
|
|
8144
|
-
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8157
|
+
this.__eventIds.push(this.on_(WatchEvent.DATA, this.__onWatchData, this), this.on_(LayoutEvent.END, this.__onLayoutEnd, this), this.on_(RenderEvent.NEXT, this.__onNextRender, this));
|
|
8145
8158
|
}
|
|
8146
8159
|
__removeListenEvents() {
|
|
8147
8160
|
this.off_(this.__eventIds);
|
|
@@ -8182,10 +8195,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8182
8195
|
Leafer.list = new LeafList();
|
|
8183
8196
|
__decorate([
|
|
8184
8197
|
dataProcessor(LeaferData)
|
|
8185
|
-
], Leafer.prototype, "__",
|
|
8198
|
+
], Leafer.prototype, "__", undefined);
|
|
8186
8199
|
__decorate([
|
|
8187
8200
|
boundsType()
|
|
8188
|
-
], Leafer.prototype, "pixelRatio",
|
|
8201
|
+
], Leafer.prototype, "pixelRatio", undefined);
|
|
8189
8202
|
Leafer = Leafer_1 = __decorate([
|
|
8190
8203
|
registerUI()
|
|
8191
8204
|
], Leafer);
|
|
@@ -8198,7 +8211,7 @@ let Rect = class Rect extends UI {
|
|
|
8198
8211
|
};
|
|
8199
8212
|
__decorate([
|
|
8200
8213
|
dataProcessor(RectData)
|
|
8201
|
-
], Rect.prototype, "__",
|
|
8214
|
+
], Rect.prototype, "__", undefined);
|
|
8202
8215
|
Rect = __decorate([
|
|
8203
8216
|
useModule(RectRender),
|
|
8204
8217
|
rewriteAble(),
|
|
@@ -8223,6 +8236,8 @@ let Box = class Box extends Group {
|
|
|
8223
8236
|
const data = this.__;
|
|
8224
8237
|
if (this.children.length) {
|
|
8225
8238
|
if (data.__autoSide) {
|
|
8239
|
+
if (data.__hasSurface)
|
|
8240
|
+
this.__extraUpdate();
|
|
8226
8241
|
super.__updateBoxBounds();
|
|
8227
8242
|
const { boxBounds } = this.__layout;
|
|
8228
8243
|
if (!data.__autoSize) {
|
|
@@ -8287,13 +8302,13 @@ let Box = class Box extends Group {
|
|
|
8287
8302
|
};
|
|
8288
8303
|
__decorate([
|
|
8289
8304
|
dataProcessor(BoxData)
|
|
8290
|
-
], Box.prototype, "__",
|
|
8305
|
+
], Box.prototype, "__", undefined);
|
|
8291
8306
|
__decorate([
|
|
8292
8307
|
dataType(false)
|
|
8293
|
-
], Box.prototype, "resizeChildren",
|
|
8308
|
+
], Box.prototype, "resizeChildren", undefined);
|
|
8294
8309
|
__decorate([
|
|
8295
8310
|
affectRenderBoundsType('show')
|
|
8296
|
-
], Box.prototype, "overflow",
|
|
8311
|
+
], Box.prototype, "overflow", undefined);
|
|
8297
8312
|
__decorate([
|
|
8298
8313
|
rewrite(rect$1.__updateStrokeSpread)
|
|
8299
8314
|
], Box.prototype, "__updateStrokeSpread", null);
|
|
@@ -8332,13 +8347,13 @@ let Frame = class Frame extends Box {
|
|
|
8332
8347
|
};
|
|
8333
8348
|
__decorate([
|
|
8334
8349
|
dataProcessor(FrameData)
|
|
8335
|
-
], Frame.prototype, "__",
|
|
8350
|
+
], Frame.prototype, "__", undefined);
|
|
8336
8351
|
__decorate([
|
|
8337
8352
|
surfaceType('#FFFFFF')
|
|
8338
|
-
], Frame.prototype, "fill",
|
|
8353
|
+
], Frame.prototype, "fill", undefined);
|
|
8339
8354
|
__decorate([
|
|
8340
8355
|
affectRenderBoundsType('hide')
|
|
8341
|
-
], Frame.prototype, "overflow",
|
|
8356
|
+
], Frame.prototype, "overflow", undefined);
|
|
8342
8357
|
Frame = __decorate([
|
|
8343
8358
|
registerUI()
|
|
8344
8359
|
], Frame);
|
|
@@ -8385,16 +8400,16 @@ let Ellipse = class Ellipse extends UI {
|
|
|
8385
8400
|
};
|
|
8386
8401
|
__decorate([
|
|
8387
8402
|
dataProcessor(EllipseData)
|
|
8388
|
-
], Ellipse.prototype, "__",
|
|
8403
|
+
], Ellipse.prototype, "__", undefined);
|
|
8389
8404
|
__decorate([
|
|
8390
8405
|
pathType(0)
|
|
8391
|
-
], Ellipse.prototype, "innerRadius",
|
|
8406
|
+
], Ellipse.prototype, "innerRadius", undefined);
|
|
8392
8407
|
__decorate([
|
|
8393
8408
|
pathType(0)
|
|
8394
|
-
], Ellipse.prototype, "startAngle",
|
|
8409
|
+
], Ellipse.prototype, "startAngle", undefined);
|
|
8395
8410
|
__decorate([
|
|
8396
8411
|
pathType(0)
|
|
8397
|
-
], Ellipse.prototype, "endAngle",
|
|
8412
|
+
], Ellipse.prototype, "endAngle", undefined);
|
|
8398
8413
|
Ellipse = __decorate([
|
|
8399
8414
|
registerUI()
|
|
8400
8415
|
], Ellipse);
|
|
@@ -8453,22 +8468,22 @@ let Line = class Line extends UI {
|
|
|
8453
8468
|
};
|
|
8454
8469
|
__decorate([
|
|
8455
8470
|
dataProcessor(LineData)
|
|
8456
|
-
], Line.prototype, "__",
|
|
8471
|
+
], Line.prototype, "__", undefined);
|
|
8457
8472
|
__decorate([
|
|
8458
8473
|
affectStrokeBoundsType('center')
|
|
8459
|
-
], Line.prototype, "strokeAlign",
|
|
8474
|
+
], Line.prototype, "strokeAlign", undefined);
|
|
8460
8475
|
__decorate([
|
|
8461
8476
|
boundsType(0)
|
|
8462
|
-
], Line.prototype, "height",
|
|
8477
|
+
], Line.prototype, "height", undefined);
|
|
8463
8478
|
__decorate([
|
|
8464
8479
|
pathType()
|
|
8465
|
-
], Line.prototype, "points",
|
|
8480
|
+
], Line.prototype, "points", undefined);
|
|
8466
8481
|
__decorate([
|
|
8467
8482
|
pathType(0)
|
|
8468
|
-
], Line.prototype, "curve",
|
|
8483
|
+
], Line.prototype, "curve", undefined);
|
|
8469
8484
|
__decorate([
|
|
8470
8485
|
pathType(false)
|
|
8471
|
-
], Line.prototype, "closed",
|
|
8486
|
+
], Line.prototype, "closed", undefined);
|
|
8472
8487
|
Line = __decorate([
|
|
8473
8488
|
registerUI()
|
|
8474
8489
|
], Line);
|
|
@@ -8501,16 +8516,16 @@ let Polygon = class Polygon extends UI {
|
|
|
8501
8516
|
};
|
|
8502
8517
|
__decorate([
|
|
8503
8518
|
dataProcessor(PolygonData)
|
|
8504
|
-
], Polygon.prototype, "__",
|
|
8519
|
+
], Polygon.prototype, "__", undefined);
|
|
8505
8520
|
__decorate([
|
|
8506
8521
|
pathType(3)
|
|
8507
|
-
], Polygon.prototype, "sides",
|
|
8522
|
+
], Polygon.prototype, "sides", undefined);
|
|
8508
8523
|
__decorate([
|
|
8509
8524
|
pathType()
|
|
8510
|
-
], Polygon.prototype, "points",
|
|
8525
|
+
], Polygon.prototype, "points", undefined);
|
|
8511
8526
|
__decorate([
|
|
8512
8527
|
pathType(0)
|
|
8513
|
-
], Polygon.prototype, "curve",
|
|
8528
|
+
], Polygon.prototype, "curve", undefined);
|
|
8514
8529
|
__decorate([
|
|
8515
8530
|
rewrite(line.__updateRenderPath)
|
|
8516
8531
|
], Polygon.prototype, "__updateRenderPath", null);
|
|
@@ -8542,13 +8557,13 @@ let Star = class Star extends UI {
|
|
|
8542
8557
|
};
|
|
8543
8558
|
__decorate([
|
|
8544
8559
|
dataProcessor(StarData)
|
|
8545
|
-
], Star.prototype, "__",
|
|
8560
|
+
], Star.prototype, "__", undefined);
|
|
8546
8561
|
__decorate([
|
|
8547
8562
|
pathType(5)
|
|
8548
|
-
], Star.prototype, "corners",
|
|
8563
|
+
], Star.prototype, "corners", undefined);
|
|
8549
8564
|
__decorate([
|
|
8550
8565
|
pathType(0.382)
|
|
8551
|
-
], Star.prototype, "innerRadius",
|
|
8566
|
+
], Star.prototype, "innerRadius", undefined);
|
|
8552
8567
|
Star = __decorate([
|
|
8553
8568
|
registerUI()
|
|
8554
8569
|
], Star);
|
|
@@ -8570,10 +8585,10 @@ let Image = class Image extends Rect {
|
|
|
8570
8585
|
};
|
|
8571
8586
|
__decorate([
|
|
8572
8587
|
dataProcessor(ImageData)
|
|
8573
|
-
], Image.prototype, "__",
|
|
8588
|
+
], Image.prototype, "__", undefined);
|
|
8574
8589
|
__decorate([
|
|
8575
8590
|
boundsType('')
|
|
8576
|
-
], Image.prototype, "url",
|
|
8591
|
+
], Image.prototype, "url", undefined);
|
|
8577
8592
|
Image = __decorate([
|
|
8578
8593
|
registerUI()
|
|
8579
8594
|
], Image);
|
|
@@ -8636,25 +8651,25 @@ let Canvas = class Canvas extends Rect {
|
|
|
8636
8651
|
};
|
|
8637
8652
|
__decorate([
|
|
8638
8653
|
dataProcessor(CanvasData)
|
|
8639
|
-
], Canvas.prototype, "__",
|
|
8654
|
+
], Canvas.prototype, "__", undefined);
|
|
8640
8655
|
__decorate([
|
|
8641
8656
|
resizeType(100)
|
|
8642
|
-
], Canvas.prototype, "width",
|
|
8657
|
+
], Canvas.prototype, "width", undefined);
|
|
8643
8658
|
__decorate([
|
|
8644
8659
|
resizeType(100)
|
|
8645
|
-
], Canvas.prototype, "height",
|
|
8660
|
+
], Canvas.prototype, "height", undefined);
|
|
8646
8661
|
__decorate([
|
|
8647
8662
|
resizeType(1)
|
|
8648
|
-
], Canvas.prototype, "pixelRatio",
|
|
8663
|
+
], Canvas.prototype, "pixelRatio", undefined);
|
|
8649
8664
|
__decorate([
|
|
8650
8665
|
resizeType(true)
|
|
8651
|
-
], Canvas.prototype, "smooth",
|
|
8666
|
+
], Canvas.prototype, "smooth", undefined);
|
|
8652
8667
|
__decorate([
|
|
8653
8668
|
dataType(false)
|
|
8654
|
-
], Canvas.prototype, "safeResize",
|
|
8669
|
+
], Canvas.prototype, "safeResize", undefined);
|
|
8655
8670
|
__decorate([
|
|
8656
8671
|
resizeType()
|
|
8657
|
-
], Canvas.prototype, "contextSettings",
|
|
8672
|
+
], Canvas.prototype, "contextSettings", undefined);
|
|
8658
8673
|
Canvas = __decorate([
|
|
8659
8674
|
registerUI()
|
|
8660
8675
|
], Canvas);
|
|
@@ -8745,76 +8760,76 @@ let Text = class Text extends UI {
|
|
|
8745
8760
|
};
|
|
8746
8761
|
__decorate([
|
|
8747
8762
|
dataProcessor(TextData)
|
|
8748
|
-
], Text.prototype, "__",
|
|
8763
|
+
], Text.prototype, "__", undefined);
|
|
8749
8764
|
__decorate([
|
|
8750
8765
|
boundsType(0)
|
|
8751
|
-
], Text.prototype, "width",
|
|
8766
|
+
], Text.prototype, "width", undefined);
|
|
8752
8767
|
__decorate([
|
|
8753
8768
|
boundsType(0)
|
|
8754
|
-
], Text.prototype, "height",
|
|
8769
|
+
], Text.prototype, "height", undefined);
|
|
8755
8770
|
__decorate([
|
|
8756
8771
|
dataType(false)
|
|
8757
|
-
], Text.prototype, "resizeFontSize",
|
|
8772
|
+
], Text.prototype, "resizeFontSize", undefined);
|
|
8758
8773
|
__decorate([
|
|
8759
8774
|
surfaceType('#000000')
|
|
8760
|
-
], Text.prototype, "fill",
|
|
8775
|
+
], Text.prototype, "fill", undefined);
|
|
8761
8776
|
__decorate([
|
|
8762
8777
|
affectStrokeBoundsType('outside')
|
|
8763
|
-
], Text.prototype, "strokeAlign",
|
|
8778
|
+
], Text.prototype, "strokeAlign", undefined);
|
|
8764
8779
|
__decorate([
|
|
8765
8780
|
hitType('all')
|
|
8766
|
-
], Text.prototype, "hitFill",
|
|
8781
|
+
], Text.prototype, "hitFill", undefined);
|
|
8767
8782
|
__decorate([
|
|
8768
8783
|
boundsType('')
|
|
8769
|
-
], Text.prototype, "text",
|
|
8784
|
+
], Text.prototype, "text", undefined);
|
|
8770
8785
|
__decorate([
|
|
8771
|
-
boundsType('
|
|
8772
|
-
], Text.prototype, "fontFamily",
|
|
8786
|
+
boundsType('caption')
|
|
8787
|
+
], Text.prototype, "fontFamily", undefined);
|
|
8773
8788
|
__decorate([
|
|
8774
8789
|
boundsType(12)
|
|
8775
|
-
], Text.prototype, "fontSize",
|
|
8790
|
+
], Text.prototype, "fontSize", undefined);
|
|
8776
8791
|
__decorate([
|
|
8777
8792
|
boundsType('normal')
|
|
8778
|
-
], Text.prototype, "fontWeight",
|
|
8793
|
+
], Text.prototype, "fontWeight", undefined);
|
|
8779
8794
|
__decorate([
|
|
8780
8795
|
boundsType(false)
|
|
8781
|
-
], Text.prototype, "italic",
|
|
8796
|
+
], Text.prototype, "italic", undefined);
|
|
8782
8797
|
__decorate([
|
|
8783
8798
|
boundsType('none')
|
|
8784
|
-
], Text.prototype, "textCase",
|
|
8799
|
+
], Text.prototype, "textCase", undefined);
|
|
8785
8800
|
__decorate([
|
|
8786
8801
|
boundsType('none')
|
|
8787
|
-
], Text.prototype, "textDecoration",
|
|
8802
|
+
], Text.prototype, "textDecoration", undefined);
|
|
8788
8803
|
__decorate([
|
|
8789
8804
|
boundsType(0)
|
|
8790
|
-
], Text.prototype, "letterSpacing",
|
|
8805
|
+
], Text.prototype, "letterSpacing", undefined);
|
|
8791
8806
|
__decorate([
|
|
8792
8807
|
boundsType({ type: 'percent', value: 1.5 })
|
|
8793
|
-
], Text.prototype, "lineHeight",
|
|
8808
|
+
], Text.prototype, "lineHeight", undefined);
|
|
8794
8809
|
__decorate([
|
|
8795
8810
|
boundsType(0)
|
|
8796
|
-
], Text.prototype, "paraIndent",
|
|
8811
|
+
], Text.prototype, "paraIndent", undefined);
|
|
8797
8812
|
__decorate([
|
|
8798
8813
|
boundsType(0)
|
|
8799
|
-
], Text.prototype, "paraSpacing",
|
|
8814
|
+
], Text.prototype, "paraSpacing", undefined);
|
|
8800
8815
|
__decorate([
|
|
8801
8816
|
boundsType('x')
|
|
8802
|
-
], Text.prototype, "writingMode",
|
|
8817
|
+
], Text.prototype, "writingMode", undefined);
|
|
8803
8818
|
__decorate([
|
|
8804
8819
|
boundsType('left')
|
|
8805
|
-
], Text.prototype, "textAlign",
|
|
8820
|
+
], Text.prototype, "textAlign", undefined);
|
|
8806
8821
|
__decorate([
|
|
8807
8822
|
boundsType('top')
|
|
8808
|
-
], Text.prototype, "verticalAlign",
|
|
8823
|
+
], Text.prototype, "verticalAlign", undefined);
|
|
8809
8824
|
__decorate([
|
|
8810
8825
|
boundsType(true)
|
|
8811
|
-
], Text.prototype, "autoSizeAlign",
|
|
8826
|
+
], Text.prototype, "autoSizeAlign", undefined);
|
|
8812
8827
|
__decorate([
|
|
8813
8828
|
boundsType('normal')
|
|
8814
|
-
], Text.prototype, "textWrap",
|
|
8829
|
+
], Text.prototype, "textWrap", undefined);
|
|
8815
8830
|
__decorate([
|
|
8816
8831
|
boundsType('show')
|
|
8817
|
-
], Text.prototype, "textOverflow",
|
|
8832
|
+
], Text.prototype, "textOverflow", undefined);
|
|
8818
8833
|
Text = __decorate([
|
|
8819
8834
|
registerUI()
|
|
8820
8835
|
], Text);
|
|
@@ -8827,10 +8842,10 @@ let Path = class Path extends UI {
|
|
|
8827
8842
|
};
|
|
8828
8843
|
__decorate([
|
|
8829
8844
|
dataProcessor(PathData)
|
|
8830
|
-
], Path.prototype, "__",
|
|
8845
|
+
], Path.prototype, "__", undefined);
|
|
8831
8846
|
__decorate([
|
|
8832
8847
|
affectStrokeBoundsType('center')
|
|
8833
|
-
], Path.prototype, "strokeAlign",
|
|
8848
|
+
], Path.prototype, "strokeAlign", undefined);
|
|
8834
8849
|
Path = __decorate([
|
|
8835
8850
|
registerUI()
|
|
8836
8851
|
], Path);
|
|
@@ -8869,10 +8884,10 @@ let Pen = class Pen extends Group {
|
|
|
8869
8884
|
};
|
|
8870
8885
|
__decorate([
|
|
8871
8886
|
dataProcessor(PenData)
|
|
8872
|
-
], Pen.prototype, "__",
|
|
8887
|
+
], Pen.prototype, "__", undefined);
|
|
8873
8888
|
__decorate([
|
|
8874
8889
|
penPathType()
|
|
8875
|
-
], Pen.prototype, "path",
|
|
8890
|
+
], Pen.prototype, "path", undefined);
|
|
8876
8891
|
Pen = __decorate([
|
|
8877
8892
|
useModule(PathCreator, ['set', 'path', 'paint']),
|
|
8878
8893
|
registerUI()
|
|
@@ -10057,9 +10072,9 @@ leaf.__hitWorld = function (point) {
|
|
|
10057
10072
|
}
|
|
10058
10073
|
return this.__hit(inner);
|
|
10059
10074
|
};
|
|
10060
|
-
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10061
|
-
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10062
|
-
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10075
|
+
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitFill(inner, this.__.windingRule); };
|
|
10076
|
+
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitStroke(inner, strokeWidth); };
|
|
10077
|
+
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === undefined ? undefined : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
|
|
10063
10078
|
leaf.__drawHitPath = function (canvas) { if (canvas)
|
|
10064
10079
|
this.__drawRenderPath(canvas); };
|
|
10065
10080
|
|
|
@@ -10899,7 +10914,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
10899
10914
|
}
|
|
10900
10915
|
else {
|
|
10901
10916
|
if (!paint.patternTask) {
|
|
10902
|
-
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this,
|
|
10917
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, undefined, undefined, function* () {
|
|
10903
10918
|
paint.patternTask = null;
|
|
10904
10919
|
if (canvas.bounds.hit(ui.__nowWorld))
|
|
10905
10920
|
createPattern(ui, paint, pixelRatio);
|
|
@@ -11055,7 +11070,7 @@ function shadow(ui, current, shape) {
|
|
|
11055
11070
|
const end = shadow.length - 1;
|
|
11056
11071
|
toOffsetOutBounds$1(bounds, offsetOutBounds$1);
|
|
11057
11072
|
shadow.forEach((item, index) => {
|
|
11058
|
-
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, item.color);
|
|
11073
|
+
other.setWorldShadow((offsetOutBounds$1.offsetX + item.x * scaleX), (offsetOutBounds$1.offsetY + item.y * scaleY), item.blur * scaleX, ColorConvert.string(item.color));
|
|
11059
11074
|
spreadScale = item.spread ? 1 + item.spread * 2 / (__layout.boxBounds.width + (__layout.strokeBoxSpread || 0) * 2) : 0;
|
|
11060
11075
|
drawWorldShadow(other, offsetOutBounds$1, spreadScale, shape);
|
|
11061
11076
|
copyBounds = bounds;
|
|
@@ -11131,7 +11146,7 @@ function innerShadow(ui, current, shape) {
|
|
|
11131
11146
|
other.copyWorld(shape.canvas, shapeBounds, bounds, 'source-out');
|
|
11132
11147
|
copyBounds = bounds;
|
|
11133
11148
|
}
|
|
11134
|
-
other.fillWorld(copyBounds, item.color, 'source-in');
|
|
11149
|
+
other.fillWorld(copyBounds, ColorConvert.string(item.color), 'source-in');
|
|
11135
11150
|
if (ui.__worldFlipped) {
|
|
11136
11151
|
current.copyWorldByReset(other, copyBounds, nowWorld, item.blendMode);
|
|
11137
11152
|
}
|
|
@@ -11493,7 +11508,7 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
11493
11508
|
rows.forEach(row => {
|
|
11494
11509
|
if (row.words) {
|
|
11495
11510
|
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
11496
|
-
addWordWidth = (width && textAlign === 'justify' && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11511
|
+
addWordWidth = (width && (textAlign === 'justify' || textAlign === 'both') && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
11497
11512
|
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
11498
11513
|
if (row.isOverflow && !letterSpacing)
|
|
11499
11514
|
row.textMode = true;
|
|
@@ -11515,7 +11530,7 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
11515
11530
|
else {
|
|
11516
11531
|
charX = toChar(word.data, charX, row.data, row.isOverflow);
|
|
11517
11532
|
}
|
|
11518
|
-
if (!row.paraEnd
|
|
11533
|
+
if (addWordWidth && (!row.paraEnd || textAlign === 'both')) {
|
|
11519
11534
|
charX += addWordWidth;
|
|
11520
11535
|
row.width += addWordWidth;
|
|
11521
11536
|
}
|