@leafer-ui/miniapp 1.4.0 → 1.4.2
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 +12 -9
- package/dist/miniapp.cjs.map +1 -1
- package/dist/miniapp.esm.js +13 -10
- package/dist/miniapp.esm.js.map +1 -1
- package/dist/miniapp.esm.min.js +1 -1
- package/dist/miniapp.esm.min.js.map +1 -1
- package/dist/miniapp.min.cjs +1 -1
- package/dist/miniapp.min.cjs.map +1 -1
- package/dist/miniapp.module.js +322 -273
- package/dist/miniapp.module.js.map +1 -1
- package/dist/miniapp.module.min.js +1 -1
- package/dist/miniapp.module.min.js.map +1 -1
- package/package.json +11 -11
package/dist/miniapp.module.js
CHANGED
|
@@ -1374,7 +1374,7 @@ function getNameList(name) {
|
|
|
1374
1374
|
}
|
|
1375
1375
|
const D$4 = Debug;
|
|
1376
1376
|
|
|
1377
|
-
const debug$
|
|
1377
|
+
const debug$f = Debug.get('RunTime');
|
|
1378
1378
|
const Run = {
|
|
1379
1379
|
currentId: 0,
|
|
1380
1380
|
currentName: '',
|
|
@@ -1383,24 +1383,24 @@ const Run = {
|
|
|
1383
1383
|
nameToIdMap: {},
|
|
1384
1384
|
start(name, microsecond) {
|
|
1385
1385
|
const id = IncrementId.create(IncrementId.RUNTIME);
|
|
1386
|
-
R.currentId = R.idMap[id] = microsecond ? performance.now() : Date.now();
|
|
1387
|
-
R.currentName = R.nameMap[id] = name;
|
|
1388
|
-
R.nameToIdMap[name] = id;
|
|
1386
|
+
R$1.currentId = R$1.idMap[id] = microsecond ? performance.now() : Date.now();
|
|
1387
|
+
R$1.currentName = R$1.nameMap[id] = name;
|
|
1388
|
+
R$1.nameToIdMap[name] = id;
|
|
1389
1389
|
return id;
|
|
1390
1390
|
},
|
|
1391
1391
|
end(id, microsecond) {
|
|
1392
|
-
const time = R.idMap[id], name = R.nameMap[id];
|
|
1392
|
+
const time = R$1.idMap[id], name = R$1.nameMap[id];
|
|
1393
1393
|
const duration = microsecond ? (performance.now() - time) / 1000 : Date.now() - time;
|
|
1394
|
-
R.idMap[id] = R.nameMap[id] = R.nameToIdMap[name] = undefined;
|
|
1395
|
-
debug$
|
|
1394
|
+
R$1.idMap[id] = R$1.nameMap[id] = R$1.nameToIdMap[name] = undefined;
|
|
1395
|
+
debug$f.log(name, duration, 'ms');
|
|
1396
1396
|
},
|
|
1397
1397
|
endOfName(name, microsecond) {
|
|
1398
|
-
const id = R.nameToIdMap[name];
|
|
1398
|
+
const id = R$1.nameToIdMap[name];
|
|
1399
1399
|
if (id !== undefined)
|
|
1400
|
-
R.end(id, microsecond);
|
|
1400
|
+
R$1.end(id, microsecond);
|
|
1401
1401
|
}
|
|
1402
1402
|
};
|
|
1403
|
-
const R = Run;
|
|
1403
|
+
const R$1 = Run;
|
|
1404
1404
|
|
|
1405
1405
|
const check = [];
|
|
1406
1406
|
const Plugin = {
|
|
@@ -1421,18 +1421,18 @@ const Plugin = {
|
|
|
1421
1421
|
};
|
|
1422
1422
|
setTimeout(() => check.forEach(name => Plugin.has(name, true)));
|
|
1423
1423
|
|
|
1424
|
-
const debug$
|
|
1424
|
+
const debug$e = Debug.get('UICreator');
|
|
1425
1425
|
const UICreator = {
|
|
1426
1426
|
list: {},
|
|
1427
1427
|
register(UI) {
|
|
1428
1428
|
const { __tag: tag } = UI.prototype;
|
|
1429
1429
|
if (list$1[tag])
|
|
1430
|
-
debug$
|
|
1430
|
+
debug$e.repeat(tag);
|
|
1431
1431
|
list$1[tag] = UI;
|
|
1432
1432
|
},
|
|
1433
1433
|
get(tag, data, x, y, width, height) {
|
|
1434
1434
|
if (!list$1[tag])
|
|
1435
|
-
debug$
|
|
1435
|
+
debug$e.error('not register ' + tag);
|
|
1436
1436
|
const ui = new list$1[tag](data);
|
|
1437
1437
|
if (x !== undefined) {
|
|
1438
1438
|
ui.x = x;
|
|
@@ -1448,7 +1448,7 @@ const UICreator = {
|
|
|
1448
1448
|
};
|
|
1449
1449
|
const { list: list$1 } = UICreator;
|
|
1450
1450
|
|
|
1451
|
-
const debug$
|
|
1451
|
+
const debug$d = Debug.get('EventCreator');
|
|
1452
1452
|
const EventCreator = {
|
|
1453
1453
|
nameList: {},
|
|
1454
1454
|
register(Event) {
|
|
@@ -1456,7 +1456,7 @@ const EventCreator = {
|
|
|
1456
1456
|
Object.keys(Event).forEach(key => {
|
|
1457
1457
|
name = Event[key];
|
|
1458
1458
|
if (typeof name === 'string')
|
|
1459
|
-
nameList[name] && debug$
|
|
1459
|
+
nameList[name] && debug$d.repeat(name), nameList[name] = Event;
|
|
1460
1460
|
});
|
|
1461
1461
|
},
|
|
1462
1462
|
changeName(oldName, newName) {
|
|
@@ -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 === void 0 ? void 0 : value.constructor) === Object && ((_a = t[key]) === null || _a === void 0 ? void 0 : _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 === void 0 ? void 0 : _b.constructor) === Object)
|
|
1540
1540
|
assign(t[key] = {}, merge[key], exclude[key]);
|
|
1541
1541
|
return;
|
|
1542
1542
|
}
|
|
@@ -1660,7 +1660,7 @@ class LeafData {
|
|
|
1660
1660
|
const t = this;
|
|
1661
1661
|
if (t.blendMode === 'pass-through') {
|
|
1662
1662
|
const leaf = this.__leaf;
|
|
1663
|
-
if ((t.opacity < 1 && (leaf.isBranch || t.__hasMultiPaint)) || leaf.__hasEraser || t.eraser) {
|
|
1663
|
+
if ((t.opacity < 1 && (leaf.isBranch || t.__hasMultiPaint)) || leaf.__hasEraser || t.eraser || t.filter) {
|
|
1664
1664
|
t.__single = true;
|
|
1665
1665
|
}
|
|
1666
1666
|
else if (t.__single) {
|
|
@@ -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 void 0; }
|
|
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 void 0; }
|
|
1834
|
+
createLinearGradient(_x0, _y0, _x1, _y1) { return void 0; }
|
|
1835
|
+
createPattern(_image, _repetition) { return void 0; }
|
|
1836
|
+
createRadialGradient(_x0, _y0, _r0, _x1, _y1, _r1) { return void 0; }
|
|
1837
1837
|
fillText(_text, _x, _y, _maxWidth) { }
|
|
1838
|
-
measureText(_text) { return
|
|
1838
|
+
measureText(_text) { return void 0; }
|
|
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", void 0);
|
|
1847
1847
|
__decorate([
|
|
1848
1848
|
contextAttr('imageSmoothingQuality')
|
|
1849
|
-
], Canvas$1.prototype, "smoothLevel",
|
|
1849
|
+
], Canvas$1.prototype, "smoothLevel", void 0);
|
|
1850
1850
|
__decorate([
|
|
1851
1851
|
contextAttr('globalAlpha')
|
|
1852
|
-
], Canvas$1.prototype, "opacity",
|
|
1852
|
+
], Canvas$1.prototype, "opacity", void 0);
|
|
1853
1853
|
__decorate([
|
|
1854
1854
|
contextAttr()
|
|
1855
|
-
], Canvas$1.prototype, "fillStyle",
|
|
1855
|
+
], Canvas$1.prototype, "fillStyle", void 0);
|
|
1856
1856
|
__decorate([
|
|
1857
1857
|
contextAttr()
|
|
1858
|
-
], Canvas$1.prototype, "strokeStyle",
|
|
1858
|
+
], Canvas$1.prototype, "strokeStyle", void 0);
|
|
1859
1859
|
__decorate([
|
|
1860
1860
|
contextAttr('lineWidth')
|
|
1861
|
-
], Canvas$1.prototype, "strokeWidth",
|
|
1861
|
+
], Canvas$1.prototype, "strokeWidth", void 0);
|
|
1862
1862
|
__decorate([
|
|
1863
1863
|
contextAttr('lineCap')
|
|
1864
|
-
], Canvas$1.prototype, "strokeCap",
|
|
1864
|
+
], Canvas$1.prototype, "strokeCap", void 0);
|
|
1865
1865
|
__decorate([
|
|
1866
1866
|
contextAttr('lineJoin')
|
|
1867
|
-
], Canvas$1.prototype, "strokeJoin",
|
|
1867
|
+
], Canvas$1.prototype, "strokeJoin", void 0);
|
|
1868
1868
|
__decorate([
|
|
1869
1869
|
contextAttr('lineDashOffset')
|
|
1870
|
-
], Canvas$1.prototype, "dashOffset",
|
|
1870
|
+
], Canvas$1.prototype, "dashOffset", void 0);
|
|
1871
1871
|
__decorate([
|
|
1872
1872
|
contextAttr()
|
|
1873
|
-
], Canvas$1.prototype, "miterLimit",
|
|
1873
|
+
], Canvas$1.prototype, "miterLimit", void 0);
|
|
1874
1874
|
__decorate([
|
|
1875
1875
|
contextAttr()
|
|
1876
|
-
], Canvas$1.prototype, "shadowBlur",
|
|
1876
|
+
], Canvas$1.prototype, "shadowBlur", void 0);
|
|
1877
1877
|
__decorate([
|
|
1878
1878
|
contextAttr()
|
|
1879
|
-
], Canvas$1.prototype, "shadowColor",
|
|
1879
|
+
], Canvas$1.prototype, "shadowColor", void 0);
|
|
1880
1880
|
__decorate([
|
|
1881
1881
|
contextAttr()
|
|
1882
|
-
], Canvas$1.prototype, "shadowOffsetX",
|
|
1882
|
+
], Canvas$1.prototype, "shadowOffsetX", void 0);
|
|
1883
1883
|
__decorate([
|
|
1884
1884
|
contextAttr()
|
|
1885
|
-
], Canvas$1.prototype, "shadowOffsetY",
|
|
1885
|
+
], Canvas$1.prototype, "shadowOffsetY", void 0);
|
|
1886
1886
|
__decorate([
|
|
1887
1887
|
contextAttr()
|
|
1888
|
-
], Canvas$1.prototype, "filter",
|
|
1888
|
+
], Canvas$1.prototype, "filter", void 0);
|
|
1889
1889
|
__decorate([
|
|
1890
1890
|
contextAttr()
|
|
1891
|
-
], Canvas$1.prototype, "font",
|
|
1891
|
+
], Canvas$1.prototype, "font", void 0);
|
|
1892
1892
|
__decorate([
|
|
1893
1893
|
contextAttr()
|
|
1894
|
-
], Canvas$1.prototype, "fontKerning",
|
|
1894
|
+
], Canvas$1.prototype, "fontKerning", void 0);
|
|
1895
1895
|
__decorate([
|
|
1896
1896
|
contextAttr()
|
|
1897
|
-
], Canvas$1.prototype, "fontStretch",
|
|
1897
|
+
], Canvas$1.prototype, "fontStretch", void 0);
|
|
1898
1898
|
__decorate([
|
|
1899
1899
|
contextAttr()
|
|
1900
|
-
], Canvas$1.prototype, "fontVariantCaps",
|
|
1900
|
+
], Canvas$1.prototype, "fontVariantCaps", void 0);
|
|
1901
1901
|
__decorate([
|
|
1902
1902
|
contextAttr()
|
|
1903
|
-
], Canvas$1.prototype, "textAlign",
|
|
1903
|
+
], Canvas$1.prototype, "textAlign", void 0);
|
|
1904
1904
|
__decorate([
|
|
1905
1905
|
contextAttr()
|
|
1906
|
-
], Canvas$1.prototype, "textBaseline",
|
|
1906
|
+
], Canvas$1.prototype, "textBaseline", void 0);
|
|
1907
1907
|
__decorate([
|
|
1908
1908
|
contextAttr()
|
|
1909
|
-
], Canvas$1.prototype, "textRendering",
|
|
1909
|
+
], Canvas$1.prototype, "textRendering", void 0);
|
|
1910
1910
|
__decorate([
|
|
1911
1911
|
contextAttr()
|
|
1912
|
-
], Canvas$1.prototype, "wordSpacing",
|
|
1912
|
+
], Canvas$1.prototype, "wordSpacing", void 0);
|
|
1913
1913
|
__decorate([
|
|
1914
1914
|
contextAttr()
|
|
1915
|
-
], Canvas$1.prototype, "letterSpacing",
|
|
1915
|
+
], Canvas$1.prototype, "letterSpacing", void 0);
|
|
1916
1916
|
__decorate([
|
|
1917
1917
|
contextAttr()
|
|
1918
|
-
], Canvas$1.prototype, "direction",
|
|
1918
|
+
], Canvas$1.prototype, "direction", void 0);
|
|
1919
1919
|
__decorate([
|
|
1920
1920
|
contextMethod()
|
|
1921
1921
|
], Canvas$1.prototype, "setTransform", null);
|
|
@@ -2612,7 +2612,7 @@ const EllipseHelper = {
|
|
|
2612
2612
|
const { M: M$4, m, L: L$5, l, H, h, V, v, C: C$4, c, S, s, Q: Q$3, q, T, t, A, a, Z: Z$4, z, N: N$3, D: D$3, X: X$3, G: G$3, F: F$4, O: O$3, P: P$3, U: U$3 } = PathCommandMap;
|
|
2613
2613
|
const { rect: rect$3, roundRect: roundRect$2, arcTo: arcTo$3, arc: arc$3, ellipse: ellipse$4, quadraticCurveTo: quadraticCurveTo$1 } = BezierHelper;
|
|
2614
2614
|
const { ellipticalArc } = EllipseHelper;
|
|
2615
|
-
const debug$
|
|
2615
|
+
const debug$c = Debug.get('PathConvert');
|
|
2616
2616
|
const setEndPoint$1 = {};
|
|
2617
2617
|
const PathConvert = {
|
|
2618
2618
|
current: { dot: 0 },
|
|
@@ -2853,7 +2853,7 @@ const PathConvert = {
|
|
|
2853
2853
|
i += 6;
|
|
2854
2854
|
break;
|
|
2855
2855
|
default:
|
|
2856
|
-
debug$
|
|
2856
|
+
debug$c.error(`command: ${command} [index:${i}]`, old);
|
|
2857
2857
|
return data;
|
|
2858
2858
|
}
|
|
2859
2859
|
lastCommand = command;
|
|
@@ -2962,12 +2962,10 @@ const PathCommandDataHelper = {
|
|
|
2962
2962
|
},
|
|
2963
2963
|
arcTo(data, x1, y1, x2, y2, radius, lastX, lastY) {
|
|
2964
2964
|
if (lastX !== undefined) {
|
|
2965
|
-
const
|
|
2966
|
-
|
|
2967
|
-
}
|
|
2968
|
-
else {
|
|
2969
|
-
data.push(U$2, x1, y1, x2, y2, radius);
|
|
2965
|
+
const d = getMinDistanceFrom(lastX, lastY, x1, y1, x2, y2);
|
|
2966
|
+
radius = min(radius, min(d / 2, d / 2 * abs$2(tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2))));
|
|
2970
2967
|
}
|
|
2968
|
+
data.push(U$2, x1, y1, x2, y2, radius);
|
|
2971
2969
|
},
|
|
2972
2970
|
drawEllipse(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
|
|
2973
2971
|
BezierHelper.ellipse(null, x, y, radiusX, radiusY, rotation === undefined ? 0 : rotation, startAngle === undefined ? 0 : startAngle, endAngle === undefined ? 360 : endAngle, anticlockwise, null, null, startPoint);
|
|
@@ -3078,7 +3076,7 @@ class PathCreator {
|
|
|
3078
3076
|
}
|
|
3079
3077
|
|
|
3080
3078
|
const { M: M$2, L: L$3, C: C$2, Q: Q$1, Z: Z$2, N: N$1, D: D$1, X: X$1, G: G$1, F: F$2, O: O$1, P: P$1, U: U$1 } = PathCommandMap;
|
|
3081
|
-
const debug$
|
|
3079
|
+
const debug$b = Debug.get('PathDrawer');
|
|
3082
3080
|
const PathDrawer = {
|
|
3083
3081
|
drawPathByData(drawer, data) {
|
|
3084
3082
|
if (!data)
|
|
@@ -3141,7 +3139,7 @@ const PathDrawer = {
|
|
|
3141
3139
|
i += 6;
|
|
3142
3140
|
break;
|
|
3143
3141
|
default:
|
|
3144
|
-
debug$
|
|
3142
|
+
debug$b.error(`command: ${command} [index:${i}]`, data);
|
|
3145
3143
|
return;
|
|
3146
3144
|
}
|
|
3147
3145
|
}
|
|
@@ -3151,7 +3149,7 @@ const PathDrawer = {
|
|
|
3151
3149
|
const { M: M$1, L: L$2, C: C$1, Q, Z: Z$1, N, D, X, G, F: F$1, O, P, U } = PathCommandMap;
|
|
3152
3150
|
const { toTwoPointBounds, toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$1, arc, ellipse: ellipse$1 } = BezierHelper;
|
|
3153
3151
|
const { addPointBounds, copy: copy$8, addPoint, setPoint, addBounds, toBounds: toBounds$2 } = TwoPointBoundsHelper;
|
|
3154
|
-
const debug$
|
|
3152
|
+
const debug$a = Debug.get('PathBounds');
|
|
3155
3153
|
let radius, radiusX, radiusY;
|
|
3156
3154
|
const tempPointBounds = {};
|
|
3157
3155
|
const setPointBounds = {};
|
|
@@ -3259,7 +3257,7 @@ const PathBounds = {
|
|
|
3259
3257
|
i += 6;
|
|
3260
3258
|
break;
|
|
3261
3259
|
default:
|
|
3262
|
-
debug$
|
|
3260
|
+
debug$a.error(`command: ${command} [index:${i}]`, data);
|
|
3263
3261
|
return;
|
|
3264
3262
|
}
|
|
3265
3263
|
}
|
|
@@ -3375,7 +3373,7 @@ const FileHelper = {
|
|
|
3375
3373
|
const F = FileHelper;
|
|
3376
3374
|
F.opacityTypes.forEach(type => F.upperCaseTypeMap[type] = type.toUpperCase());
|
|
3377
3375
|
|
|
3378
|
-
const debug$
|
|
3376
|
+
const debug$9 = Debug.get('TaskProcessor');
|
|
3379
3377
|
class TaskItem {
|
|
3380
3378
|
constructor(task) {
|
|
3381
3379
|
this.parallel = true;
|
|
@@ -3384,13 +3382,13 @@ class TaskItem {
|
|
|
3384
3382
|
this.task = task;
|
|
3385
3383
|
}
|
|
3386
3384
|
run() {
|
|
3387
|
-
return __awaiter(this,
|
|
3385
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3388
3386
|
try {
|
|
3389
3387
|
if (this.task && !this.isComplete && this.parent.running)
|
|
3390
3388
|
yield this.task();
|
|
3391
3389
|
}
|
|
3392
3390
|
catch (error) {
|
|
3393
|
-
debug$
|
|
3391
|
+
debug$9.error(error);
|
|
3394
3392
|
}
|
|
3395
3393
|
});
|
|
3396
3394
|
}
|
|
@@ -3623,18 +3621,58 @@ class TaskProcessor {
|
|
|
3623
3621
|
}
|
|
3624
3622
|
}
|
|
3625
3623
|
|
|
3626
|
-
const
|
|
3624
|
+
const debug$8 = Debug.get('Resource');
|
|
3625
|
+
const Resource = {
|
|
3626
|
+
tasker: new TaskProcessor(),
|
|
3627
3627
|
map: {},
|
|
3628
|
+
get isComplete() { return R.tasker.isComplete; },
|
|
3629
|
+
set(key, value) {
|
|
3630
|
+
if (R.map[key])
|
|
3631
|
+
debug$8.repeat(key);
|
|
3632
|
+
R.map[key] = value;
|
|
3633
|
+
},
|
|
3634
|
+
get(key) {
|
|
3635
|
+
return R.map[key];
|
|
3636
|
+
},
|
|
3637
|
+
remove(key) {
|
|
3638
|
+
const r = R.map[key];
|
|
3639
|
+
if (r) {
|
|
3640
|
+
if (r.destroy)
|
|
3641
|
+
r.destroy();
|
|
3642
|
+
delete R.map[key];
|
|
3643
|
+
}
|
|
3644
|
+
},
|
|
3645
|
+
loadImage(key, format) {
|
|
3646
|
+
return new Promise((resolve, reject) => {
|
|
3647
|
+
const image = this.setImage(key, key, format);
|
|
3648
|
+
image.load(() => resolve(image), (e) => reject(e));
|
|
3649
|
+
});
|
|
3650
|
+
},
|
|
3651
|
+
setImage(key, value, format) {
|
|
3652
|
+
let config;
|
|
3653
|
+
if (typeof value === 'string')
|
|
3654
|
+
config = { url: value };
|
|
3655
|
+
else if (!value.url)
|
|
3656
|
+
config = { url: key, view: value };
|
|
3657
|
+
if (config)
|
|
3658
|
+
format && (config.format = format), value = Creator.image(config);
|
|
3659
|
+
R.set(key, value);
|
|
3660
|
+
return value;
|
|
3661
|
+
},
|
|
3662
|
+
destroy() {
|
|
3663
|
+
R.map = {};
|
|
3664
|
+
}
|
|
3665
|
+
};
|
|
3666
|
+
const R = Resource;
|
|
3667
|
+
|
|
3668
|
+
const ImageManager = {
|
|
3669
|
+
maxRecycled: 100,
|
|
3628
3670
|
recycledList: [],
|
|
3629
|
-
tasker: new TaskProcessor(),
|
|
3630
3671
|
patternTasker: new TaskProcessor(),
|
|
3631
|
-
get isComplete() { return I$1.tasker.isComplete; },
|
|
3632
3672
|
get(config) {
|
|
3633
|
-
let image =
|
|
3634
|
-
if (!image)
|
|
3635
|
-
image = Creator.image(config);
|
|
3636
|
-
I$1.map[config.url] = image;
|
|
3637
|
-
}
|
|
3673
|
+
let image = Resource.get(config.url);
|
|
3674
|
+
if (!image)
|
|
3675
|
+
Resource.set(config.url, image = Creator.image(config));
|
|
3638
3676
|
image.use++;
|
|
3639
3677
|
return image;
|
|
3640
3678
|
},
|
|
@@ -3645,13 +3683,8 @@ const ImageManager = {
|
|
|
3645
3683
|
},
|
|
3646
3684
|
clearRecycled() {
|
|
3647
3685
|
const list = I$1.recycledList;
|
|
3648
|
-
if (list.length >
|
|
3649
|
-
list.forEach(image =>
|
|
3650
|
-
if (!image.use && image.url) {
|
|
3651
|
-
delete I$1.map[image.url];
|
|
3652
|
-
image.destroy();
|
|
3653
|
-
}
|
|
3654
|
-
});
|
|
3686
|
+
if (list.length > I$1.maxRecycled) {
|
|
3687
|
+
list.forEach(image => (!image.use && image.url) && Resource.remove(image.url));
|
|
3655
3688
|
list.length = 0;
|
|
3656
3689
|
}
|
|
3657
3690
|
},
|
|
@@ -3675,7 +3708,6 @@ const ImageManager = {
|
|
|
3675
3708
|
return false;
|
|
3676
3709
|
},
|
|
3677
3710
|
destroy() {
|
|
3678
|
-
I$1.map = {};
|
|
3679
3711
|
I$1.recycledList = [];
|
|
3680
3712
|
}
|
|
3681
3713
|
};
|
|
@@ -3689,21 +3721,19 @@ class LeaferImage {
|
|
|
3689
3721
|
this.use = 0;
|
|
3690
3722
|
this.waitComplete = [];
|
|
3691
3723
|
this.innerId = create$1(IMAGE);
|
|
3692
|
-
this.config = config || { url: '' };
|
|
3693
|
-
|
|
3694
|
-
|
|
3724
|
+
this.config = config || (config = { url: '' });
|
|
3725
|
+
if (config.view) {
|
|
3726
|
+
const { view } = config;
|
|
3727
|
+
this.setView(view.config ? view.view : view);
|
|
3728
|
+
}
|
|
3729
|
+
ImageManager.isFormat('svg', config) && (this.isSVG = true);
|
|
3730
|
+
ImageManager.hasOpacityPixel(config) && (this.hasOpacityPixel = true);
|
|
3695
3731
|
}
|
|
3696
3732
|
load(onSuccess, onError) {
|
|
3697
3733
|
if (!this.loading) {
|
|
3698
3734
|
this.loading = true;
|
|
3699
|
-
|
|
3700
|
-
return yield Platform.origin.loadImage(this.url).then((img) => {
|
|
3701
|
-
this.ready = true;
|
|
3702
|
-
this.width = img.naturalWidth || img.width;
|
|
3703
|
-
this.height = img.naturalHeight || img.height;
|
|
3704
|
-
this.view = img;
|
|
3705
|
-
this.onComplete(true);
|
|
3706
|
-
}).catch((e) => {
|
|
3735
|
+
Resource.tasker.add(() => __awaiter(this, void 0, void 0, function* () {
|
|
3736
|
+
return yield Platform.origin.loadImage(this.url).then(img => this.setView(img)).catch((e) => {
|
|
3707
3737
|
this.error = e;
|
|
3708
3738
|
this.onComplete(false);
|
|
3709
3739
|
});
|
|
@@ -3721,6 +3751,13 @@ class LeaferImage {
|
|
|
3721
3751
|
}
|
|
3722
3752
|
l[index] = l[index + 1] = undefined;
|
|
3723
3753
|
}
|
|
3754
|
+
setView(img) {
|
|
3755
|
+
this.ready = true;
|
|
3756
|
+
this.width = img.naturalWidth || img.width;
|
|
3757
|
+
this.height = img.naturalHeight || img.height;
|
|
3758
|
+
this.view = img;
|
|
3759
|
+
this.onComplete(true);
|
|
3760
|
+
}
|
|
3724
3761
|
onComplete(isSuccess) {
|
|
3725
3762
|
let odd;
|
|
3726
3763
|
this.waitComplete.forEach((item, index) => {
|
|
@@ -3739,6 +3776,9 @@ class LeaferImage {
|
|
|
3739
3776
|
this.waitComplete.length = 0;
|
|
3740
3777
|
this.loading = false;
|
|
3741
3778
|
}
|
|
3779
|
+
getFull(_filters) {
|
|
3780
|
+
return this.view;
|
|
3781
|
+
}
|
|
3742
3782
|
getCanvas(width, height, opacity, _filters) {
|
|
3743
3783
|
width || (width = this.width);
|
|
3744
3784
|
height || (height = this.height);
|
|
@@ -5219,7 +5259,7 @@ const LeafRender = {
|
|
|
5219
5259
|
if (this.__.eraser === 'path')
|
|
5220
5260
|
return this.__renderEraser(canvas, options);
|
|
5221
5261
|
const tempCanvas = canvas.getSameCanvas(true, true);
|
|
5222
|
-
this.__draw(tempCanvas, options);
|
|
5262
|
+
this.__draw(tempCanvas, options, canvas);
|
|
5223
5263
|
if (this.__worldFlipped) {
|
|
5224
5264
|
canvas.copyWorldByReset(tempCanvas, this.__nowWorld, null, this.__.__blendMode, true);
|
|
5225
5265
|
}
|
|
@@ -6012,7 +6052,7 @@ class LeafLevelList {
|
|
|
6012
6052
|
}
|
|
6013
6053
|
}
|
|
6014
6054
|
|
|
6015
|
-
const version = "1.4.
|
|
6055
|
+
const version = "1.4.2";
|
|
6016
6056
|
|
|
6017
6057
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6018
6058
|
get allowBackgroundColor() { return false; }
|
|
@@ -6496,7 +6536,7 @@ class Layouter {
|
|
|
6496
6536
|
}
|
|
6497
6537
|
partLayout() {
|
|
6498
6538
|
var _a;
|
|
6499
|
-
if (!((_a = this.__updatedList) === null || _a ===
|
|
6539
|
+
if (!((_a = this.__updatedList) === null || _a === void 0 ? void 0 : _a.length))
|
|
6500
6540
|
return;
|
|
6501
6541
|
const t = Run.start('PartLayout');
|
|
6502
6542
|
const { target, __updatedList: updateList } = this;
|
|
@@ -6961,9 +7001,10 @@ class Selector {
|
|
|
6961
7001
|
this.finder = Creator.finder && Creator.finder();
|
|
6962
7002
|
}
|
|
6963
7003
|
getByPoint(hitPoint, hitRadius, options) {
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
7004
|
+
const { target, picker } = this;
|
|
7005
|
+
if (Platform.backgrounder)
|
|
7006
|
+
target && target.updateLayout();
|
|
7007
|
+
return picker.getByPoint(hitPoint, hitRadius, options);
|
|
6967
7008
|
}
|
|
6968
7009
|
getBy(condition, branch, one, options) {
|
|
6969
7010
|
return this.finder ? this.finder.getBy(condition, branch, one, options) : Plugin.need('find');
|
|
@@ -7021,9 +7062,7 @@ const TextConvert = {};
|
|
|
7021
7062
|
const ColorConvert = {};
|
|
7022
7063
|
const UnitConvert = {
|
|
7023
7064
|
number(value, percentRefer) {
|
|
7024
|
-
|
|
7025
|
-
return value.type === 'percent' ? value.value * percentRefer : value.value;
|
|
7026
|
-
return value;
|
|
7065
|
+
return typeof value === 'object' ? (value.type === 'percent' ? value.value * percentRefer : value.value) : value;
|
|
7027
7066
|
}
|
|
7028
7067
|
};
|
|
7029
7068
|
const PathArrow = {};
|
|
@@ -7031,16 +7070,15 @@ const Paint = {};
|
|
|
7031
7070
|
const PaintImage = {};
|
|
7032
7071
|
const PaintGradient = {};
|
|
7033
7072
|
const Effect = {};
|
|
7073
|
+
const Filter = {
|
|
7074
|
+
apply() { Plugin.need('filter'); }
|
|
7075
|
+
};
|
|
7034
7076
|
const Export = {};
|
|
7035
7077
|
const State = {
|
|
7036
|
-
setStyleName(
|
|
7037
|
-
set(
|
|
7038
|
-
};
|
|
7039
|
-
const Transition = {
|
|
7040
|
-
list: {},
|
|
7041
|
-
register(attrName, fn) { Transition.list[attrName] = fn; },
|
|
7042
|
-
get(attrName) { return Transition.list[attrName]; }
|
|
7078
|
+
setStyleName() { return Plugin.need('state'); },
|
|
7079
|
+
set() { return Plugin.need('state'); }
|
|
7043
7080
|
};
|
|
7081
|
+
const Transition = {};
|
|
7044
7082
|
|
|
7045
7083
|
const { parse, objectToCanvasData } = PathConvert;
|
|
7046
7084
|
const emptyPaint = {};
|
|
@@ -7147,24 +7185,13 @@ class UIData extends LeafData {
|
|
|
7147
7185
|
}
|
|
7148
7186
|
}
|
|
7149
7187
|
setShadow(value) {
|
|
7150
|
-
this
|
|
7151
|
-
if (value instanceof Array) {
|
|
7152
|
-
if (value.some((item) => item.visible === false))
|
|
7153
|
-
value = value.filter((item) => item.visible !== false);
|
|
7154
|
-
this._shadow = value.length ? value : null;
|
|
7155
|
-
}
|
|
7156
|
-
else
|
|
7157
|
-
this._shadow = value && value.visible !== false ? [value] : null;
|
|
7188
|
+
setArray(this, 'shadow', value);
|
|
7158
7189
|
}
|
|
7159
7190
|
setInnerShadow(value) {
|
|
7160
|
-
this
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
this._innerShadow = value.length ? value : null;
|
|
7165
|
-
}
|
|
7166
|
-
else
|
|
7167
|
-
this._innerShadow = value && value.visible !== false ? [value] : null;
|
|
7191
|
+
setArray(this, 'innerShadow', value);
|
|
7192
|
+
}
|
|
7193
|
+
setFilter(value) {
|
|
7194
|
+
setArray(this, 'filter', value);
|
|
7168
7195
|
}
|
|
7169
7196
|
__computePaint() {
|
|
7170
7197
|
const { fill, stroke } = this.__input;
|
|
@@ -7175,6 +7202,17 @@ class UIData extends LeafData {
|
|
|
7175
7202
|
this.__needComputePaint = false;
|
|
7176
7203
|
}
|
|
7177
7204
|
}
|
|
7205
|
+
function setArray(data, key, value) {
|
|
7206
|
+
data.__setInput(key, value);
|
|
7207
|
+
if (value instanceof Array) {
|
|
7208
|
+
if (value.some((item) => item.visible === false))
|
|
7209
|
+
value = value.filter((item) => item.visible !== false);
|
|
7210
|
+
value.length || (value = null);
|
|
7211
|
+
}
|
|
7212
|
+
else
|
|
7213
|
+
value = value && value.visible !== false ? [value] : null;
|
|
7214
|
+
data['_' + key] = value;
|
|
7215
|
+
}
|
|
7178
7216
|
|
|
7179
7217
|
class GroupData extends UIData {
|
|
7180
7218
|
}
|
|
@@ -7297,11 +7335,13 @@ const UIBounds = {
|
|
|
7297
7335
|
},
|
|
7298
7336
|
__updateRenderSpread() {
|
|
7299
7337
|
let width = 0;
|
|
7300
|
-
const { shadow, innerShadow, blur, backgroundBlur } = this.__;
|
|
7338
|
+
const { shadow, innerShadow, blur, backgroundBlur, filter } = this.__;
|
|
7301
7339
|
if (shadow)
|
|
7302
7340
|
shadow.forEach(item => width = Math.max(width, Math.max(Math.abs(item.y), Math.abs(item.x)) + (item.spread > 0 ? item.spread : 0) + item.blur * 1.5));
|
|
7303
7341
|
if (blur)
|
|
7304
7342
|
width = Math.max(width, blur);
|
|
7343
|
+
if (filter)
|
|
7344
|
+
width += Filter.getSpread(filter);
|
|
7305
7345
|
let shapeWidth = width = Math.ceil(width);
|
|
7306
7346
|
if (innerShadow)
|
|
7307
7347
|
innerShadow.forEach(item => shapeWidth = Math.max(shapeWidth, Math.max(Math.abs(item.y), Math.abs(item.x)) + (item.spread < 0 ? -item.spread : 0) + item.blur * 1.5));
|
|
@@ -7316,8 +7356,8 @@ const UIRender = {
|
|
|
7316
7356
|
__updateChange() {
|
|
7317
7357
|
const data = this.__;
|
|
7318
7358
|
if (data.__useEffect) {
|
|
7319
|
-
const { shadow, innerShadow, blur, backgroundBlur } = this.__;
|
|
7320
|
-
data.__useEffect = !!(shadow || innerShadow || blur || backgroundBlur);
|
|
7359
|
+
const { shadow, innerShadow, blur, backgroundBlur, filter } = this.__;
|
|
7360
|
+
data.__useEffect = !!(shadow || innerShadow || blur || backgroundBlur || filter);
|
|
7321
7361
|
}
|
|
7322
7362
|
data.__checkSingle();
|
|
7323
7363
|
const complex = data.__isFills || data.__isStrokes || data.cornerRadius || data.__useEffect;
|
|
@@ -7331,7 +7371,7 @@ const UIRender = {
|
|
|
7331
7371
|
__drawFast(canvas, options) {
|
|
7332
7372
|
drawFast(this, canvas, options);
|
|
7333
7373
|
},
|
|
7334
|
-
__draw(canvas, options) {
|
|
7374
|
+
__draw(canvas, options, originCanvas) {
|
|
7335
7375
|
const data = this.__;
|
|
7336
7376
|
if (data.__complex) {
|
|
7337
7377
|
if (data.__needComputePaint)
|
|
@@ -7341,7 +7381,7 @@ const UIRender = {
|
|
|
7341
7381
|
if (data.__useEffect) {
|
|
7342
7382
|
const shape = Paint.shape(this, canvas, options);
|
|
7343
7383
|
this.__nowWorld = this.__getNowWorld(options);
|
|
7344
|
-
const { shadow, innerShadow } = data;
|
|
7384
|
+
const { shadow, innerShadow, filter } = data;
|
|
7345
7385
|
if (shadow)
|
|
7346
7386
|
Effect.shadow(this, canvas, shape);
|
|
7347
7387
|
if (fill)
|
|
@@ -7352,6 +7392,8 @@ const UIRender = {
|
|
|
7352
7392
|
Effect.innerShadow(this, canvas, shape);
|
|
7353
7393
|
if (stroke)
|
|
7354
7394
|
data.__isStrokes ? Paint.strokes(stroke, this, canvas) : Paint.stroke(stroke, this, canvas);
|
|
7395
|
+
if (filter)
|
|
7396
|
+
Filter.apply(filter, this, this.__nowWorld, canvas, originCanvas, shape);
|
|
7355
7397
|
if (shape.worldCanvas)
|
|
7356
7398
|
shape.worldCanvas.recycle();
|
|
7357
7399
|
shape.canvas.recycle();
|
|
@@ -7571,199 +7613,202 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7571
7613
|
};
|
|
7572
7614
|
__decorate([
|
|
7573
7615
|
dataProcessor(UIData)
|
|
7574
|
-
], UI.prototype, "__",
|
|
7616
|
+
], UI.prototype, "__", void 0);
|
|
7575
7617
|
__decorate([
|
|
7576
7618
|
zoomLayerType()
|
|
7577
|
-
], UI.prototype, "zoomLayer",
|
|
7619
|
+
], UI.prototype, "zoomLayer", void 0);
|
|
7578
7620
|
__decorate([
|
|
7579
7621
|
dataType('')
|
|
7580
|
-
], UI.prototype, "id",
|
|
7622
|
+
], UI.prototype, "id", void 0);
|
|
7581
7623
|
__decorate([
|
|
7582
7624
|
dataType('')
|
|
7583
|
-
], UI.prototype, "name",
|
|
7625
|
+
], UI.prototype, "name", void 0);
|
|
7584
7626
|
__decorate([
|
|
7585
7627
|
dataType('')
|
|
7586
|
-
], UI.prototype, "className",
|
|
7628
|
+
], UI.prototype, "className", void 0);
|
|
7587
7629
|
__decorate([
|
|
7588
7630
|
surfaceType('pass-through')
|
|
7589
|
-
], UI.prototype, "blendMode",
|
|
7631
|
+
], UI.prototype, "blendMode", void 0);
|
|
7590
7632
|
__decorate([
|
|
7591
7633
|
opacityType(1)
|
|
7592
|
-
], UI.prototype, "opacity",
|
|
7634
|
+
], UI.prototype, "opacity", void 0);
|
|
7593
7635
|
__decorate([
|
|
7594
7636
|
visibleType(true)
|
|
7595
|
-
], UI.prototype, "visible",
|
|
7637
|
+
], UI.prototype, "visible", void 0);
|
|
7596
7638
|
__decorate([
|
|
7597
7639
|
surfaceType(false)
|
|
7598
|
-
], UI.prototype, "locked",
|
|
7640
|
+
], UI.prototype, "locked", void 0);
|
|
7599
7641
|
__decorate([
|
|
7600
7642
|
sortType(0)
|
|
7601
|
-
], UI.prototype, "zIndex",
|
|
7643
|
+
], UI.prototype, "zIndex", void 0);
|
|
7602
7644
|
__decorate([
|
|
7603
7645
|
maskType(false)
|
|
7604
|
-
], UI.prototype, "mask",
|
|
7646
|
+
], UI.prototype, "mask", void 0);
|
|
7605
7647
|
__decorate([
|
|
7606
7648
|
eraserType(false)
|
|
7607
|
-
], UI.prototype, "eraser",
|
|
7649
|
+
], UI.prototype, "eraser", void 0);
|
|
7608
7650
|
__decorate([
|
|
7609
7651
|
positionType(0, true)
|
|
7610
|
-
], UI.prototype, "x",
|
|
7652
|
+
], UI.prototype, "x", void 0);
|
|
7611
7653
|
__decorate([
|
|
7612
7654
|
positionType(0, true)
|
|
7613
|
-
], UI.prototype, "y",
|
|
7655
|
+
], UI.prototype, "y", void 0);
|
|
7614
7656
|
__decorate([
|
|
7615
7657
|
boundsType(100, true)
|
|
7616
|
-
], UI.prototype, "width",
|
|
7658
|
+
], UI.prototype, "width", void 0);
|
|
7617
7659
|
__decorate([
|
|
7618
7660
|
boundsType(100, true)
|
|
7619
|
-
], UI.prototype, "height",
|
|
7661
|
+
], UI.prototype, "height", void 0);
|
|
7620
7662
|
__decorate([
|
|
7621
7663
|
scaleType(1, true)
|
|
7622
|
-
], UI.prototype, "scaleX",
|
|
7664
|
+
], UI.prototype, "scaleX", void 0);
|
|
7623
7665
|
__decorate([
|
|
7624
7666
|
scaleType(1, true)
|
|
7625
|
-
], UI.prototype, "scaleY",
|
|
7667
|
+
], UI.prototype, "scaleY", void 0);
|
|
7626
7668
|
__decorate([
|
|
7627
7669
|
rotationType(0, true)
|
|
7628
|
-
], UI.prototype, "rotation",
|
|
7670
|
+
], UI.prototype, "rotation", void 0);
|
|
7629
7671
|
__decorate([
|
|
7630
7672
|
rotationType(0, true)
|
|
7631
|
-
], UI.prototype, "skewX",
|
|
7673
|
+
], UI.prototype, "skewX", void 0);
|
|
7632
7674
|
__decorate([
|
|
7633
7675
|
rotationType(0, true)
|
|
7634
|
-
], UI.prototype, "skewY",
|
|
7676
|
+
], UI.prototype, "skewY", void 0);
|
|
7635
7677
|
__decorate([
|
|
7636
7678
|
positionType(0, true)
|
|
7637
|
-
], UI.prototype, "offsetX",
|
|
7679
|
+
], UI.prototype, "offsetX", void 0);
|
|
7638
7680
|
__decorate([
|
|
7639
7681
|
positionType(0, true)
|
|
7640
|
-
], UI.prototype, "offsetY",
|
|
7682
|
+
], UI.prototype, "offsetY", void 0);
|
|
7641
7683
|
__decorate([
|
|
7642
7684
|
positionType(0, true)
|
|
7643
|
-
], UI.prototype, "scrollX",
|
|
7685
|
+
], UI.prototype, "scrollX", void 0);
|
|
7644
7686
|
__decorate([
|
|
7645
7687
|
positionType(0, true)
|
|
7646
|
-
], UI.prototype, "scrollY",
|
|
7688
|
+
], UI.prototype, "scrollY", void 0);
|
|
7647
7689
|
__decorate([
|
|
7648
7690
|
autoLayoutType()
|
|
7649
|
-
], UI.prototype, "origin",
|
|
7691
|
+
], UI.prototype, "origin", void 0);
|
|
7650
7692
|
__decorate([
|
|
7651
7693
|
autoLayoutType()
|
|
7652
|
-
], UI.prototype, "around",
|
|
7694
|
+
], UI.prototype, "around", void 0);
|
|
7653
7695
|
__decorate([
|
|
7654
7696
|
dataType(false)
|
|
7655
|
-
], UI.prototype, "lazy",
|
|
7697
|
+
], UI.prototype, "lazy", void 0);
|
|
7656
7698
|
__decorate([
|
|
7657
7699
|
naturalBoundsType(1)
|
|
7658
|
-
], UI.prototype, "pixelRatio",
|
|
7700
|
+
], UI.prototype, "pixelRatio", void 0);
|
|
7659
7701
|
__decorate([
|
|
7660
7702
|
pathInputType()
|
|
7661
|
-
], UI.prototype, "path",
|
|
7703
|
+
], UI.prototype, "path", void 0);
|
|
7662
7704
|
__decorate([
|
|
7663
7705
|
pathType()
|
|
7664
|
-
], UI.prototype, "windingRule",
|
|
7706
|
+
], UI.prototype, "windingRule", void 0);
|
|
7665
7707
|
__decorate([
|
|
7666
7708
|
pathType(true)
|
|
7667
|
-
], UI.prototype, "closed",
|
|
7709
|
+
], UI.prototype, "closed", void 0);
|
|
7668
7710
|
__decorate([
|
|
7669
7711
|
boundsType(0)
|
|
7670
|
-
], UI.prototype, "padding",
|
|
7712
|
+
], UI.prototype, "padding", void 0);
|
|
7671
7713
|
__decorate([
|
|
7672
7714
|
boundsType(false)
|
|
7673
|
-
], UI.prototype, "lockRatio",
|
|
7715
|
+
], UI.prototype, "lockRatio", void 0);
|
|
7674
7716
|
__decorate([
|
|
7675
7717
|
boundsType()
|
|
7676
|
-
], UI.prototype, "widthRange",
|
|
7718
|
+
], UI.prototype, "widthRange", void 0);
|
|
7677
7719
|
__decorate([
|
|
7678
7720
|
boundsType()
|
|
7679
|
-
], UI.prototype, "heightRange",
|
|
7721
|
+
], UI.prototype, "heightRange", void 0);
|
|
7680
7722
|
__decorate([
|
|
7681
7723
|
dataType(false)
|
|
7682
|
-
], UI.prototype, "draggable",
|
|
7724
|
+
], UI.prototype, "draggable", void 0);
|
|
7683
7725
|
__decorate([
|
|
7684
7726
|
dataType()
|
|
7685
|
-
], UI.prototype, "dragBounds",
|
|
7727
|
+
], UI.prototype, "dragBounds", void 0);
|
|
7686
7728
|
__decorate([
|
|
7687
7729
|
dataType(false)
|
|
7688
|
-
], UI.prototype, "editable",
|
|
7730
|
+
], UI.prototype, "editable", void 0);
|
|
7689
7731
|
__decorate([
|
|
7690
7732
|
hitType(true)
|
|
7691
|
-
], UI.prototype, "hittable",
|
|
7733
|
+
], UI.prototype, "hittable", void 0);
|
|
7692
7734
|
__decorate([
|
|
7693
7735
|
hitType('path')
|
|
7694
|
-
], UI.prototype, "hitFill",
|
|
7736
|
+
], UI.prototype, "hitFill", void 0);
|
|
7695
7737
|
__decorate([
|
|
7696
7738
|
strokeType('path')
|
|
7697
|
-
], UI.prototype, "hitStroke",
|
|
7739
|
+
], UI.prototype, "hitStroke", void 0);
|
|
7698
7740
|
__decorate([
|
|
7699
7741
|
hitType(false)
|
|
7700
|
-
], UI.prototype, "hitBox",
|
|
7742
|
+
], UI.prototype, "hitBox", void 0);
|
|
7701
7743
|
__decorate([
|
|
7702
7744
|
hitType(true)
|
|
7703
|
-
], UI.prototype, "hitChildren",
|
|
7745
|
+
], UI.prototype, "hitChildren", void 0);
|
|
7704
7746
|
__decorate([
|
|
7705
7747
|
hitType(true)
|
|
7706
|
-
], UI.prototype, "hitSelf",
|
|
7748
|
+
], UI.prototype, "hitSelf", void 0);
|
|
7707
7749
|
__decorate([
|
|
7708
7750
|
hitType()
|
|
7709
|
-
], UI.prototype, "hitRadius",
|
|
7751
|
+
], UI.prototype, "hitRadius", void 0);
|
|
7710
7752
|
__decorate([
|
|
7711
7753
|
cursorType('')
|
|
7712
|
-
], UI.prototype, "cursor",
|
|
7754
|
+
], UI.prototype, "cursor", void 0);
|
|
7713
7755
|
__decorate([
|
|
7714
7756
|
surfaceType()
|
|
7715
|
-
], UI.prototype, "fill",
|
|
7757
|
+
], UI.prototype, "fill", void 0);
|
|
7716
7758
|
__decorate([
|
|
7717
7759
|
strokeType()
|
|
7718
|
-
], UI.prototype, "stroke",
|
|
7760
|
+
], UI.prototype, "stroke", void 0);
|
|
7719
7761
|
__decorate([
|
|
7720
7762
|
strokeType('inside')
|
|
7721
|
-
], UI.prototype, "strokeAlign",
|
|
7763
|
+
], UI.prototype, "strokeAlign", void 0);
|
|
7722
7764
|
__decorate([
|
|
7723
7765
|
strokeType(1)
|
|
7724
|
-
], UI.prototype, "strokeWidth",
|
|
7766
|
+
], UI.prototype, "strokeWidth", void 0);
|
|
7725
7767
|
__decorate([
|
|
7726
7768
|
strokeType(false)
|
|
7727
|
-
], UI.prototype, "strokeWidthFixed",
|
|
7769
|
+
], UI.prototype, "strokeWidthFixed", void 0);
|
|
7728
7770
|
__decorate([
|
|
7729
7771
|
strokeType('none')
|
|
7730
|
-
], UI.prototype, "strokeCap",
|
|
7772
|
+
], UI.prototype, "strokeCap", void 0);
|
|
7731
7773
|
__decorate([
|
|
7732
7774
|
strokeType('miter')
|
|
7733
|
-
], UI.prototype, "strokeJoin",
|
|
7775
|
+
], UI.prototype, "strokeJoin", void 0);
|
|
7734
7776
|
__decorate([
|
|
7735
7777
|
strokeType()
|
|
7736
|
-
], UI.prototype, "dashPattern",
|
|
7778
|
+
], UI.prototype, "dashPattern", void 0);
|
|
7737
7779
|
__decorate([
|
|
7738
7780
|
strokeType()
|
|
7739
|
-
], UI.prototype, "dashOffset",
|
|
7781
|
+
], UI.prototype, "dashOffset", void 0);
|
|
7740
7782
|
__decorate([
|
|
7741
7783
|
strokeType(10)
|
|
7742
|
-
], UI.prototype, "miterLimit",
|
|
7784
|
+
], UI.prototype, "miterLimit", void 0);
|
|
7743
7785
|
__decorate([
|
|
7744
7786
|
pathType(0)
|
|
7745
|
-
], UI.prototype, "cornerRadius",
|
|
7787
|
+
], UI.prototype, "cornerRadius", void 0);
|
|
7746
7788
|
__decorate([
|
|
7747
7789
|
pathType()
|
|
7748
|
-
], UI.prototype, "cornerSmoothing",
|
|
7790
|
+
], UI.prototype, "cornerSmoothing", void 0);
|
|
7791
|
+
__decorate([
|
|
7792
|
+
effectType()
|
|
7793
|
+
], UI.prototype, "shadow", void 0);
|
|
7749
7794
|
__decorate([
|
|
7750
7795
|
effectType()
|
|
7751
|
-
], UI.prototype, "
|
|
7796
|
+
], UI.prototype, "innerShadow", void 0);
|
|
7752
7797
|
__decorate([
|
|
7753
7798
|
effectType()
|
|
7754
|
-
], UI.prototype, "
|
|
7799
|
+
], UI.prototype, "blur", void 0);
|
|
7755
7800
|
__decorate([
|
|
7756
7801
|
effectType()
|
|
7757
|
-
], UI.prototype, "
|
|
7802
|
+
], UI.prototype, "backgroundBlur", void 0);
|
|
7758
7803
|
__decorate([
|
|
7759
7804
|
effectType()
|
|
7760
|
-
], UI.prototype, "
|
|
7805
|
+
], UI.prototype, "grayscale", void 0);
|
|
7761
7806
|
__decorate([
|
|
7762
7807
|
effectType()
|
|
7763
|
-
], UI.prototype, "
|
|
7808
|
+
], UI.prototype, "filter", void 0);
|
|
7764
7809
|
__decorate([
|
|
7765
7810
|
dataType({})
|
|
7766
|
-
], UI.prototype, "data",
|
|
7811
|
+
], UI.prototype, "data", void 0);
|
|
7767
7812
|
__decorate([
|
|
7768
7813
|
rewrite(Leaf.prototype.reset)
|
|
7769
7814
|
], UI.prototype, "reset", null);
|
|
@@ -7824,7 +7869,7 @@ let Group = class Group extends UI {
|
|
|
7824
7869
|
};
|
|
7825
7870
|
__decorate([
|
|
7826
7871
|
dataProcessor(GroupData)
|
|
7827
|
-
], Group.prototype, "__",
|
|
7872
|
+
], Group.prototype, "__", void 0);
|
|
7828
7873
|
Group = __decorate([
|
|
7829
7874
|
useModule(Branch),
|
|
7830
7875
|
registerUI()
|
|
@@ -7837,7 +7882,7 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
7837
7882
|
get isApp() { return false; }
|
|
7838
7883
|
get app() { return this.parent || this; }
|
|
7839
7884
|
get isLeafer() { return true; }
|
|
7840
|
-
get imageReady() { return this.viewReady &&
|
|
7885
|
+
get imageReady() { return this.viewReady && Resource.isComplete; }
|
|
7841
7886
|
get layoutLocked() { return !this.layouter.running; }
|
|
7842
7887
|
get FPS() { return this.renderer ? this.renderer.FPS : 60; }
|
|
7843
7888
|
get cursorPoint() { return (this.interaction && this.interaction.hoverData) || { x: this.width / 2, y: this.height / 2 }; }
|
|
@@ -8048,13 +8093,13 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8048
8093
|
WaitHelper.run(this.__viewReadyWait);
|
|
8049
8094
|
}
|
|
8050
8095
|
__onLayoutEnd() {
|
|
8051
|
-
const { grow,
|
|
8096
|
+
const { grow, width: fixedWidth, height: fixedHeight } = this.config;
|
|
8052
8097
|
if (grow) {
|
|
8053
8098
|
let { width, height, pixelRatio } = this;
|
|
8054
8099
|
const bounds = grow === 'box' ? this.worldBoxBounds : this.__world;
|
|
8055
|
-
if (
|
|
8100
|
+
if (!fixedWidth)
|
|
8056
8101
|
width = Math.max(1, bounds.x + bounds.width);
|
|
8057
|
-
if (
|
|
8102
|
+
if (!fixedHeight)
|
|
8058
8103
|
height = Math.max(1, bounds.y + bounds.height);
|
|
8059
8104
|
this.__doResize({ width, height, pixelRatio });
|
|
8060
8105
|
}
|
|
@@ -8132,7 +8177,7 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8132
8177
|
list.push(item);
|
|
8133
8178
|
this.requestRender();
|
|
8134
8179
|
}
|
|
8135
|
-
zoom(_zoomType, _padding, _fixedScale) {
|
|
8180
|
+
zoom(_zoomType, _padding, _fixedScale, _transition) {
|
|
8136
8181
|
return Plugin.need('view');
|
|
8137
8182
|
}
|
|
8138
8183
|
getValidMove(moveX, moveY) { return { x: moveX, y: moveY }; }
|
|
@@ -8197,10 +8242,10 @@ let Leafer = Leafer_1 = class Leafer extends Group {
|
|
|
8197
8242
|
Leafer.list = new LeafList();
|
|
8198
8243
|
__decorate([
|
|
8199
8244
|
dataProcessor(LeaferData)
|
|
8200
|
-
], Leafer.prototype, "__",
|
|
8245
|
+
], Leafer.prototype, "__", void 0);
|
|
8201
8246
|
__decorate([
|
|
8202
8247
|
boundsType()
|
|
8203
|
-
], Leafer.prototype, "pixelRatio",
|
|
8248
|
+
], Leafer.prototype, "pixelRatio", void 0);
|
|
8204
8249
|
Leafer = Leafer_1 = __decorate([
|
|
8205
8250
|
registerUI()
|
|
8206
8251
|
], Leafer);
|
|
@@ -8213,7 +8258,7 @@ let Rect = class Rect extends UI {
|
|
|
8213
8258
|
};
|
|
8214
8259
|
__decorate([
|
|
8215
8260
|
dataProcessor(RectData)
|
|
8216
|
-
], Rect.prototype, "__",
|
|
8261
|
+
], Rect.prototype, "__", void 0);
|
|
8217
8262
|
Rect = __decorate([
|
|
8218
8263
|
useModule(RectRender),
|
|
8219
8264
|
rewriteAble(),
|
|
@@ -8304,13 +8349,13 @@ let Box = class Box extends Group {
|
|
|
8304
8349
|
};
|
|
8305
8350
|
__decorate([
|
|
8306
8351
|
dataProcessor(BoxData)
|
|
8307
|
-
], Box.prototype, "__",
|
|
8352
|
+
], Box.prototype, "__", void 0);
|
|
8308
8353
|
__decorate([
|
|
8309
8354
|
dataType(false)
|
|
8310
|
-
], Box.prototype, "resizeChildren",
|
|
8355
|
+
], Box.prototype, "resizeChildren", void 0);
|
|
8311
8356
|
__decorate([
|
|
8312
8357
|
affectRenderBoundsType('show')
|
|
8313
|
-
], Box.prototype, "overflow",
|
|
8358
|
+
], Box.prototype, "overflow", void 0);
|
|
8314
8359
|
__decorate([
|
|
8315
8360
|
rewrite(rect$1.__updateStrokeSpread)
|
|
8316
8361
|
], Box.prototype, "__updateStrokeSpread", null);
|
|
@@ -8349,13 +8394,13 @@ let Frame = class Frame extends Box {
|
|
|
8349
8394
|
};
|
|
8350
8395
|
__decorate([
|
|
8351
8396
|
dataProcessor(FrameData)
|
|
8352
|
-
], Frame.prototype, "__",
|
|
8397
|
+
], Frame.prototype, "__", void 0);
|
|
8353
8398
|
__decorate([
|
|
8354
8399
|
surfaceType('#FFFFFF')
|
|
8355
|
-
], Frame.prototype, "fill",
|
|
8400
|
+
], Frame.prototype, "fill", void 0);
|
|
8356
8401
|
__decorate([
|
|
8357
8402
|
affectRenderBoundsType('hide')
|
|
8358
|
-
], Frame.prototype, "overflow",
|
|
8403
|
+
], Frame.prototype, "overflow", void 0);
|
|
8359
8404
|
Frame = __decorate([
|
|
8360
8405
|
registerUI()
|
|
8361
8406
|
], Frame);
|
|
@@ -8402,16 +8447,16 @@ let Ellipse = class Ellipse extends UI {
|
|
|
8402
8447
|
};
|
|
8403
8448
|
__decorate([
|
|
8404
8449
|
dataProcessor(EllipseData)
|
|
8405
|
-
], Ellipse.prototype, "__",
|
|
8450
|
+
], Ellipse.prototype, "__", void 0);
|
|
8406
8451
|
__decorate([
|
|
8407
8452
|
pathType(0)
|
|
8408
|
-
], Ellipse.prototype, "innerRadius",
|
|
8453
|
+
], Ellipse.prototype, "innerRadius", void 0);
|
|
8409
8454
|
__decorate([
|
|
8410
8455
|
pathType(0)
|
|
8411
|
-
], Ellipse.prototype, "startAngle",
|
|
8456
|
+
], Ellipse.prototype, "startAngle", void 0);
|
|
8412
8457
|
__decorate([
|
|
8413
8458
|
pathType(0)
|
|
8414
|
-
], Ellipse.prototype, "endAngle",
|
|
8459
|
+
], Ellipse.prototype, "endAngle", void 0);
|
|
8415
8460
|
Ellipse = __decorate([
|
|
8416
8461
|
registerUI()
|
|
8417
8462
|
], Ellipse);
|
|
@@ -8470,22 +8515,22 @@ let Line = class Line extends UI {
|
|
|
8470
8515
|
};
|
|
8471
8516
|
__decorate([
|
|
8472
8517
|
dataProcessor(LineData)
|
|
8473
|
-
], Line.prototype, "__",
|
|
8518
|
+
], Line.prototype, "__", void 0);
|
|
8474
8519
|
__decorate([
|
|
8475
8520
|
affectStrokeBoundsType('center')
|
|
8476
|
-
], Line.prototype, "strokeAlign",
|
|
8521
|
+
], Line.prototype, "strokeAlign", void 0);
|
|
8477
8522
|
__decorate([
|
|
8478
8523
|
boundsType(0)
|
|
8479
|
-
], Line.prototype, "height",
|
|
8524
|
+
], Line.prototype, "height", void 0);
|
|
8480
8525
|
__decorate([
|
|
8481
8526
|
pathType()
|
|
8482
|
-
], Line.prototype, "points",
|
|
8527
|
+
], Line.prototype, "points", void 0);
|
|
8483
8528
|
__decorate([
|
|
8484
8529
|
pathType(0)
|
|
8485
|
-
], Line.prototype, "curve",
|
|
8530
|
+
], Line.prototype, "curve", void 0);
|
|
8486
8531
|
__decorate([
|
|
8487
8532
|
pathType(false)
|
|
8488
|
-
], Line.prototype, "closed",
|
|
8533
|
+
], Line.prototype, "closed", void 0);
|
|
8489
8534
|
Line = __decorate([
|
|
8490
8535
|
registerUI()
|
|
8491
8536
|
], Line);
|
|
@@ -8518,16 +8563,16 @@ let Polygon = class Polygon extends UI {
|
|
|
8518
8563
|
};
|
|
8519
8564
|
__decorate([
|
|
8520
8565
|
dataProcessor(PolygonData)
|
|
8521
|
-
], Polygon.prototype, "__",
|
|
8566
|
+
], Polygon.prototype, "__", void 0);
|
|
8522
8567
|
__decorate([
|
|
8523
8568
|
pathType(3)
|
|
8524
|
-
], Polygon.prototype, "sides",
|
|
8569
|
+
], Polygon.prototype, "sides", void 0);
|
|
8525
8570
|
__decorate([
|
|
8526
8571
|
pathType()
|
|
8527
|
-
], Polygon.prototype, "points",
|
|
8572
|
+
], Polygon.prototype, "points", void 0);
|
|
8528
8573
|
__decorate([
|
|
8529
8574
|
pathType(0)
|
|
8530
|
-
], Polygon.prototype, "curve",
|
|
8575
|
+
], Polygon.prototype, "curve", void 0);
|
|
8531
8576
|
__decorate([
|
|
8532
8577
|
rewrite(line.__updateRenderPath)
|
|
8533
8578
|
], Polygon.prototype, "__updateRenderPath", null);
|
|
@@ -8559,13 +8604,13 @@ let Star = class Star extends UI {
|
|
|
8559
8604
|
};
|
|
8560
8605
|
__decorate([
|
|
8561
8606
|
dataProcessor(StarData)
|
|
8562
|
-
], Star.prototype, "__",
|
|
8607
|
+
], Star.prototype, "__", void 0);
|
|
8563
8608
|
__decorate([
|
|
8564
8609
|
pathType(5)
|
|
8565
|
-
], Star.prototype, "corners",
|
|
8610
|
+
], Star.prototype, "corners", void 0);
|
|
8566
8611
|
__decorate([
|
|
8567
8612
|
pathType(0.382)
|
|
8568
|
-
], Star.prototype, "innerRadius",
|
|
8613
|
+
], Star.prototype, "innerRadius", void 0);
|
|
8569
8614
|
Star = __decorate([
|
|
8570
8615
|
registerUI()
|
|
8571
8616
|
], Star);
|
|
@@ -8587,10 +8632,10 @@ let Image = class Image extends Rect {
|
|
|
8587
8632
|
};
|
|
8588
8633
|
__decorate([
|
|
8589
8634
|
dataProcessor(ImageData)
|
|
8590
|
-
], Image.prototype, "__",
|
|
8635
|
+
], Image.prototype, "__", void 0);
|
|
8591
8636
|
__decorate([
|
|
8592
8637
|
boundsType('')
|
|
8593
|
-
], Image.prototype, "url",
|
|
8638
|
+
], Image.prototype, "url", void 0);
|
|
8594
8639
|
Image = __decorate([
|
|
8595
8640
|
registerUI()
|
|
8596
8641
|
], Image);
|
|
@@ -8653,25 +8698,25 @@ let Canvas = class Canvas extends Rect {
|
|
|
8653
8698
|
};
|
|
8654
8699
|
__decorate([
|
|
8655
8700
|
dataProcessor(CanvasData)
|
|
8656
|
-
], Canvas.prototype, "__",
|
|
8701
|
+
], Canvas.prototype, "__", void 0);
|
|
8657
8702
|
__decorate([
|
|
8658
8703
|
resizeType(100)
|
|
8659
|
-
], Canvas.prototype, "width",
|
|
8704
|
+
], Canvas.prototype, "width", void 0);
|
|
8660
8705
|
__decorate([
|
|
8661
8706
|
resizeType(100)
|
|
8662
|
-
], Canvas.prototype, "height",
|
|
8707
|
+
], Canvas.prototype, "height", void 0);
|
|
8663
8708
|
__decorate([
|
|
8664
8709
|
resizeType(1)
|
|
8665
|
-
], Canvas.prototype, "pixelRatio",
|
|
8710
|
+
], Canvas.prototype, "pixelRatio", void 0);
|
|
8666
8711
|
__decorate([
|
|
8667
8712
|
resizeType(true)
|
|
8668
|
-
], Canvas.prototype, "smooth",
|
|
8713
|
+
], Canvas.prototype, "smooth", void 0);
|
|
8669
8714
|
__decorate([
|
|
8670
8715
|
dataType(false)
|
|
8671
|
-
], Canvas.prototype, "safeResize",
|
|
8716
|
+
], Canvas.prototype, "safeResize", void 0);
|
|
8672
8717
|
__decorate([
|
|
8673
8718
|
resizeType()
|
|
8674
|
-
], Canvas.prototype, "contextSettings",
|
|
8719
|
+
], Canvas.prototype, "contextSettings", void 0);
|
|
8675
8720
|
Canvas = __decorate([
|
|
8676
8721
|
registerUI()
|
|
8677
8722
|
], Canvas);
|
|
@@ -8762,76 +8807,76 @@ let Text = class Text extends UI {
|
|
|
8762
8807
|
};
|
|
8763
8808
|
__decorate([
|
|
8764
8809
|
dataProcessor(TextData)
|
|
8765
|
-
], Text.prototype, "__",
|
|
8810
|
+
], Text.prototype, "__", void 0);
|
|
8766
8811
|
__decorate([
|
|
8767
8812
|
boundsType(0)
|
|
8768
|
-
], Text.prototype, "width",
|
|
8813
|
+
], Text.prototype, "width", void 0);
|
|
8769
8814
|
__decorate([
|
|
8770
8815
|
boundsType(0)
|
|
8771
|
-
], Text.prototype, "height",
|
|
8816
|
+
], Text.prototype, "height", void 0);
|
|
8772
8817
|
__decorate([
|
|
8773
8818
|
dataType(false)
|
|
8774
|
-
], Text.prototype, "resizeFontSize",
|
|
8819
|
+
], Text.prototype, "resizeFontSize", void 0);
|
|
8775
8820
|
__decorate([
|
|
8776
8821
|
surfaceType('#000000')
|
|
8777
|
-
], Text.prototype, "fill",
|
|
8822
|
+
], Text.prototype, "fill", void 0);
|
|
8778
8823
|
__decorate([
|
|
8779
8824
|
affectStrokeBoundsType('outside')
|
|
8780
|
-
], Text.prototype, "strokeAlign",
|
|
8825
|
+
], Text.prototype, "strokeAlign", void 0);
|
|
8781
8826
|
__decorate([
|
|
8782
8827
|
hitType('all')
|
|
8783
|
-
], Text.prototype, "hitFill",
|
|
8828
|
+
], Text.prototype, "hitFill", void 0);
|
|
8784
8829
|
__decorate([
|
|
8785
8830
|
boundsType('')
|
|
8786
|
-
], Text.prototype, "text",
|
|
8831
|
+
], Text.prototype, "text", void 0);
|
|
8787
8832
|
__decorate([
|
|
8788
8833
|
boundsType('caption')
|
|
8789
|
-
], Text.prototype, "fontFamily",
|
|
8834
|
+
], Text.prototype, "fontFamily", void 0);
|
|
8790
8835
|
__decorate([
|
|
8791
8836
|
boundsType(12)
|
|
8792
|
-
], Text.prototype, "fontSize",
|
|
8837
|
+
], Text.prototype, "fontSize", void 0);
|
|
8793
8838
|
__decorate([
|
|
8794
8839
|
boundsType('normal')
|
|
8795
|
-
], Text.prototype, "fontWeight",
|
|
8840
|
+
], Text.prototype, "fontWeight", void 0);
|
|
8796
8841
|
__decorate([
|
|
8797
8842
|
boundsType(false)
|
|
8798
|
-
], Text.prototype, "italic",
|
|
8843
|
+
], Text.prototype, "italic", void 0);
|
|
8799
8844
|
__decorate([
|
|
8800
8845
|
boundsType('none')
|
|
8801
|
-
], Text.prototype, "textCase",
|
|
8846
|
+
], Text.prototype, "textCase", void 0);
|
|
8802
8847
|
__decorate([
|
|
8803
8848
|
boundsType('none')
|
|
8804
|
-
], Text.prototype, "textDecoration",
|
|
8849
|
+
], Text.prototype, "textDecoration", void 0);
|
|
8805
8850
|
__decorate([
|
|
8806
8851
|
boundsType(0)
|
|
8807
|
-
], Text.prototype, "letterSpacing",
|
|
8852
|
+
], Text.prototype, "letterSpacing", void 0);
|
|
8808
8853
|
__decorate([
|
|
8809
8854
|
boundsType({ type: 'percent', value: 1.5 })
|
|
8810
|
-
], Text.prototype, "lineHeight",
|
|
8855
|
+
], Text.prototype, "lineHeight", void 0);
|
|
8811
8856
|
__decorate([
|
|
8812
8857
|
boundsType(0)
|
|
8813
|
-
], Text.prototype, "paraIndent",
|
|
8858
|
+
], Text.prototype, "paraIndent", void 0);
|
|
8814
8859
|
__decorate([
|
|
8815
8860
|
boundsType(0)
|
|
8816
|
-
], Text.prototype, "paraSpacing",
|
|
8861
|
+
], Text.prototype, "paraSpacing", void 0);
|
|
8817
8862
|
__decorate([
|
|
8818
8863
|
boundsType('x')
|
|
8819
|
-
], Text.prototype, "writingMode",
|
|
8864
|
+
], Text.prototype, "writingMode", void 0);
|
|
8820
8865
|
__decorate([
|
|
8821
8866
|
boundsType('left')
|
|
8822
|
-
], Text.prototype, "textAlign",
|
|
8867
|
+
], Text.prototype, "textAlign", void 0);
|
|
8823
8868
|
__decorate([
|
|
8824
8869
|
boundsType('top')
|
|
8825
|
-
], Text.prototype, "verticalAlign",
|
|
8870
|
+
], Text.prototype, "verticalAlign", void 0);
|
|
8826
8871
|
__decorate([
|
|
8827
8872
|
boundsType(true)
|
|
8828
|
-
], Text.prototype, "autoSizeAlign",
|
|
8873
|
+
], Text.prototype, "autoSizeAlign", void 0);
|
|
8829
8874
|
__decorate([
|
|
8830
8875
|
boundsType('normal')
|
|
8831
|
-
], Text.prototype, "textWrap",
|
|
8876
|
+
], Text.prototype, "textWrap", void 0);
|
|
8832
8877
|
__decorate([
|
|
8833
8878
|
boundsType('show')
|
|
8834
|
-
], Text.prototype, "textOverflow",
|
|
8879
|
+
], Text.prototype, "textOverflow", void 0);
|
|
8835
8880
|
Text = __decorate([
|
|
8836
8881
|
registerUI()
|
|
8837
8882
|
], Text);
|
|
@@ -8844,10 +8889,10 @@ let Path = class Path extends UI {
|
|
|
8844
8889
|
};
|
|
8845
8890
|
__decorate([
|
|
8846
8891
|
dataProcessor(PathData)
|
|
8847
|
-
], Path.prototype, "__",
|
|
8892
|
+
], Path.prototype, "__", void 0);
|
|
8848
8893
|
__decorate([
|
|
8849
8894
|
affectStrokeBoundsType('center')
|
|
8850
|
-
], Path.prototype, "strokeAlign",
|
|
8895
|
+
], Path.prototype, "strokeAlign", void 0);
|
|
8851
8896
|
Path = __decorate([
|
|
8852
8897
|
registerUI()
|
|
8853
8898
|
], Path);
|
|
@@ -8886,10 +8931,10 @@ let Pen = class Pen extends Group {
|
|
|
8886
8931
|
};
|
|
8887
8932
|
__decorate([
|
|
8888
8933
|
dataProcessor(PenData)
|
|
8889
|
-
], Pen.prototype, "__",
|
|
8934
|
+
], Pen.prototype, "__", void 0);
|
|
8890
8935
|
__decorate([
|
|
8891
8936
|
penPathType()
|
|
8892
|
-
], Pen.prototype, "path",
|
|
8937
|
+
], Pen.prototype, "path", void 0);
|
|
8893
8938
|
Pen = __decorate([
|
|
8894
8939
|
useModule(PathCreator, ['set', 'path', 'paint']),
|
|
8895
8940
|
registerUI()
|
|
@@ -9125,7 +9170,7 @@ let DragEvent = class DragEvent extends PointerEvent {
|
|
|
9125
9170
|
const { draggable, dragBounds } = leaf, move = leaf.getLocalPoint(total, null, true);
|
|
9126
9171
|
PointHelper.move(move, start.x - leaf.x, start.y - leaf.y);
|
|
9127
9172
|
if (dragBounds)
|
|
9128
|
-
this.getMoveInDragBounds(leaf.
|
|
9173
|
+
this.getMoveInDragBounds(leaf.__localBoxBounds, dragBounds === 'parent' ? leaf.parent.boxBounds : dragBounds, move, true);
|
|
9129
9174
|
if (draggable === 'x')
|
|
9130
9175
|
move.y = 0;
|
|
9131
9176
|
if (draggable === 'y')
|
|
@@ -9828,7 +9873,9 @@ class InteractionBase {
|
|
|
9828
9873
|
}
|
|
9829
9874
|
findPath(data, options) {
|
|
9830
9875
|
const { hitRadius, through } = this.p;
|
|
9831
|
-
const { bottomList } = this;
|
|
9876
|
+
const { bottomList, target } = this;
|
|
9877
|
+
if (!Platform.backgrounder && !data.origin)
|
|
9878
|
+
target && target.updateLayout();
|
|
9832
9879
|
const find = this.selector.getByPoint(data, hitRadius, Object.assign({ bottomList, name: data.type }, (options || { through })));
|
|
9833
9880
|
if (find.throughPath)
|
|
9834
9881
|
data.throughPath = find.throughPath;
|
|
@@ -10073,9 +10120,9 @@ leaf.__hitWorld = function (point) {
|
|
|
10073
10120
|
}
|
|
10074
10121
|
return this.__hit(inner);
|
|
10075
10122
|
};
|
|
10076
|
-
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10077
|
-
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10078
|
-
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
10123
|
+
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitFill(inner, this.__.windingRule); };
|
|
10124
|
+
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitStroke(inner, strokeWidth); };
|
|
10125
|
+
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
|
|
10079
10126
|
leaf.__drawHitPath = function (canvas) { if (canvas)
|
|
10080
10127
|
this.__drawRenderPath(canvas); };
|
|
10081
10128
|
|
|
@@ -10163,8 +10210,8 @@ function getSelector(ui) {
|
|
|
10163
10210
|
return ui.leafer ? ui.leafer.selector : (Platform.selector || (Platform.selector = Creator.selector()));
|
|
10164
10211
|
}
|
|
10165
10212
|
Group.prototype.pick = function (hitPoint, options) {
|
|
10166
|
-
this.leafer || this.updateLayout();
|
|
10167
10213
|
options || (options = emptyData);
|
|
10214
|
+
this.updateLayout();
|
|
10168
10215
|
return getSelector(this).getByPoint(hitPoint, options.hitRadius || 0, Object.assign(Object.assign({}, options), { target: this }));
|
|
10169
10216
|
};
|
|
10170
10217
|
|
|
@@ -10653,7 +10700,7 @@ function getPatternData(paint, box, image) {
|
|
|
10653
10700
|
box = tempBox.set(box).shrink(paint.padding);
|
|
10654
10701
|
if (paint.mode === 'strench')
|
|
10655
10702
|
paint.mode = 'stretch';
|
|
10656
|
-
const { opacity, mode, align, offset, scale, size, rotation, repeat } = paint;
|
|
10703
|
+
const { opacity, mode, align, offset, scale, size, rotation, repeat, filters } = paint;
|
|
10657
10704
|
const sameBox = box.width === width && box.height === height;
|
|
10658
10705
|
const data = { mode };
|
|
10659
10706
|
const swapSize = align !== 'center' && (rotation || 0) % 180 === 90;
|
|
@@ -10716,6 +10763,8 @@ function getPatternData(paint, box, image) {
|
|
|
10716
10763
|
data.height = height;
|
|
10717
10764
|
if (opacity)
|
|
10718
10765
|
data.opacity = opacity;
|
|
10766
|
+
if (filters)
|
|
10767
|
+
data.filters = filters;
|
|
10719
10768
|
if (repeat)
|
|
10720
10769
|
data.repeat = typeof repeat === 'string' ? (repeat === 'x' ? 'repeat-x' : 'repeat-y') : 'repeat';
|
|
10721
10770
|
return data;
|
|
@@ -10818,7 +10867,7 @@ function createPattern(ui, paint, pixelRatio) {
|
|
|
10818
10867
|
scaleX = abs$1(scaleX);
|
|
10819
10868
|
scaleY = abs$1(scaleY);
|
|
10820
10869
|
const { image, data } = paint;
|
|
10821
|
-
let imageScale, imageMatrix, { width, height, scaleX: sx, scaleY: sy,
|
|
10870
|
+
let imageScale, imageMatrix, { width, height, scaleX: sx, scaleY: sy, transform, repeat } = data;
|
|
10822
10871
|
if (sx) {
|
|
10823
10872
|
imageMatrix = get$1();
|
|
10824
10873
|
copy$1(imageMatrix, transform);
|
|
@@ -10861,7 +10910,7 @@ function createPattern(ui, paint, pixelRatio) {
|
|
|
10861
10910
|
}
|
|
10862
10911
|
scale(imageMatrix, 1 / scaleX, 1 / scaleY);
|
|
10863
10912
|
}
|
|
10864
|
-
const canvas = image.getCanvas(ceil(width) || 1, ceil(height) || 1, opacity);
|
|
10913
|
+
const canvas = image.getCanvas(ceil(width) || 1, ceil(height) || 1, data.opacity, data.filters);
|
|
10865
10914
|
const pattern = image.getPattern(canvas, repeat || (Platform.origin.noRepeat || 'no-repeat'), imageMatrix, paint);
|
|
10866
10915
|
paint.style = pattern;
|
|
10867
10916
|
paint.patternId = id;
|
|
@@ -10905,7 +10954,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
10905
10954
|
canvas.opacity *= data.opacity;
|
|
10906
10955
|
if (data.transform)
|
|
10907
10956
|
canvas.transform(data.transform);
|
|
10908
|
-
canvas.drawImage(paint.image.
|
|
10957
|
+
canvas.drawImage(paint.image.getFull(data.filters), 0, 0, data.width, data.height);
|
|
10909
10958
|
canvas.restore();
|
|
10910
10959
|
return true;
|
|
10911
10960
|
}
|
|
@@ -10915,7 +10964,7 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
10915
10964
|
}
|
|
10916
10965
|
else {
|
|
10917
10966
|
if (!paint.patternTask) {
|
|
10918
|
-
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this,
|
|
10967
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
|
|
10919
10968
|
paint.patternTask = null;
|
|
10920
10969
|
if (canvas.bounds.hit(ui.__nowWorld))
|
|
10921
10970
|
createPattern(ui, paint, pixelRatio);
|
|
@@ -11818,5 +11867,5 @@ if (platform === 'ios') {
|
|
|
11818
11867
|
};
|
|
11819
11868
|
}
|
|
11820
11869
|
|
|
11821
|
-
export { AlignHelper, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Frame, FrameData, Group, GroupData, HitCanvasManager, Image, ImageData, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, effectType, emptyData, eraserType, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isNull, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, tempBounds$1 as tempBounds, tempMatrix, tempPoint$3 as tempPoint, useCanvas, useModule, version, visibleType, zoomLayerType };
|
|
11870
|
+
export { AlignHelper, Answer, App, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, BoxData, Branch, BranchHelper, BranchRender, Canvas, CanvasData, CanvasManager, ChildEvent, ColorConvert, Creator, Cursor, DataHelper, Debug, Direction4, Direction9, DragEvent, Dragger, DropEvent, Effect, Ellipse, EllipseData, EllipseHelper, Event, EventCreator, Eventer, Export, FileHelper, Filter, Frame, FrameData, Group, GroupData, HitCanvasManager, Image, ImageData, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferData, LeaferEvent, LeaferImage, Line, LineData, MathHelper, Matrix, MatrixHelper, MoveEvent, MyDragEvent, MyImage, MyPointerEvent, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, PaintGradient, PaintImage, Path, PathArrow, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathData, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, PenData, Picker, Platform, Plugin, Point, PointHelper, PointerButton, PointerEvent, Polygon, PolygonData, PropertyEvent, Rect, RectData, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, Resource, RotateEvent, Run, Selector, Star, StarData, State, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert, TextData, Transition, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIData, UIEvent, UIRender, UnitConvert, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, doBoundsType, doStrokeType, effectType, emptyData, eraserType, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isNull, layoutProcessor, maskType, naturalBoundsType, opacityType, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, sortType, strokeType, surfaceType, tempBounds$1 as tempBounds, tempMatrix, tempPoint$3 as tempPoint, useCanvas, useModule, version, visibleType, zoomLayerType };
|
|
11822
11871
|
//# sourceMappingURL=miniapp.module.js.map
|