@leafer-ui/miniapp 1.0.0-rc.4 → 1.0.0-rc.6
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.esm.js +190 -146
- package/dist/miniapp.esm.min.js +1 -1
- package/dist/miniapp.module.js +574 -388
- package/dist/miniapp.module.min.js +1 -1
- package/package.json +6 -6
package/dist/miniapp.module.js
CHANGED
|
@@ -126,13 +126,13 @@ const MatrixHelper = {
|
|
|
126
126
|
t.d *= y;
|
|
127
127
|
},
|
|
128
128
|
scaleOfOuter(t, origin, x, y = x) {
|
|
129
|
-
M$
|
|
130
|
-
M$
|
|
129
|
+
M$6.toInnerPoint(t, origin, tempPoint$1);
|
|
130
|
+
M$6.scaleOfInner(t, tempPoint$1, x, y);
|
|
131
131
|
},
|
|
132
132
|
scaleOfInner(t, origin, x, y = x) {
|
|
133
|
-
M$
|
|
134
|
-
M$
|
|
135
|
-
M$
|
|
133
|
+
M$6.translateInner(t, origin.x, origin.y);
|
|
134
|
+
M$6.scale(t, x, y);
|
|
135
|
+
M$6.translateInner(t, -origin.x, -origin.y);
|
|
136
136
|
},
|
|
137
137
|
rotate(t, angle) {
|
|
138
138
|
angle *= OneRadian;
|
|
@@ -145,13 +145,13 @@ const MatrixHelper = {
|
|
|
145
145
|
t.d = (c * sinR) + (d * cosR);
|
|
146
146
|
},
|
|
147
147
|
rotateOfOuter(t, origin, angle) {
|
|
148
|
-
M$
|
|
149
|
-
M$
|
|
148
|
+
M$6.toInnerPoint(t, origin, tempPoint$1);
|
|
149
|
+
M$6.rotateOfInner(t, tempPoint$1, angle);
|
|
150
150
|
},
|
|
151
151
|
rotateOfInner(t, origin, angle) {
|
|
152
|
-
M$
|
|
153
|
-
M$
|
|
154
|
-
M$
|
|
152
|
+
M$6.translateInner(t, origin.x, origin.y);
|
|
153
|
+
M$6.rotate(t, angle);
|
|
154
|
+
M$6.translateInner(t, -origin.x, -origin.y);
|
|
155
155
|
},
|
|
156
156
|
skew(t, x, y) {
|
|
157
157
|
const { a, b, c, d } = t;
|
|
@@ -167,13 +167,13 @@ const MatrixHelper = {
|
|
|
167
167
|
}
|
|
168
168
|
},
|
|
169
169
|
skewOfOuter(t, origin, x, y) {
|
|
170
|
-
M$
|
|
171
|
-
M$
|
|
170
|
+
M$6.toInnerPoint(t, origin, tempPoint$1);
|
|
171
|
+
M$6.skewOfInner(t, tempPoint$1, x, y);
|
|
172
172
|
},
|
|
173
173
|
skewOfInner(t, origin, x, y) {
|
|
174
|
-
M$
|
|
175
|
-
M$
|
|
176
|
-
M$
|
|
174
|
+
M$6.translateInner(t, origin.x, origin.y);
|
|
175
|
+
M$6.skew(t, x, y);
|
|
176
|
+
M$6.translateInner(t, -origin.x, -origin.y);
|
|
177
177
|
},
|
|
178
178
|
multiply(t, matrix) {
|
|
179
179
|
const { a, b, c, d, e, f } = t;
|
|
@@ -196,12 +196,12 @@ const MatrixHelper = {
|
|
|
196
196
|
t.f = (e * matrix.b) + (f * matrix.d) + matrix.f;
|
|
197
197
|
},
|
|
198
198
|
divide(t, matrix) {
|
|
199
|
-
M$
|
|
199
|
+
M$6.preMultiply(t, M$6.tempInvert(matrix));
|
|
200
200
|
},
|
|
201
201
|
tempInvert(t) {
|
|
202
|
-
const { tempMatrix: temp } = M$
|
|
203
|
-
M$
|
|
204
|
-
M$
|
|
202
|
+
const { tempMatrix: temp } = M$6;
|
|
203
|
+
M$6.copy(temp, t);
|
|
204
|
+
M$6.invert(temp);
|
|
205
205
|
return temp;
|
|
206
206
|
},
|
|
207
207
|
invert(t) {
|
|
@@ -264,10 +264,10 @@ const MatrixHelper = {
|
|
|
264
264
|
return { x: t.e, y: t.f, scaleX, scaleY, rotation, skewX, skewY };
|
|
265
265
|
},
|
|
266
266
|
reset(t) {
|
|
267
|
-
M$
|
|
267
|
+
M$6.set(t);
|
|
268
268
|
}
|
|
269
269
|
};
|
|
270
|
-
const M$
|
|
270
|
+
const M$6 = MatrixHelper;
|
|
271
271
|
|
|
272
272
|
const { toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$2 } = MatrixHelper;
|
|
273
273
|
const { sin: sin$5, cos: cos$5, abs: abs$1, sqrt: sqrt$2, atan2: atan2$2 } = Math;
|
|
@@ -587,9 +587,7 @@ const BoundsHelper = {
|
|
|
587
587
|
}
|
|
588
588
|
B.move(to, -to.offsetX, -to.offsetY);
|
|
589
589
|
},
|
|
590
|
-
scale(t, scaleX, scaleY) {
|
|
591
|
-
if (!scaleY)
|
|
592
|
-
scaleY = scaleX;
|
|
590
|
+
scale(t, scaleX, scaleY = scaleX) {
|
|
593
591
|
if (t.x)
|
|
594
592
|
t.x *= scaleX;
|
|
595
593
|
if (t.y)
|
|
@@ -597,6 +595,12 @@ const BoundsHelper = {
|
|
|
597
595
|
t.width *= scaleX;
|
|
598
596
|
t.height *= scaleY;
|
|
599
597
|
},
|
|
598
|
+
scaleOf(t, origin, scaleX, scaleY) {
|
|
599
|
+
t.x += (t.x - origin.x) * (scaleX - 1);
|
|
600
|
+
t.y += (t.y - origin.y) * (scaleY - 1);
|
|
601
|
+
t.width *= scaleX;
|
|
602
|
+
t.height *= scaleY;
|
|
603
|
+
},
|
|
600
604
|
tempToOuterOf(t, matrix) {
|
|
601
605
|
B.copy(B.tempBounds, t);
|
|
602
606
|
B.toOuterOf(B.tempBounds, matrix);
|
|
@@ -647,14 +651,14 @@ const BoundsHelper = {
|
|
|
647
651
|
},
|
|
648
652
|
getFitMatrix(t, put) {
|
|
649
653
|
const scale = Math.min(1, Math.min(t.width / put.width, t.height / put.height));
|
|
650
|
-
return new Matrix(scale, 0, 0, scale, -
|
|
654
|
+
return new Matrix(scale, 0, 0, scale, -put.x * scale, -put.y * scale);
|
|
651
655
|
},
|
|
652
656
|
getSpread(t, spreadX, spreadY) {
|
|
653
657
|
const n = {};
|
|
654
658
|
B.copyAndSpread(n, t, spreadX, spreadY);
|
|
655
659
|
return n;
|
|
656
660
|
},
|
|
657
|
-
spread(t, spreadX, spreadY) {
|
|
661
|
+
spread(t, spreadX, spreadY = spreadX) {
|
|
658
662
|
B.copyAndSpread(t, t, spreadX, spreadY);
|
|
659
663
|
},
|
|
660
664
|
ceil(t) {
|
|
@@ -788,6 +792,10 @@ class Bounds {
|
|
|
788
792
|
BoundsHelper.scale(this, scaleX, scaleY);
|
|
789
793
|
return this;
|
|
790
794
|
}
|
|
795
|
+
scaleOf(origin, scaleX, scaleY) {
|
|
796
|
+
BoundsHelper.scaleOf(this, origin, scaleX, scaleY);
|
|
797
|
+
return this;
|
|
798
|
+
}
|
|
791
799
|
toOuterOf(matrix, to) {
|
|
792
800
|
BoundsHelper.toOuterOf(this, matrix, to);
|
|
793
801
|
return this;
|
|
@@ -795,8 +803,8 @@ class Bounds {
|
|
|
795
803
|
getFitMatrix(put) {
|
|
796
804
|
return BoundsHelper.getFitMatrix(this, put);
|
|
797
805
|
}
|
|
798
|
-
spread(
|
|
799
|
-
BoundsHelper.spread(this,
|
|
806
|
+
spread(spreadX, spreadY) {
|
|
807
|
+
BoundsHelper.spread(this, spreadX, spreadY);
|
|
800
808
|
return this;
|
|
801
809
|
}
|
|
802
810
|
ceil() {
|
|
@@ -1340,14 +1348,22 @@ class LeafData {
|
|
|
1340
1348
|
if (this.__input && this.__input[name] !== undefined)
|
|
1341
1349
|
this.__input[name] = undefined;
|
|
1342
1350
|
}
|
|
1343
|
-
__getInputData() {
|
|
1351
|
+
__getInputData(options) {
|
|
1344
1352
|
const data = { tag: this.__leaf.tag }, { __input } = this;
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1353
|
+
if (options) {
|
|
1354
|
+
for (let key in this) {
|
|
1355
|
+
if (key[0] !== '_')
|
|
1356
|
+
data[key] = this[key];
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
else {
|
|
1360
|
+
let realKey, value;
|
|
1361
|
+
for (let key in this) {
|
|
1362
|
+
realKey = key.substring(1);
|
|
1363
|
+
if (this[realKey] !== undefined) {
|
|
1364
|
+
value = __input ? __input[realKey] : undefined;
|
|
1365
|
+
data[realKey] = value === undefined ? this[key] : value;
|
|
1366
|
+
}
|
|
1351
1367
|
}
|
|
1352
1368
|
}
|
|
1353
1369
|
return data;
|
|
@@ -1378,6 +1394,8 @@ class LeafData {
|
|
|
1378
1394
|
}
|
|
1379
1395
|
|
|
1380
1396
|
const FileHelper = {
|
|
1397
|
+
opacityTypes: ['png', 'webp', 'svg'],
|
|
1398
|
+
upperCaseTypeMap: {},
|
|
1381
1399
|
mineType(type) {
|
|
1382
1400
|
if (!type || type.startsWith('image'))
|
|
1383
1401
|
return type;
|
|
@@ -1390,6 +1408,7 @@ const FileHelper = {
|
|
|
1390
1408
|
return l[l.length - 1];
|
|
1391
1409
|
}
|
|
1392
1410
|
};
|
|
1411
|
+
FileHelper.opacityTypes.forEach(type => FileHelper.upperCaseTypeMap[type] = type.toUpperCase());
|
|
1393
1412
|
|
|
1394
1413
|
/******************************************************************************
|
|
1395
1414
|
Copyright (c) Microsoft Corporation.
|
|
@@ -2083,11 +2102,11 @@ const RectHelper = {
|
|
|
2083
2102
|
const { sin: sin$4, cos: cos$4, atan2: atan2$1, ceil, abs, PI: PI$2, sqrt: sqrt$1, pow } = Math;
|
|
2084
2103
|
const { setPoint: setPoint$1, addPoint: addPoint$1 } = TwoPointBoundsHelper;
|
|
2085
2104
|
const { set: set$2 } = PointHelper;
|
|
2086
|
-
const { M: M$
|
|
2105
|
+
const { M: M$5, L: L$6, C: C$5, Q: Q$4, Z: Z$5 } = PathCommandMap;
|
|
2087
2106
|
const tempPoint = {};
|
|
2088
2107
|
const BezierHelper = {
|
|
2089
2108
|
points(data, points, curve, close) {
|
|
2090
|
-
data.push(M$
|
|
2109
|
+
data.push(M$5, points[0], points[1]);
|
|
2091
2110
|
if (curve && points.length > 5) {
|
|
2092
2111
|
let aX, aY, bX, bY, cX, cY, c1X, c1Y, c2X, c2Y;
|
|
2093
2112
|
let ba, cb, d, len = points.length;
|
|
@@ -2117,7 +2136,7 @@ const BezierHelper = {
|
|
|
2117
2136
|
data.push(Q$4, c1X, c1Y, bX, bY);
|
|
2118
2137
|
}
|
|
2119
2138
|
else {
|
|
2120
|
-
data.push(C$
|
|
2139
|
+
data.push(C$5, c2X, c2Y, c1X, c1Y, bX, bY);
|
|
2121
2140
|
}
|
|
2122
2141
|
c2X = bX + cb * cX;
|
|
2123
2142
|
c2Y = bY + cb * cY;
|
|
@@ -2127,11 +2146,11 @@ const BezierHelper = {
|
|
|
2127
2146
|
}
|
|
2128
2147
|
else {
|
|
2129
2148
|
for (let i = 2, len = points.length; i < len; i += 2) {
|
|
2130
|
-
data.push(L$
|
|
2149
|
+
data.push(L$6, points[i], points[i + 1]);
|
|
2131
2150
|
}
|
|
2132
2151
|
}
|
|
2133
2152
|
if (close)
|
|
2134
|
-
data.push(Z$
|
|
2153
|
+
data.push(Z$5);
|
|
2135
2154
|
},
|
|
2136
2155
|
rect(data, x, y, width, height) {
|
|
2137
2156
|
PathHelper.creator.path = data;
|
|
@@ -2154,7 +2173,7 @@ const BezierHelper = {
|
|
|
2154
2173
|
totalRadian += PI2;
|
|
2155
2174
|
if (totalRadian === PI$2 || (abs(BAx + BAy) < 1.e-12) || (abs(CBx + CBy) < 1.e-12)) {
|
|
2156
2175
|
if (data)
|
|
2157
|
-
data.push(L$
|
|
2176
|
+
data.push(L$6, x1, y1);
|
|
2158
2177
|
if (setPointBounds) {
|
|
2159
2178
|
setPoint$1(setPointBounds, fromX, fromY);
|
|
2160
2179
|
addPoint$1(setPointBounds, x1, y1);
|
|
@@ -2207,7 +2226,7 @@ const BezierHelper = {
|
|
|
2207
2226
|
let startY = y = rotationSin * radiusX * startCos + rotationCos * radiusY * startSin;
|
|
2208
2227
|
let fromX = cx + x, fromY = cy + y;
|
|
2209
2228
|
if (data)
|
|
2210
|
-
data.push(L$
|
|
2229
|
+
data.push(L$6, fromX, fromY);
|
|
2211
2230
|
if (setPointBounds)
|
|
2212
2231
|
setPoint$1(setPointBounds, fromX, fromY);
|
|
2213
2232
|
if (setStartPoint)
|
|
@@ -2222,7 +2241,7 @@ const BezierHelper = {
|
|
|
2222
2241
|
x2 = cx + x + control * (rotationCos * radiusX * endSin + rotationSin * radiusY * endCos);
|
|
2223
2242
|
y2 = cy + y + control * (rotationSin * radiusX * endSin - rotationCos * radiusY * endCos);
|
|
2224
2243
|
if (data)
|
|
2225
|
-
data.push(C$
|
|
2244
|
+
data.push(C$5, x1, y1, x2, y2, cx + x, cy + y);
|
|
2226
2245
|
if (setPointBounds)
|
|
2227
2246
|
toTwoPointBounds$1(cx + startX, cy + startY, x1, y1, x2, y2, cx + x, cy + y, setPointBounds, true);
|
|
2228
2247
|
startX = x;
|
|
@@ -2236,7 +2255,7 @@ const BezierHelper = {
|
|
|
2236
2255
|
set$2(setEndPoint, cx + x, cy + y);
|
|
2237
2256
|
},
|
|
2238
2257
|
quadraticCurveTo(data, fromX, fromY, x1, y1, toX, toY) {
|
|
2239
|
-
data.push(C$
|
|
2258
|
+
data.push(C$5, (fromX + 2 * x1) / 3, (fromY + 2 * y1) / 3, (toX + 2 * x1) / 3, (toY + 2 * y1) / 3, toX, toY);
|
|
2240
2259
|
},
|
|
2241
2260
|
toTwoPointBoundsByQuadraticCurve(fromX, fromY, x1, y1, toX, toY, pointBounds, addMode) {
|
|
2242
2261
|
toTwoPointBounds$1(fromX, fromY, (fromX + 2 * x1) / 3, (fromY + 2 * y1) / 3, (toX + 2 * x1) / 3, (toY + 2 * y1) / 3, toX, toY, pointBounds, addMode);
|
|
@@ -2330,7 +2349,7 @@ const EllipseHelper = {
|
|
|
2330
2349
|
const centerX = fromX + halfX + rotationCos * cx - rotationSin * cy;
|
|
2331
2350
|
const centerY = fromY + halfY + rotationSin * cx + rotationCos * cy;
|
|
2332
2351
|
const anticlockwise = totalRadian < 0 ? 1 : 0;
|
|
2333
|
-
if (curveMode) {
|
|
2352
|
+
if (curveMode || Platform.ellipseToCurve) {
|
|
2334
2353
|
ellipse$5(data, centerX, centerY, radiusX, radiusY, rotation, startRadian / OneRadian, endRadian / OneRadian, anticlockwise);
|
|
2335
2354
|
}
|
|
2336
2355
|
else {
|
|
@@ -2344,7 +2363,7 @@ const EllipseHelper = {
|
|
|
2344
2363
|
}
|
|
2345
2364
|
};
|
|
2346
2365
|
|
|
2347
|
-
const { M: M$
|
|
2366
|
+
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$3, O: O$3, P: P$3, U: U$4 } = PathCommandMap;
|
|
2348
2367
|
const { rect: rect$2, roundRect: roundRect$2, arcTo: arcTo$2, arc: arc$3, ellipse: ellipse$4, quadraticCurveTo: quadraticCurveTo$1 } = BezierHelper;
|
|
2349
2368
|
const { ellipticalArc } = EllipseHelper;
|
|
2350
2369
|
const debug$a = Debug.get('PathConvert');
|
|
@@ -2432,33 +2451,33 @@ const PathConvert = {
|
|
|
2432
2451
|
case m:
|
|
2433
2452
|
old[i + 1] += x;
|
|
2434
2453
|
old[i + 2] += y;
|
|
2435
|
-
case M$
|
|
2454
|
+
case M$4:
|
|
2436
2455
|
x = old[i + 1];
|
|
2437
2456
|
y = old[i + 2];
|
|
2438
|
-
data.push(M$
|
|
2457
|
+
data.push(M$4, x, y);
|
|
2439
2458
|
i += 3;
|
|
2440
2459
|
break;
|
|
2441
2460
|
case h:
|
|
2442
2461
|
old[i + 1] += x;
|
|
2443
2462
|
case H:
|
|
2444
2463
|
x = old[i + 1];
|
|
2445
|
-
data.push(L$
|
|
2464
|
+
data.push(L$5, x, y);
|
|
2446
2465
|
i += 2;
|
|
2447
2466
|
break;
|
|
2448
2467
|
case v:
|
|
2449
2468
|
old[i + 1] += y;
|
|
2450
2469
|
case V:
|
|
2451
2470
|
y = old[i + 1];
|
|
2452
|
-
data.push(L$
|
|
2471
|
+
data.push(L$5, x, y);
|
|
2453
2472
|
i += 2;
|
|
2454
2473
|
break;
|
|
2455
2474
|
case l:
|
|
2456
2475
|
old[i + 1] += x;
|
|
2457
2476
|
old[i + 2] += y;
|
|
2458
|
-
case L$
|
|
2477
|
+
case L$5:
|
|
2459
2478
|
x = old[i + 1];
|
|
2460
2479
|
y = old[i + 2];
|
|
2461
|
-
data.push(L$
|
|
2480
|
+
data.push(L$5, x, y);
|
|
2462
2481
|
i += 3;
|
|
2463
2482
|
break;
|
|
2464
2483
|
case s:
|
|
@@ -2468,14 +2487,14 @@ const PathConvert = {
|
|
|
2468
2487
|
old[i + 4] += y;
|
|
2469
2488
|
command = S;
|
|
2470
2489
|
case S:
|
|
2471
|
-
smooth = (lastCommand === C$
|
|
2490
|
+
smooth = (lastCommand === C$4) || (lastCommand === S);
|
|
2472
2491
|
x1 = smooth ? (x * 2 - controlX) : old[i + 1];
|
|
2473
2492
|
y1 = smooth ? (y * 2 - controlY) : old[i + 2];
|
|
2474
2493
|
controlX = old[i + 1];
|
|
2475
2494
|
controlY = old[i + 2];
|
|
2476
2495
|
x = old[i + 3];
|
|
2477
2496
|
y = old[i + 4];
|
|
2478
|
-
data.push(C$
|
|
2497
|
+
data.push(C$4, x1, y1, controlX, controlY, x, y);
|
|
2479
2498
|
i += 5;
|
|
2480
2499
|
break;
|
|
2481
2500
|
case c:
|
|
@@ -2485,13 +2504,13 @@ const PathConvert = {
|
|
|
2485
2504
|
old[i + 4] += y;
|
|
2486
2505
|
old[i + 5] += x;
|
|
2487
2506
|
old[i + 6] += y;
|
|
2488
|
-
command = C$
|
|
2489
|
-
case C$
|
|
2507
|
+
command = C$4;
|
|
2508
|
+
case C$4:
|
|
2490
2509
|
controlX = old[i + 3];
|
|
2491
2510
|
controlY = old[i + 4];
|
|
2492
2511
|
x = old[i + 5];
|
|
2493
2512
|
y = old[i + 6];
|
|
2494
|
-
data.push(C$
|
|
2513
|
+
data.push(C$4, old[i + 1], old[i + 2], controlX, controlY, x, y);
|
|
2495
2514
|
i += 7;
|
|
2496
2515
|
break;
|
|
2497
2516
|
case t:
|
|
@@ -2531,8 +2550,8 @@ const PathConvert = {
|
|
|
2531
2550
|
i += 8;
|
|
2532
2551
|
break;
|
|
2533
2552
|
case z:
|
|
2534
|
-
case Z$
|
|
2535
|
-
data.push(Z$
|
|
2553
|
+
case Z$4:
|
|
2554
|
+
data.push(Z$4);
|
|
2536
2555
|
i++;
|
|
2537
2556
|
break;
|
|
2538
2557
|
case N$3:
|
|
@@ -2577,7 +2596,7 @@ const PathConvert = {
|
|
|
2577
2596
|
y = old[i + 2];
|
|
2578
2597
|
i += 4;
|
|
2579
2598
|
break;
|
|
2580
|
-
case U$
|
|
2599
|
+
case U$4:
|
|
2581
2600
|
arcTo$2(curveMode ? data : copyData(data, old, i, 6), x, y, old[i + 1], old[i + 2], old[i + 3], old[i + 4], old[i + 5], null, setEndPoint$1);
|
|
2582
2601
|
x = setEndPoint$1.x;
|
|
2583
2602
|
y = setEndPoint$1.y;
|
|
@@ -2608,26 +2627,26 @@ const PathConvert = {
|
|
|
2608
2627
|
};
|
|
2609
2628
|
const { current, pushData, copyData } = PathConvert;
|
|
2610
2629
|
|
|
2611
|
-
const { M: M$
|
|
2630
|
+
const { M: M$3, L: L$4, C: C$3, Q: Q$2, Z: Z$3, N: N$2, D: D$2, X: X$2, G: G$2, F: F$2, O: O$2, P: P$2, U: U$3 } = PathCommandMap;
|
|
2612
2631
|
const startPoint = {};
|
|
2613
2632
|
const PathCommandDataHelper = {
|
|
2614
2633
|
beginPath(data) {
|
|
2615
2634
|
data.length = 0;
|
|
2616
2635
|
},
|
|
2617
2636
|
moveTo(data, x, y) {
|
|
2618
|
-
data.push(M$
|
|
2637
|
+
data.push(M$3, x, y);
|
|
2619
2638
|
},
|
|
2620
2639
|
lineTo(data, x, y) {
|
|
2621
|
-
data.push(L$
|
|
2640
|
+
data.push(L$4, x, y);
|
|
2622
2641
|
},
|
|
2623
2642
|
bezierCurveTo(data, x1, y1, x2, y2, x, y) {
|
|
2624
|
-
data.push(C$
|
|
2643
|
+
data.push(C$3, x1, y1, x2, y2, x, y);
|
|
2625
2644
|
},
|
|
2626
2645
|
quadraticCurveTo(data, x1, y1, x, y) {
|
|
2627
2646
|
data.push(Q$2, x1, y1, x, y);
|
|
2628
2647
|
},
|
|
2629
2648
|
closePath(data) {
|
|
2630
|
-
data.push(Z$
|
|
2649
|
+
data.push(Z$3);
|
|
2631
2650
|
},
|
|
2632
2651
|
rect(data, x, y, width, height) {
|
|
2633
2652
|
data.push(N$2, x, y, width, height);
|
|
@@ -2669,7 +2688,7 @@ const PathCommandDataHelper = {
|
|
|
2669
2688
|
}
|
|
2670
2689
|
},
|
|
2671
2690
|
arcTo(data, x1, y1, x2, y2, radius) {
|
|
2672
|
-
data.push(U$
|
|
2691
|
+
data.push(U$3, x1, y1, x2, y2, radius);
|
|
2673
2692
|
},
|
|
2674
2693
|
drawEllipse(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
|
|
2675
2694
|
if (rotation === undefined)
|
|
@@ -2679,7 +2698,7 @@ const PathCommandDataHelper = {
|
|
|
2679
2698
|
if (endAngle === undefined)
|
|
2680
2699
|
endAngle = 360;
|
|
2681
2700
|
BezierHelper.ellipse(null, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise, null, null, startPoint);
|
|
2682
|
-
data.push(M$
|
|
2701
|
+
data.push(M$3, startPoint.x, startPoint.y);
|
|
2683
2702
|
ellipse$3(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
|
|
2684
2703
|
},
|
|
2685
2704
|
drawArc(data, x, y, radius, startAngle, endAngle, anticlockwise) {
|
|
@@ -2688,7 +2707,7 @@ const PathCommandDataHelper = {
|
|
|
2688
2707
|
if (endAngle === undefined)
|
|
2689
2708
|
endAngle = 360;
|
|
2690
2709
|
BezierHelper.arc(null, x, y, radius, startAngle, endAngle, anticlockwise, null, null, startPoint);
|
|
2691
|
-
data.push(M$
|
|
2710
|
+
data.push(M$3, startPoint.x, startPoint.y);
|
|
2692
2711
|
arc$2(data, x, y, radius, startAngle, endAngle, anticlockwise);
|
|
2693
2712
|
},
|
|
2694
2713
|
drawPoints(data, points, curve, close) {
|
|
@@ -2765,7 +2784,7 @@ class PathCreator {
|
|
|
2765
2784
|
}
|
|
2766
2785
|
}
|
|
2767
2786
|
|
|
2768
|
-
const { M: M$
|
|
2787
|
+
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$1, O: O$1, P: P$1, U: U$2 } = PathCommandMap;
|
|
2769
2788
|
const debug$9 = Debug.get('PathDrawer');
|
|
2770
2789
|
const PathDrawer = {
|
|
2771
2790
|
drawPathByData(drawer, data) {
|
|
@@ -2776,15 +2795,15 @@ const PathDrawer = {
|
|
|
2776
2795
|
while (i < len) {
|
|
2777
2796
|
command = data[i];
|
|
2778
2797
|
switch (command) {
|
|
2779
|
-
case M$
|
|
2798
|
+
case M$2:
|
|
2780
2799
|
drawer.moveTo(data[i + 1], data[i + 2]);
|
|
2781
2800
|
i += 3;
|
|
2782
2801
|
break;
|
|
2783
|
-
case L$
|
|
2802
|
+
case L$3:
|
|
2784
2803
|
drawer.lineTo(data[i + 1], data[i + 2]);
|
|
2785
2804
|
i += 3;
|
|
2786
2805
|
break;
|
|
2787
|
-
case C$
|
|
2806
|
+
case C$2:
|
|
2788
2807
|
drawer.bezierCurveTo(data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], data[i + 6]);
|
|
2789
2808
|
i += 7;
|
|
2790
2809
|
break;
|
|
@@ -2792,7 +2811,7 @@ const PathDrawer = {
|
|
|
2792
2811
|
drawer.quadraticCurveTo(data[i + 1], data[i + 2], data[i + 3], data[i + 4]);
|
|
2793
2812
|
i += 5;
|
|
2794
2813
|
break;
|
|
2795
|
-
case Z$
|
|
2814
|
+
case Z$2:
|
|
2796
2815
|
drawer.closePath();
|
|
2797
2816
|
i += 1;
|
|
2798
2817
|
break;
|
|
@@ -2824,7 +2843,7 @@ const PathDrawer = {
|
|
|
2824
2843
|
drawer.arc(data[i + 1], data[i + 2], data[i + 3], 0, PI2, false);
|
|
2825
2844
|
i += 4;
|
|
2826
2845
|
break;
|
|
2827
|
-
case U$
|
|
2846
|
+
case U$2:
|
|
2828
2847
|
drawer.arcTo(data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5]);
|
|
2829
2848
|
i += 6;
|
|
2830
2849
|
break;
|
|
@@ -2836,7 +2855,7 @@ const PathDrawer = {
|
|
|
2836
2855
|
}
|
|
2837
2856
|
};
|
|
2838
2857
|
|
|
2839
|
-
const { M, L: L$
|
|
2858
|
+
const { M: M$1, L: L$2, C: C$1, Q, Z: Z$1, N, D, X, G, F, O, P, U: U$1 } = PathCommandMap;
|
|
2840
2859
|
const { toTwoPointBounds, toTwoPointBoundsByQuadraticCurve, arcTo, arc, ellipse: ellipse$1 } = BezierHelper;
|
|
2841
2860
|
const { add: add$1, copy: copy$6, addPoint, setPoint, addBounds, toBounds: toBounds$3 } = TwoPointBoundsHelper;
|
|
2842
2861
|
const debug$8 = Debug.get('PathBounds');
|
|
@@ -2858,7 +2877,7 @@ const PathBounds = {
|
|
|
2858
2877
|
while (i < len) {
|
|
2859
2878
|
command = data[i];
|
|
2860
2879
|
if (i === 0) {
|
|
2861
|
-
if (command === Z || command === C || command === Q) {
|
|
2880
|
+
if (command === Z$1 || command === C$1 || command === Q) {
|
|
2862
2881
|
setPoint(setPointBounds, x, y);
|
|
2863
2882
|
}
|
|
2864
2883
|
else {
|
|
@@ -2866,14 +2885,14 @@ const PathBounds = {
|
|
|
2866
2885
|
}
|
|
2867
2886
|
}
|
|
2868
2887
|
switch (command) {
|
|
2869
|
-
case M:
|
|
2870
|
-
case L$
|
|
2888
|
+
case M$1:
|
|
2889
|
+
case L$2:
|
|
2871
2890
|
x = data[i + 1];
|
|
2872
2891
|
y = data[i + 2];
|
|
2873
2892
|
addPoint(setPointBounds, x, y);
|
|
2874
2893
|
i += 3;
|
|
2875
2894
|
break;
|
|
2876
|
-
case C:
|
|
2895
|
+
case C$1:
|
|
2877
2896
|
toX = data[i + 5];
|
|
2878
2897
|
toY = data[i + 6];
|
|
2879
2898
|
toTwoPointBounds(x, y, data[i + 1], data[i + 2], data[i + 3], data[i + 4], toX, toY, tempPointBounds);
|
|
@@ -2893,7 +2912,7 @@ const PathBounds = {
|
|
|
2893
2912
|
y = toY;
|
|
2894
2913
|
i += 5;
|
|
2895
2914
|
break;
|
|
2896
|
-
case Z:
|
|
2915
|
+
case Z$1:
|
|
2897
2916
|
i += 1;
|
|
2898
2917
|
break;
|
|
2899
2918
|
case N:
|
|
@@ -2940,7 +2959,7 @@ const PathBounds = {
|
|
|
2940
2959
|
x += radius;
|
|
2941
2960
|
i += 4;
|
|
2942
2961
|
break;
|
|
2943
|
-
case U:
|
|
2962
|
+
case U$1:
|
|
2944
2963
|
arcTo(null, x, y, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], tempPointBounds, setEndPoint);
|
|
2945
2964
|
i === 0 ? copy$6(setPointBounds, tempPointBounds) : add$1(setPointBounds, tempPointBounds);
|
|
2946
2965
|
x = setEndPoint.x;
|
|
@@ -2955,9 +2974,60 @@ const PathBounds = {
|
|
|
2955
2974
|
}
|
|
2956
2975
|
};
|
|
2957
2976
|
|
|
2977
|
+
const { M, L: L$1, C, Z, U } = PathCommandMap;
|
|
2958
2978
|
const PathCorner = {
|
|
2959
|
-
smooth(data,
|
|
2960
|
-
|
|
2979
|
+
smooth(data, cornerRadius, _cornerSmoothing) {
|
|
2980
|
+
let command;
|
|
2981
|
+
let i = 0, x = 0, y = 0, startX, startY = 0, centerX = 0, centerY = 0;
|
|
2982
|
+
const len = data.length;
|
|
2983
|
+
const smooth = [];
|
|
2984
|
+
while (i < len) {
|
|
2985
|
+
command = data[i];
|
|
2986
|
+
switch (command) {
|
|
2987
|
+
case M:
|
|
2988
|
+
startX = data[i + 1];
|
|
2989
|
+
startY = data[i + 2];
|
|
2990
|
+
i += 3;
|
|
2991
|
+
if (data[i] === L$1) {
|
|
2992
|
+
centerX = startX + (data[i + 1] - startX) / 2;
|
|
2993
|
+
centerY = startY + (data[i + 2] - startY) / 2;
|
|
2994
|
+
smooth.push(M, centerX, centerY);
|
|
2995
|
+
}
|
|
2996
|
+
else {
|
|
2997
|
+
smooth.push(M, startX, startY);
|
|
2998
|
+
}
|
|
2999
|
+
break;
|
|
3000
|
+
case L$1:
|
|
3001
|
+
x = data[i + 1];
|
|
3002
|
+
y = data[i + 2];
|
|
3003
|
+
i += 3;
|
|
3004
|
+
switch (data[i]) {
|
|
3005
|
+
case L$1:
|
|
3006
|
+
smooth.push(U, x, y, data[i + 1], data[i + 2], cornerRadius);
|
|
3007
|
+
break;
|
|
3008
|
+
case Z:
|
|
3009
|
+
smooth.push(U, x, y, startX, startY, cornerRadius);
|
|
3010
|
+
break;
|
|
3011
|
+
default:
|
|
3012
|
+
smooth.push(L$1, x, y);
|
|
3013
|
+
}
|
|
3014
|
+
break;
|
|
3015
|
+
case C:
|
|
3016
|
+
smooth.push(C, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], data[i + 6]);
|
|
3017
|
+
i += 7;
|
|
3018
|
+
break;
|
|
3019
|
+
case Z:
|
|
3020
|
+
smooth.push(U, startX, startY, centerX, centerY, cornerRadius);
|
|
3021
|
+
smooth.push(Z);
|
|
3022
|
+
i += 1;
|
|
3023
|
+
break;
|
|
3024
|
+
}
|
|
3025
|
+
}
|
|
3026
|
+
if (command !== Z) {
|
|
3027
|
+
smooth[1] = startX;
|
|
3028
|
+
smooth[2] = startY;
|
|
3029
|
+
}
|
|
3030
|
+
return smooth;
|
|
2961
3031
|
}
|
|
2962
3032
|
};
|
|
2963
3033
|
|
|
@@ -3009,9 +3079,7 @@ class TaskItem {
|
|
|
3009
3079
|
}
|
|
3010
3080
|
|
|
3011
3081
|
class TaskProcessor {
|
|
3012
|
-
get total() {
|
|
3013
|
-
return this.list.length + this.delayNumber;
|
|
3014
|
-
}
|
|
3082
|
+
get total() { return this.list.length + this.delayNumber; }
|
|
3015
3083
|
get finishedIndex() {
|
|
3016
3084
|
return this.isComplete ? 0 : this.index + this.parallelSuccessNumber;
|
|
3017
3085
|
}
|
|
@@ -3067,8 +3135,10 @@ class TaskProcessor {
|
|
|
3067
3135
|
else {
|
|
3068
3136
|
this.delayNumber++;
|
|
3069
3137
|
setTimeout(() => {
|
|
3070
|
-
this.delayNumber
|
|
3071
|
-
|
|
3138
|
+
if (this.delayNumber) {
|
|
3139
|
+
this.delayNumber--;
|
|
3140
|
+
this.push(task, start);
|
|
3141
|
+
}
|
|
3072
3142
|
}, delay);
|
|
3073
3143
|
}
|
|
3074
3144
|
this.isComplete = false;
|
|
@@ -3085,6 +3155,7 @@ class TaskProcessor {
|
|
|
3085
3155
|
this.parallelSuccessNumber = 0;
|
|
3086
3156
|
this.list = [];
|
|
3087
3157
|
this.parallelList = [];
|
|
3158
|
+
this.delayNumber = 0;
|
|
3088
3159
|
}
|
|
3089
3160
|
start() {
|
|
3090
3161
|
if (!this.running) {
|
|
@@ -3257,6 +3328,23 @@ const ImageManager = {
|
|
|
3257
3328
|
list.length = 0;
|
|
3258
3329
|
}
|
|
3259
3330
|
},
|
|
3331
|
+
isPixel(config) {
|
|
3332
|
+
return FileHelper.opacityTypes.some(item => I$1.isFormat(item, config));
|
|
3333
|
+
},
|
|
3334
|
+
isFormat(format, config) {
|
|
3335
|
+
if (config.format === format)
|
|
3336
|
+
return true;
|
|
3337
|
+
const { url } = config;
|
|
3338
|
+
if (url.startsWith('data:')) {
|
|
3339
|
+
if (url.startsWith('data:' + FileHelper.mineType(format)))
|
|
3340
|
+
return true;
|
|
3341
|
+
}
|
|
3342
|
+
else {
|
|
3343
|
+
if (url.includes('.' + format) || url.includes('.' + FileHelper.upperCaseTypeMap[format]))
|
|
3344
|
+
return true;
|
|
3345
|
+
}
|
|
3346
|
+
return false;
|
|
3347
|
+
},
|
|
3260
3348
|
destroy() {
|
|
3261
3349
|
I$1.map = {};
|
|
3262
3350
|
}
|
|
@@ -3272,17 +3360,7 @@ class LeaferImage {
|
|
|
3272
3360
|
this.waitComplete = [];
|
|
3273
3361
|
this.innerId = create$1(IMAGE);
|
|
3274
3362
|
this.config = config || { url: '' };
|
|
3275
|
-
|
|
3276
|
-
if (url.startsWith('data:')) {
|
|
3277
|
-
if (url.startsWith('data:image/svg'))
|
|
3278
|
-
this.isSVG = true;
|
|
3279
|
-
}
|
|
3280
|
-
else {
|
|
3281
|
-
if (url.includes('.svg'))
|
|
3282
|
-
this.isSVG = true;
|
|
3283
|
-
}
|
|
3284
|
-
if (this.config.format === 'svg')
|
|
3285
|
-
this.isSVG = true;
|
|
3363
|
+
this.isSVG = ImageManager.isFormat('svg', config);
|
|
3286
3364
|
}
|
|
3287
3365
|
load(onSuccess, onError) {
|
|
3288
3366
|
if (!this.loading) {
|
|
@@ -3355,13 +3433,19 @@ class Event {
|
|
|
3355
3433
|
}
|
|
3356
3434
|
stopDefault() {
|
|
3357
3435
|
this.isStopDefault = true;
|
|
3436
|
+
if (this.origin)
|
|
3437
|
+
Platform.event.stopDefault(this.origin);
|
|
3358
3438
|
}
|
|
3359
3439
|
stopNow() {
|
|
3360
3440
|
this.isStopNow = true;
|
|
3361
3441
|
this.isStop = true;
|
|
3442
|
+
if (this.origin)
|
|
3443
|
+
Platform.event.stopNow(this.origin);
|
|
3362
3444
|
}
|
|
3363
3445
|
stop() {
|
|
3364
3446
|
this.isStop = true;
|
|
3447
|
+
if (this.origin)
|
|
3448
|
+
Platform.event.stop(this.origin);
|
|
3365
3449
|
}
|
|
3366
3450
|
}
|
|
3367
3451
|
|
|
@@ -3423,20 +3507,6 @@ class ResizeEvent extends Event {
|
|
|
3423
3507
|
}
|
|
3424
3508
|
ResizeEvent.RESIZE = 'resize';
|
|
3425
3509
|
|
|
3426
|
-
class TransformEvent extends Event {
|
|
3427
|
-
constructor(type, params) {
|
|
3428
|
-
super(type);
|
|
3429
|
-
if (params)
|
|
3430
|
-
Object.assign(this, params);
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
TransformEvent.START = 'transform.start';
|
|
3434
|
-
TransformEvent.CHANGE = 'transform.change';
|
|
3435
|
-
TransformEvent.END = 'transform.end';
|
|
3436
|
-
TransformEvent.BEFORE_START = 'transform.before_start';
|
|
3437
|
-
TransformEvent.BEFORE_CHANGE = 'transform.before_change';
|
|
3438
|
-
TransformEvent.BEFORE_END = 'transform.before_end';
|
|
3439
|
-
|
|
3440
3510
|
class WatchEvent extends Event {
|
|
3441
3511
|
constructor(type, data) {
|
|
3442
3512
|
super(type);
|
|
@@ -3537,15 +3607,15 @@ class UIEvent extends Event {
|
|
|
3537
3607
|
this.bubbles = true;
|
|
3538
3608
|
Object.assign(this, params);
|
|
3539
3609
|
}
|
|
3540
|
-
getInner(
|
|
3541
|
-
if (!
|
|
3542
|
-
|
|
3543
|
-
return
|
|
3610
|
+
getInner(relative) {
|
|
3611
|
+
if (!relative)
|
|
3612
|
+
relative = this.current;
|
|
3613
|
+
return relative.getInnerPoint(this);
|
|
3544
3614
|
}
|
|
3545
|
-
getLocal(
|
|
3546
|
-
if (!
|
|
3547
|
-
|
|
3548
|
-
return
|
|
3615
|
+
getLocal(relative) {
|
|
3616
|
+
if (!relative)
|
|
3617
|
+
relative = this.current;
|
|
3618
|
+
return relative.getLocalPoint(this);
|
|
3549
3619
|
}
|
|
3550
3620
|
static changeName(oldName, newName) {
|
|
3551
3621
|
EventCreator.changeName(oldName, newName);
|
|
@@ -3592,7 +3662,7 @@ function positionType(defaultValue) {
|
|
|
3592
3662
|
defineLeafAttr(target, key, defaultValue, {
|
|
3593
3663
|
set(value) {
|
|
3594
3664
|
this.__setAttr(key, value);
|
|
3595
|
-
this.__layout.
|
|
3665
|
+
this.__layout.matrixChanged || this.__layout.matrixChange();
|
|
3596
3666
|
}
|
|
3597
3667
|
});
|
|
3598
3668
|
};
|
|
@@ -3624,7 +3694,7 @@ function boundsType(defaultValue) {
|
|
|
3624
3694
|
this.__setAttr(key, value);
|
|
3625
3695
|
this.__layout.boxChanged || this.__layout.boxChange();
|
|
3626
3696
|
if (this.__.around)
|
|
3627
|
-
this.__layout.
|
|
3697
|
+
this.__layout.matrixChanged || this.__layout.matrixChange();
|
|
3628
3698
|
}
|
|
3629
3699
|
});
|
|
3630
3700
|
};
|
|
@@ -3860,29 +3930,36 @@ PointerEvent.CLICK = 'click';
|
|
|
3860
3930
|
PointerEvent.DOUBLE_CLICK = 'double_click';
|
|
3861
3931
|
PointerEvent.LONG_PRESS = 'long_press';
|
|
3862
3932
|
PointerEvent.LONG_TAP = 'long_tap';
|
|
3933
|
+
PointerEvent.MENU = 'pointer.menu';
|
|
3863
3934
|
PointerEvent = __decorate([
|
|
3864
3935
|
registerUIEvent()
|
|
3865
3936
|
], PointerEvent);
|
|
3866
3937
|
|
|
3867
3938
|
const move = {};
|
|
3868
3939
|
let DragEvent = class DragEvent extends PointerEvent {
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3940
|
+
static setList(data) {
|
|
3941
|
+
this.list = data instanceof LeafList ? data : new LeafList(data);
|
|
3942
|
+
}
|
|
3943
|
+
static setData(data) {
|
|
3944
|
+
this.data = data;
|
|
3945
|
+
}
|
|
3946
|
+
getInnerMove(relative, total) {
|
|
3947
|
+
if (!relative)
|
|
3948
|
+
relative = this.current;
|
|
3872
3949
|
this.assignMove(total);
|
|
3873
|
-
return
|
|
3950
|
+
return relative.getInnerPoint(move, null, true);
|
|
3874
3951
|
}
|
|
3875
|
-
getLocalMove(
|
|
3876
|
-
if (!
|
|
3877
|
-
|
|
3952
|
+
getLocalMove(relative, total) {
|
|
3953
|
+
if (!relative)
|
|
3954
|
+
relative = this.current;
|
|
3878
3955
|
this.assignMove(total);
|
|
3879
|
-
return
|
|
3956
|
+
return relative.getLocalPoint(move, null, true);
|
|
3880
3957
|
}
|
|
3881
|
-
getInnerTotal(
|
|
3882
|
-
return this.getInnerMove(
|
|
3958
|
+
getInnerTotal(relative) {
|
|
3959
|
+
return this.getInnerMove(relative, true);
|
|
3883
3960
|
}
|
|
3884
|
-
getLocalTotal(
|
|
3885
|
-
return this.getLocalMove(
|
|
3961
|
+
getLocalTotal(relative) {
|
|
3962
|
+
return this.getLocalMove(relative, true);
|
|
3886
3963
|
}
|
|
3887
3964
|
assignMove(total) {
|
|
3888
3965
|
move.x = total ? this.totalX : this.moveX;
|
|
@@ -3901,17 +3978,16 @@ DragEvent = __decorate([
|
|
|
3901
3978
|
registerUIEvent()
|
|
3902
3979
|
], DragEvent);
|
|
3903
3980
|
|
|
3904
|
-
|
|
3905
|
-
let DropEvent = DropEvent_1 = class DropEvent extends PointerEvent {
|
|
3981
|
+
let DropEvent = class DropEvent extends PointerEvent {
|
|
3906
3982
|
static setList(data) {
|
|
3907
|
-
|
|
3983
|
+
DragEvent.setList(data);
|
|
3908
3984
|
}
|
|
3909
3985
|
static setData(data) {
|
|
3910
|
-
|
|
3986
|
+
DragEvent.setData(data);
|
|
3911
3987
|
}
|
|
3912
3988
|
};
|
|
3913
3989
|
DropEvent.DROP = 'drop';
|
|
3914
|
-
DropEvent =
|
|
3990
|
+
DropEvent = __decorate([
|
|
3915
3991
|
registerUIEvent()
|
|
3916
3992
|
], DropEvent);
|
|
3917
3993
|
|
|
@@ -4018,7 +4094,6 @@ class Transformer {
|
|
|
4018
4094
|
this.moveEnd();
|
|
4019
4095
|
this.zoomEnd();
|
|
4020
4096
|
this.rotateEnd();
|
|
4021
|
-
this.transformMode = null;
|
|
4022
4097
|
}
|
|
4023
4098
|
moveEnd() {
|
|
4024
4099
|
if (this.moveData) {
|
|
@@ -4043,7 +4118,7 @@ class Transformer {
|
|
|
4043
4118
|
}
|
|
4044
4119
|
}
|
|
4045
4120
|
|
|
4046
|
-
const { copy: copy$5,
|
|
4121
|
+
const { copy: copy$5, toInnerPoint: toInnerPoint$1, scaleOfOuter: scaleOfOuter$3, rotateOfOuter: rotateOfOuter$3, skewOfOuter } = MatrixHelper;
|
|
4047
4122
|
const matrix = {};
|
|
4048
4123
|
const LeafHelper = {
|
|
4049
4124
|
updateAllWorldMatrix(leaf) {
|
|
@@ -4086,63 +4161,41 @@ const LeafHelper = {
|
|
|
4086
4161
|
return true;
|
|
4087
4162
|
},
|
|
4088
4163
|
moveWorld(t, x, y) {
|
|
4089
|
-
t.__layout.checkUpdate();
|
|
4090
4164
|
const local = { x, y };
|
|
4091
4165
|
if (t.parent)
|
|
4092
|
-
toInnerPoint$1(t.parent.
|
|
4166
|
+
toInnerPoint$1(t.parent.worldTransform, local, local, true);
|
|
4093
4167
|
L.moveLocal(t, local.x, local.y);
|
|
4094
4168
|
},
|
|
4095
4169
|
moveLocal(t, x, y = 0) {
|
|
4096
4170
|
t.x += x;
|
|
4097
4171
|
t.y += y;
|
|
4098
4172
|
},
|
|
4099
|
-
zoomOfWorld(t, origin, scaleX, scaleY
|
|
4100
|
-
|
|
4101
|
-
const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin;
|
|
4102
|
-
this.zoomOfLocal(t, local, scaleX, scaleY, moveLayer);
|
|
4173
|
+
zoomOfWorld(t, origin, scaleX, scaleY) {
|
|
4174
|
+
this.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY);
|
|
4103
4175
|
},
|
|
4104
|
-
zoomOfLocal(t, origin, scaleX, scaleY = scaleX
|
|
4176
|
+
zoomOfLocal(t, origin, scaleX, scaleY = scaleX) {
|
|
4105
4177
|
copy$5(matrix, t.__local);
|
|
4106
|
-
if (moveLayer)
|
|
4107
|
-
translate$2(matrix, moveLayer.x, moveLayer.y);
|
|
4108
4178
|
scaleOfOuter$3(matrix, origin, scaleX, scaleY);
|
|
4109
|
-
|
|
4110
|
-
moveLayer = t;
|
|
4111
|
-
moveLayer.x += matrix.e - t.__local.e;
|
|
4112
|
-
moveLayer.y += matrix.f - t.__local.f;
|
|
4179
|
+
moveByMatrix(t, matrix);
|
|
4113
4180
|
t.scaleX *= scaleX;
|
|
4114
4181
|
t.scaleY *= scaleY;
|
|
4115
4182
|
},
|
|
4116
|
-
rotateOfWorld(t, origin, angle
|
|
4117
|
-
|
|
4118
|
-
const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin;
|
|
4119
|
-
this.rotateOfLocal(t, local, angle, moveLayer);
|
|
4183
|
+
rotateOfWorld(t, origin, angle) {
|
|
4184
|
+
this.rotateOfLocal(t, getTempLocal(t, origin), angle);
|
|
4120
4185
|
},
|
|
4121
|
-
rotateOfLocal(t, origin, angle
|
|
4186
|
+
rotateOfLocal(t, origin, angle) {
|
|
4122
4187
|
copy$5(matrix, t.__local);
|
|
4123
|
-
if (moveLayer)
|
|
4124
|
-
translate$2(matrix, moveLayer.x, moveLayer.y);
|
|
4125
4188
|
rotateOfOuter$3(matrix, origin, angle);
|
|
4126
|
-
|
|
4127
|
-
moveLayer = t;
|
|
4128
|
-
moveLayer.x += matrix.e - t.__local.e;
|
|
4129
|
-
moveLayer.y += matrix.f - t.__local.f;
|
|
4189
|
+
moveByMatrix(t, matrix);
|
|
4130
4190
|
t.rotation = MathHelper.formatRotation(t.rotation + angle);
|
|
4131
4191
|
},
|
|
4132
|
-
skewOfWorld(t, origin, skewX, skewY
|
|
4133
|
-
|
|
4134
|
-
const local = t.parent ? PointHelper.tempToInnerOf(origin, t.parent.__world) : origin;
|
|
4135
|
-
this.skewOfLocal(t, local, skewX, skewY, moveLayer);
|
|
4192
|
+
skewOfWorld(t, origin, skewX, skewY) {
|
|
4193
|
+
this.skewOfLocal(t, getTempLocal(t, origin), skewX, skewY);
|
|
4136
4194
|
},
|
|
4137
|
-
skewOfLocal(t, origin, skewX, skewY
|
|
4195
|
+
skewOfLocal(t, origin, skewX, skewY) {
|
|
4138
4196
|
copy$5(matrix, t.__local);
|
|
4139
|
-
if (moveLayer)
|
|
4140
|
-
translate$2(matrix, moveLayer.x, moveLayer.y);
|
|
4141
4197
|
skewOfOuter(matrix, origin, skewX, skewY);
|
|
4142
|
-
|
|
4143
|
-
moveLayer = t;
|
|
4144
|
-
moveLayer.x = matrix.e - t.__local.e;
|
|
4145
|
-
moveLayer.y = matrix.f - t.__local.f;
|
|
4198
|
+
moveByMatrix(t, matrix);
|
|
4146
4199
|
t.skewX = MathHelper.formatSkew(t.skewX + skewX);
|
|
4147
4200
|
t.skewY = MathHelper.formatSkew(t.skewY + skewY);
|
|
4148
4201
|
},
|
|
@@ -4152,10 +4205,29 @@ const LeafHelper = {
|
|
|
4152
4205
|
parent.worldToInner(position);
|
|
4153
4206
|
t.set(position);
|
|
4154
4207
|
parent.add(t);
|
|
4208
|
+
},
|
|
4209
|
+
hasParent(t, parent) {
|
|
4210
|
+
if (!parent)
|
|
4211
|
+
return false;
|
|
4212
|
+
let p = t;
|
|
4213
|
+
while (p) {
|
|
4214
|
+
if (parent === p)
|
|
4215
|
+
return true;
|
|
4216
|
+
p = p.parent;
|
|
4217
|
+
}
|
|
4218
|
+
return false;
|
|
4155
4219
|
}
|
|
4156
4220
|
};
|
|
4157
4221
|
const L = LeafHelper;
|
|
4158
4222
|
const { updateAllWorldMatrix: updateAllWorldMatrix$2, updateAllWorldOpacity: updateAllWorldOpacity$1, updateAllChange: updateAllChange$1 } = L;
|
|
4223
|
+
function moveByMatrix(t, matrix) {
|
|
4224
|
+
t.x += matrix.e - t.__local.e;
|
|
4225
|
+
t.y += matrix.f - t.__local.f;
|
|
4226
|
+
}
|
|
4227
|
+
function getTempLocal(t, world) {
|
|
4228
|
+
t.__layout.checkUpdate();
|
|
4229
|
+
return t.parent ? PointHelper.tempToInnerOf(world, t.parent.__world) : world;
|
|
4230
|
+
}
|
|
4159
4231
|
|
|
4160
4232
|
const LeafBoundsHelper = {
|
|
4161
4233
|
worldBounds(target) {
|
|
@@ -4317,7 +4389,8 @@ const InteractionHelper = {
|
|
|
4317
4389
|
};
|
|
4318
4390
|
const I = InteractionHelper;
|
|
4319
4391
|
|
|
4320
|
-
const
|
|
4392
|
+
const emptyList = new LeafList();
|
|
4393
|
+
const { getDragEventData, getDropEventData, getSwipeEventData } = InteractionHelper;
|
|
4321
4394
|
class Dragger {
|
|
4322
4395
|
constructor(interaction) {
|
|
4323
4396
|
this.interaction = interaction;
|
|
@@ -4325,8 +4398,8 @@ class Dragger {
|
|
|
4325
4398
|
setDragData(data) {
|
|
4326
4399
|
this.dragData = getDragEventData(data, data, data);
|
|
4327
4400
|
}
|
|
4328
|
-
|
|
4329
|
-
return this.dragging ?
|
|
4401
|
+
getList() {
|
|
4402
|
+
return this.dragging ? (DragEvent.list || this.interaction.selector.list || this.dragableList || emptyList) : emptyList;
|
|
4330
4403
|
}
|
|
4331
4404
|
checkDrag(data, canDrag) {
|
|
4332
4405
|
const { interaction } = this;
|
|
@@ -4355,7 +4428,7 @@ class Dragger {
|
|
|
4355
4428
|
interaction.emit(MoveEvent.MOVE, this.dragData);
|
|
4356
4429
|
}
|
|
4357
4430
|
else if (this.dragging) {
|
|
4358
|
-
this.
|
|
4431
|
+
this.realDrag();
|
|
4359
4432
|
interaction.emit(DragEvent.BEFORE_DRAG, this.dragData);
|
|
4360
4433
|
interaction.emit(DragEvent.DRAG, this.dragData);
|
|
4361
4434
|
}
|
|
@@ -4366,9 +4439,6 @@ class Dragger {
|
|
|
4366
4439
|
if (this.dragging) {
|
|
4367
4440
|
this.interaction.emit(DragEvent.START, this.dragData);
|
|
4368
4441
|
this.getDragableList(this.dragData.path);
|
|
4369
|
-
this.dragList = filterPathByEventType(this.dragData.path, DragEvent.DRAG);
|
|
4370
|
-
if (!this.dragList.length && this.dragableList)
|
|
4371
|
-
this.dragList.pushList(this.dragableList);
|
|
4372
4442
|
}
|
|
4373
4443
|
}
|
|
4374
4444
|
}
|
|
@@ -4377,16 +4447,17 @@ class Dragger {
|
|
|
4377
4447
|
for (let i = 0, len = path.length; i < len; i++) {
|
|
4378
4448
|
leaf = path.list[i];
|
|
4379
4449
|
if (leaf.__.draggable && leaf.__.hitSelf) {
|
|
4380
|
-
this.dragableList =
|
|
4450
|
+
this.dragableList = new LeafList(leaf);
|
|
4381
4451
|
break;
|
|
4382
4452
|
}
|
|
4383
4453
|
}
|
|
4384
4454
|
}
|
|
4385
|
-
|
|
4455
|
+
realDrag() {
|
|
4386
4456
|
const { running } = this.interaction;
|
|
4387
|
-
|
|
4457
|
+
const list = this.getList();
|
|
4458
|
+
if (list.length && running) {
|
|
4388
4459
|
const { moveX, moveY } = this.dragData;
|
|
4389
|
-
|
|
4460
|
+
list.forEach(leaf => {
|
|
4390
4461
|
LeafHelper.moveWorld(leaf, moveX, moveY);
|
|
4391
4462
|
});
|
|
4392
4463
|
}
|
|
@@ -4443,20 +4514,14 @@ class Dragger {
|
|
|
4443
4514
|
}
|
|
4444
4515
|
}
|
|
4445
4516
|
drop(data) {
|
|
4446
|
-
const dropData = getDropEventData(data, this.
|
|
4517
|
+
const dropData = getDropEventData(data, this.getList(), DragEvent.data);
|
|
4447
4518
|
dropData.path = this.dragEnterPath;
|
|
4448
4519
|
this.interaction.emit(DropEvent.DROP, dropData);
|
|
4449
4520
|
this.interaction.emit(DragEvent.LEAVE, data, this.dragEnterPath);
|
|
4450
4521
|
}
|
|
4451
4522
|
dragReset() {
|
|
4452
|
-
|
|
4453
|
-
this.
|
|
4454
|
-
this.dragableList = null;
|
|
4455
|
-
this.dragData = null;
|
|
4456
|
-
this.dragOverPath = null;
|
|
4457
|
-
this.dragEnterPath = null;
|
|
4458
|
-
this.dragging = null;
|
|
4459
|
-
this.moving = null;
|
|
4523
|
+
DragEvent.list = DragEvent.data = this.dragableList = this.dragData = this.dragOverPath = this.dragEnterPath = null;
|
|
4524
|
+
this.dragging = this.moving = false;
|
|
4460
4525
|
}
|
|
4461
4526
|
checkDragOut(data) {
|
|
4462
4527
|
const { interaction } = this;
|
|
@@ -4692,6 +4757,10 @@ class InteractionBase {
|
|
|
4692
4757
|
this.zoom(getZoomEventData(center, scale, data));
|
|
4693
4758
|
this.move(getMoveEventData(center, move, data));
|
|
4694
4759
|
}
|
|
4760
|
+
menu(data) {
|
|
4761
|
+
this.findPath(data);
|
|
4762
|
+
this.emit(PointerEvent.MENU, data);
|
|
4763
|
+
}
|
|
4695
4764
|
move(data) {
|
|
4696
4765
|
this.transformer.move(data);
|
|
4697
4766
|
}
|
|
@@ -4801,6 +4870,9 @@ class InteractionBase {
|
|
|
4801
4870
|
data.path = find.path;
|
|
4802
4871
|
return find.path;
|
|
4803
4872
|
}
|
|
4873
|
+
isDrag(leaf) {
|
|
4874
|
+
return this.dragger.getList().has(leaf);
|
|
4875
|
+
}
|
|
4804
4876
|
updateDownData(data) {
|
|
4805
4877
|
if (!data)
|
|
4806
4878
|
data = this.downData;
|
|
@@ -4814,7 +4886,7 @@ class InteractionBase {
|
|
|
4814
4886
|
data = this.hoverData;
|
|
4815
4887
|
if (!data)
|
|
4816
4888
|
return;
|
|
4817
|
-
this.findPath(data, { exclude: this.dragger.
|
|
4889
|
+
this.findPath(data, { exclude: this.dragger.getList(), name: PointerEvent.MOVE });
|
|
4818
4890
|
this.hoverData = data;
|
|
4819
4891
|
}
|
|
4820
4892
|
updateCursor(data) {
|
|
@@ -4934,7 +5006,7 @@ class LeafLayout {
|
|
|
4934
5006
|
this.renderBounds = this.strokeBounds = this.boxBounds = { x: 0, y: 0, width: 0, height: 0 };
|
|
4935
5007
|
this.localRenderBounds = this.localStrokeBounds = leaf.__local;
|
|
4936
5008
|
this.boxChange();
|
|
4937
|
-
this.
|
|
5009
|
+
this.matrixChange();
|
|
4938
5010
|
}
|
|
4939
5011
|
checkUpdate(force) {
|
|
4940
5012
|
const { leafer } = this.leaf;
|
|
@@ -5061,11 +5133,6 @@ class LeafLayout {
|
|
|
5061
5133
|
this.renderSpread || (this.renderSpread = 1);
|
|
5062
5134
|
this.boundsChanged = true;
|
|
5063
5135
|
}
|
|
5064
|
-
positionChange() {
|
|
5065
|
-
this.positionChanged = true;
|
|
5066
|
-
this.matrixChanged = true;
|
|
5067
|
-
this.localBoxChanged || this.localBoxChange();
|
|
5068
|
-
}
|
|
5069
5136
|
scaleChange() {
|
|
5070
5137
|
this.scaleChanged = true;
|
|
5071
5138
|
this._scaleOrRotationChange();
|
|
@@ -5077,6 +5144,9 @@ class LeafLayout {
|
|
|
5077
5144
|
}
|
|
5078
5145
|
_scaleOrRotationChange() {
|
|
5079
5146
|
this.affectScaleOrRotation = true;
|
|
5147
|
+
this.matrixChange();
|
|
5148
|
+
}
|
|
5149
|
+
matrixChange() {
|
|
5080
5150
|
this.matrixChanged = true;
|
|
5081
5151
|
this.localBoxChanged || this.localBoxChange();
|
|
5082
5152
|
}
|
|
@@ -5219,10 +5289,13 @@ function __getListenerMap(eventer, capture, create) {
|
|
|
5219
5289
|
const LeafDataProxy = {
|
|
5220
5290
|
__setAttr(name, newValue) {
|
|
5221
5291
|
if (this.leafer && this.leafer.created) {
|
|
5222
|
-
|
|
5292
|
+
const oldValue = this.__.__getInput(name);
|
|
5293
|
+
if (typeof newValue === 'object' || oldValue !== newValue) {
|
|
5223
5294
|
this.__[name] = newValue;
|
|
5295
|
+
if (this.proxyData)
|
|
5296
|
+
this.setProxyAttr(name, newValue);
|
|
5224
5297
|
const { CHANGE } = PropertyEvent;
|
|
5225
|
-
const event = new PropertyEvent(CHANGE, this, name,
|
|
5298
|
+
const event = new PropertyEvent(CHANGE, this, name, oldValue, newValue);
|
|
5226
5299
|
if (this.hasEvent(CHANGE) && !this.isLeafer)
|
|
5227
5300
|
this.emitEvent(event);
|
|
5228
5301
|
this.leafer.emitEvent(event);
|
|
@@ -5230,10 +5303,21 @@ const LeafDataProxy = {
|
|
|
5230
5303
|
}
|
|
5231
5304
|
else {
|
|
5232
5305
|
this.__[name] = newValue;
|
|
5306
|
+
if (this.proxyData)
|
|
5307
|
+
this.setProxyAttr(name, newValue);
|
|
5233
5308
|
}
|
|
5234
5309
|
},
|
|
5235
5310
|
__getAttr(name) {
|
|
5311
|
+
if (this.proxyData)
|
|
5312
|
+
return this.getProxyAttr(name);
|
|
5236
5313
|
return this.__.__get(name);
|
|
5314
|
+
},
|
|
5315
|
+
setProxyAttr(name, newValue) {
|
|
5316
|
+
if (this.proxyData[name] !== newValue)
|
|
5317
|
+
this.proxyData[name] = newValue;
|
|
5318
|
+
},
|
|
5319
|
+
getProxyAttr(name) {
|
|
5320
|
+
return this.proxyData[name];
|
|
5237
5321
|
}
|
|
5238
5322
|
};
|
|
5239
5323
|
|
|
@@ -5313,17 +5397,17 @@ const LeafMatrix = {
|
|
|
5313
5397
|
}
|
|
5314
5398
|
}
|
|
5315
5399
|
}
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5400
|
+
const { x, y, around } = this.__;
|
|
5401
|
+
r.e = x;
|
|
5402
|
+
r.f = y;
|
|
5403
|
+
if (around) {
|
|
5404
|
+
const { width, height } = this.__;
|
|
5405
|
+
if (width && height) {
|
|
5321
5406
|
const origin = (around === 'center') ? defaultCenter : around;
|
|
5322
5407
|
const offsetX = width * origin.x, offsetY = height * origin.y;
|
|
5323
5408
|
r.e -= offsetX * r.a + offsetY * r.c;
|
|
5324
5409
|
r.f -= offsetX * r.b + offsetY * r.d;
|
|
5325
5410
|
}
|
|
5326
|
-
layout.positionChanged = false;
|
|
5327
5411
|
}
|
|
5328
5412
|
this.__layout.matrixChanged = false;
|
|
5329
5413
|
}
|
|
@@ -5418,7 +5502,7 @@ const LeafBounds = {
|
|
|
5418
5502
|
data.__naturalWidth = layout.boxBounds.width;
|
|
5419
5503
|
data.__naturalHeight = layout.boxBounds.height;
|
|
5420
5504
|
if (this.around) {
|
|
5421
|
-
layout.
|
|
5505
|
+
layout.matrixChanged = true;
|
|
5422
5506
|
this.__updateWorldMatrix();
|
|
5423
5507
|
}
|
|
5424
5508
|
},
|
|
@@ -5443,6 +5527,10 @@ const LeafHit = {
|
|
|
5443
5527
|
setRadius(point, this.__.hitRadius);
|
|
5444
5528
|
}
|
|
5445
5529
|
toInnerRadiusPointOf(point, this.__world, inner);
|
|
5530
|
+
if (this.__.hitBox) {
|
|
5531
|
+
if (BoundsHelper.hitRadiusPoint(this.__layout.boxBounds, inner))
|
|
5532
|
+
return true;
|
|
5533
|
+
}
|
|
5446
5534
|
return this.__hit(inner);
|
|
5447
5535
|
},
|
|
5448
5536
|
__drawHitPath(canvas) {
|
|
@@ -5486,12 +5574,21 @@ const LeafMask = {
|
|
|
5486
5574
|
__updateMask(value) {
|
|
5487
5575
|
this.__hasMask = value ? true : this.children.some(item => item.__.isMask);
|
|
5488
5576
|
},
|
|
5489
|
-
__renderMask(canvas, content, mask) {
|
|
5577
|
+
__renderMask(canvas, content, mask, recycle) {
|
|
5578
|
+
content.opacity = 1;
|
|
5490
5579
|
content.resetTransform();
|
|
5491
5580
|
content.useMask(mask);
|
|
5492
|
-
canvas.resetTransform();
|
|
5493
5581
|
canvas.opacity = this.__worldOpacity;
|
|
5582
|
+
canvas.resetTransform();
|
|
5494
5583
|
canvas.copyWorld(content);
|
|
5584
|
+
if (recycle) {
|
|
5585
|
+
content.recycle();
|
|
5586
|
+
mask.recycle();
|
|
5587
|
+
}
|
|
5588
|
+
else {
|
|
5589
|
+
content.clear();
|
|
5590
|
+
mask.clear();
|
|
5591
|
+
}
|
|
5495
5592
|
},
|
|
5496
5593
|
__removeMask(child) {
|
|
5497
5594
|
if (child) {
|
|
@@ -5546,15 +5643,13 @@ const BranchRender = {
|
|
|
5546
5643
|
const { children } = this;
|
|
5547
5644
|
if (this.__hasMask && children.length > 1) {
|
|
5548
5645
|
let mask;
|
|
5549
|
-
|
|
5550
|
-
|
|
5646
|
+
const maskCanvas = canvas.getSameCanvas();
|
|
5647
|
+
const contentCanvas = canvas.getSameCanvas();
|
|
5551
5648
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
5552
5649
|
child = children[i];
|
|
5553
5650
|
if (child.isMask) {
|
|
5554
5651
|
if (mask) {
|
|
5555
5652
|
this.__renderMask(canvas, contentCanvas, maskCanvas);
|
|
5556
|
-
maskCanvas.clear();
|
|
5557
|
-
contentCanvas.clear();
|
|
5558
5653
|
}
|
|
5559
5654
|
else {
|
|
5560
5655
|
mask = true;
|
|
@@ -5562,11 +5657,9 @@ const BranchRender = {
|
|
|
5562
5657
|
child.__render(maskCanvas, options);
|
|
5563
5658
|
continue;
|
|
5564
5659
|
}
|
|
5565
|
-
child.__render(contentCanvas, options);
|
|
5660
|
+
child.__render(mask ? contentCanvas : canvas, options);
|
|
5566
5661
|
}
|
|
5567
|
-
this.__renderMask(canvas, contentCanvas, maskCanvas);
|
|
5568
|
-
maskCanvas.recycle();
|
|
5569
|
-
contentCanvas.recycle();
|
|
5662
|
+
this.__renderMask(canvas, contentCanvas, maskCanvas, true);
|
|
5570
5663
|
}
|
|
5571
5664
|
else {
|
|
5572
5665
|
const { bounds, hideBounds } = options;
|
|
@@ -5606,11 +5699,16 @@ let Leaf = class Leaf {
|
|
|
5606
5699
|
get __ignoreHitWorld() { return (this.__hasMask || this.__hasEraser) && this.__.hitChildren; }
|
|
5607
5700
|
constructor(data) {
|
|
5608
5701
|
this.innerId = create(LEAF);
|
|
5702
|
+
this.reset(data);
|
|
5703
|
+
}
|
|
5704
|
+
reset(data) {
|
|
5609
5705
|
this.__world = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0, x: 0, y: 0, width: 0, height: 0, scaleX: 1, scaleY: 1, rotation: 0, skewX: 0, skewY: 0 };
|
|
5610
5706
|
this.__local = { a: 1, b: 0, c: 0, d: 1, e: 0, f: 0, x: 0, y: 0, width: 0, height: 0 };
|
|
5611
5707
|
this.__worldOpacity = 1;
|
|
5612
5708
|
this.__ = new this.__DataProcessor(this);
|
|
5613
5709
|
this.__layout = new this.__LayoutProcessor(this);
|
|
5710
|
+
if (this.__level)
|
|
5711
|
+
this.resetCustom();
|
|
5614
5712
|
if (data) {
|
|
5615
5713
|
if (data.children) {
|
|
5616
5714
|
this.set(data);
|
|
@@ -5620,6 +5718,10 @@ let Leaf = class Leaf {
|
|
|
5620
5718
|
}
|
|
5621
5719
|
}
|
|
5622
5720
|
}
|
|
5721
|
+
resetCustom() {
|
|
5722
|
+
this.__hasMask = this.__hasEraser = null;
|
|
5723
|
+
this.forceUpdate();
|
|
5724
|
+
}
|
|
5623
5725
|
waitParent(item) {
|
|
5624
5726
|
this.parent ? item() : (this.__parentWait ? this.__parentWait.push(item) : this.__parentWait = [item]);
|
|
5625
5727
|
}
|
|
@@ -5634,8 +5736,11 @@ let Leaf = class Leaf {
|
|
|
5634
5736
|
if (leafer !== null)
|
|
5635
5737
|
leafer = this;
|
|
5636
5738
|
}
|
|
5739
|
+
if (this.leafer && !leafer)
|
|
5740
|
+
this.leafer.leafs--;
|
|
5637
5741
|
this.leafer = leafer;
|
|
5638
5742
|
if (leafer) {
|
|
5743
|
+
leafer.leafs++;
|
|
5639
5744
|
this.__level = this.parent ? this.parent.__level + 1 : 1;
|
|
5640
5745
|
if (this.__leaferWait)
|
|
5641
5746
|
WaitHelper.run(this.__leaferWait);
|
|
@@ -5648,6 +5753,7 @@ let Leaf = class Leaf {
|
|
|
5648
5753
|
}
|
|
5649
5754
|
}
|
|
5650
5755
|
set(_data) { }
|
|
5756
|
+
get(_options) { return undefined; }
|
|
5651
5757
|
toJSON() {
|
|
5652
5758
|
return this.__.__getInputData();
|
|
5653
5759
|
}
|
|
@@ -5656,9 +5762,13 @@ let Leaf = class Leaf {
|
|
|
5656
5762
|
}
|
|
5657
5763
|
__setAttr(_attrName, _newValue) { }
|
|
5658
5764
|
__getAttr(_attrName) { return undefined; }
|
|
5765
|
+
setProxyAttr(_attrName, _newValue) { }
|
|
5766
|
+
getProxyAttr(_attrName) { return undefined; }
|
|
5767
|
+
find(_condition) { return undefined; }
|
|
5768
|
+
findOne(_condition) { return undefined; }
|
|
5659
5769
|
forceUpdate(attrName) {
|
|
5660
5770
|
if (attrName === undefined)
|
|
5661
|
-
attrName = '
|
|
5771
|
+
attrName = 'width';
|
|
5662
5772
|
else if (attrName === 'surface')
|
|
5663
5773
|
attrName = 'blendMode';
|
|
5664
5774
|
const value = this.__.__getInput(attrName);
|
|
@@ -5680,7 +5790,7 @@ let Leaf = class Leaf {
|
|
|
5680
5790
|
__onUpdateSize() { }
|
|
5681
5791
|
__updateEraser(_value) { }
|
|
5682
5792
|
__updateMask(_value) { }
|
|
5683
|
-
__renderMask(_canvas, _content, _mask) { }
|
|
5793
|
+
__renderMask(_canvas, _content, _mask, _recycle) { }
|
|
5684
5794
|
__removeMask(_child) { }
|
|
5685
5795
|
getWorld(attrName) {
|
|
5686
5796
|
this.__layout.checkUpdate();
|
|
@@ -5865,7 +5975,7 @@ let Branch = class Branch extends Leaf {
|
|
|
5865
5975
|
index === undefined ? this.children.push(child) : this.children.splice(index, 0, child);
|
|
5866
5976
|
if (child.isBranch)
|
|
5867
5977
|
this.__.__childBranchNumber = (this.__.__childBranchNumber || 0) + 1;
|
|
5868
|
-
child.__layout.boundsChanged || child.__layout.
|
|
5978
|
+
child.__layout.boundsChanged || child.__layout.matrixChange();
|
|
5869
5979
|
if (child.__parentWait)
|
|
5870
5980
|
WaitHelper.run(child.__parentWait);
|
|
5871
5981
|
if (this.leafer) {
|
|
@@ -6084,7 +6194,7 @@ function updateMatrix(updateList, levelList) {
|
|
|
6084
6194
|
let layout;
|
|
6085
6195
|
updateList.list.forEach(leaf => {
|
|
6086
6196
|
layout = leaf.__layout;
|
|
6087
|
-
if (levelList.without(leaf) && !layout.
|
|
6197
|
+
if (levelList.without(leaf) && !layout.proxyZoom) {
|
|
6088
6198
|
if (layout.matrixChanged) {
|
|
6089
6199
|
updateAllWorldMatrix$1(leaf);
|
|
6090
6200
|
levelList.push(leaf);
|
|
@@ -6403,8 +6513,7 @@ class Renderer {
|
|
|
6403
6513
|
const { canvas, updateBlocks: list } = this;
|
|
6404
6514
|
if (!list)
|
|
6405
6515
|
return debug$3.warn('PartRender: need update attr');
|
|
6406
|
-
|
|
6407
|
-
this.mergeBlocks();
|
|
6516
|
+
this.mergeBlocks();
|
|
6408
6517
|
list.forEach(block => { if (canvas.bounds.hit(block) && !block.isEmpty())
|
|
6409
6518
|
this.clipRender(block); });
|
|
6410
6519
|
}
|
|
@@ -6423,7 +6532,7 @@ class Renderer {
|
|
|
6423
6532
|
canvas.clearWorld(bounds, true);
|
|
6424
6533
|
canvas.clipWorld(bounds, true);
|
|
6425
6534
|
}
|
|
6426
|
-
this.__render(bounds, realBounds);
|
|
6535
|
+
this.__render(bounds, includes, realBounds);
|
|
6427
6536
|
canvas.restore();
|
|
6428
6537
|
Run.end(t);
|
|
6429
6538
|
}
|
|
@@ -6432,12 +6541,12 @@ class Renderer {
|
|
|
6432
6541
|
const { canvas } = this;
|
|
6433
6542
|
canvas.save();
|
|
6434
6543
|
canvas.clear();
|
|
6435
|
-
this.__render(canvas.bounds);
|
|
6544
|
+
this.__render(canvas.bounds, true);
|
|
6436
6545
|
canvas.restore();
|
|
6437
6546
|
Run.end(t);
|
|
6438
6547
|
}
|
|
6439
|
-
__render(bounds, realBounds) {
|
|
6440
|
-
const options =
|
|
6548
|
+
__render(bounds, includes, realBounds) {
|
|
6549
|
+
const options = bounds.includes(this.target.__world) ? { includes } : { bounds, includes };
|
|
6441
6550
|
if (this.needFill)
|
|
6442
6551
|
this.canvas.fillWorld(bounds, this.config.fill);
|
|
6443
6552
|
if (Debug.showRepaint)
|
|
@@ -6538,7 +6647,7 @@ class Renderer {
|
|
|
6538
6647
|
}
|
|
6539
6648
|
|
|
6540
6649
|
const { hitRadiusPoint } = BoundsHelper;
|
|
6541
|
-
class
|
|
6650
|
+
class Pather {
|
|
6542
6651
|
constructor(target, selector) {
|
|
6543
6652
|
this.target = target;
|
|
6544
6653
|
this.selector = selector;
|
|
@@ -6658,117 +6767,108 @@ class FindPath {
|
|
|
6658
6767
|
class Selector {
|
|
6659
6768
|
constructor(target, userConfig) {
|
|
6660
6769
|
this.config = {};
|
|
6661
|
-
this.
|
|
6662
|
-
this.
|
|
6663
|
-
this.
|
|
6664
|
-
|
|
6770
|
+
this.innerIdMap = {};
|
|
6771
|
+
this.idMap = {};
|
|
6772
|
+
this.methods = {
|
|
6773
|
+
id: (leaf, name) => leaf.id === name ? this.idMap[name] = leaf : 0,
|
|
6774
|
+
innerId: (leaf, innerId) => leaf.innerId === innerId ? this.innerIdMap[innerId] = leaf : 0,
|
|
6775
|
+
className: (leaf, name) => leaf.className === name ? 1 : 0,
|
|
6776
|
+
tag: (leaf, name) => leaf.__tag === name ? 1 : 0
|
|
6777
|
+
};
|
|
6665
6778
|
this.target = target;
|
|
6666
6779
|
if (userConfig)
|
|
6667
6780
|
this.config = DataHelper.default(userConfig, this.config);
|
|
6668
|
-
this.
|
|
6781
|
+
this.pather = new Pather(target, this);
|
|
6669
6782
|
this.__listenEvents();
|
|
6670
6783
|
}
|
|
6671
6784
|
getByPoint(hitPoint, hitRadius, options) {
|
|
6672
6785
|
if (Platform.name === 'node')
|
|
6673
6786
|
this.target.emit(LayoutEvent.CHECK_UPDATE);
|
|
6674
|
-
return this.
|
|
6675
|
-
}
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6787
|
+
return this.pather.getByPoint(hitPoint, hitRadius, options);
|
|
6788
|
+
}
|
|
6789
|
+
getBy(condition, branch, one, options) {
|
|
6790
|
+
switch (typeof condition) {
|
|
6791
|
+
case 'number':
|
|
6792
|
+
const leaf = this.getByInnerId(condition, branch);
|
|
6793
|
+
return one ? leaf : (leaf ? [leaf] : []);
|
|
6794
|
+
case 'string':
|
|
6795
|
+
switch (condition[0]) {
|
|
6796
|
+
case '#':
|
|
6797
|
+
const leaf = this.getById(condition.substring(1), branch);
|
|
6798
|
+
return one ? leaf : (leaf ? [leaf] : []);
|
|
6799
|
+
case '.':
|
|
6800
|
+
return this.getByMethod(this.methods.className, branch, one, condition.substring(1));
|
|
6801
|
+
default:
|
|
6802
|
+
return this.getByMethod(this.methods.tag, branch, one, condition);
|
|
6803
|
+
}
|
|
6804
|
+
case 'function':
|
|
6805
|
+
return this.getByMethod(condition, branch, one, options);
|
|
6688
6806
|
}
|
|
6689
6807
|
}
|
|
6690
|
-
getByInnerId(
|
|
6691
|
-
|
|
6808
|
+
getByInnerId(innerId, branch) {
|
|
6809
|
+
const cache = this.innerIdMap[innerId];
|
|
6692
6810
|
if (cache)
|
|
6693
6811
|
return cache;
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
let find;
|
|
6697
|
-
this.loopFind(branch, (leaf) => {
|
|
6698
|
-
if (leaf.innerId === name) {
|
|
6699
|
-
find = leaf;
|
|
6700
|
-
this.innerIdList[name] = find;
|
|
6701
|
-
return true;
|
|
6702
|
-
}
|
|
6703
|
-
else {
|
|
6704
|
-
return false;
|
|
6705
|
-
}
|
|
6706
|
-
});
|
|
6707
|
-
return find;
|
|
6812
|
+
this.eachFind(this.toChildren(branch), this.methods.innerId, null, innerId);
|
|
6813
|
+
return this.findLeaf;
|
|
6708
6814
|
}
|
|
6709
|
-
getById(
|
|
6710
|
-
|
|
6711
|
-
if (cache)
|
|
6815
|
+
getById(id, branch) {
|
|
6816
|
+
const cache = this.idMap[id];
|
|
6817
|
+
if (cache && LeafHelper.hasParent(cache, branch || this.target))
|
|
6712
6818
|
return cache;
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
let find;
|
|
6716
|
-
this.loopFind(branch, (leaf) => {
|
|
6717
|
-
if (leaf.id === name) {
|
|
6718
|
-
find = leaf;
|
|
6719
|
-
this.idList[name] = find;
|
|
6720
|
-
return true;
|
|
6721
|
-
}
|
|
6722
|
-
else {
|
|
6723
|
-
return false;
|
|
6724
|
-
}
|
|
6725
|
-
});
|
|
6726
|
-
return find;
|
|
6819
|
+
this.eachFind(this.toChildren(branch), this.methods.id, null, id);
|
|
6820
|
+
return this.findLeaf;
|
|
6727
6821
|
}
|
|
6728
|
-
getByClassName(
|
|
6729
|
-
|
|
6730
|
-
branch = this.target;
|
|
6731
|
-
let find = [];
|
|
6732
|
-
this.loopFind(branch, (leaf) => {
|
|
6733
|
-
if (leaf.className === name)
|
|
6734
|
-
find.push(leaf);
|
|
6735
|
-
return false;
|
|
6736
|
-
});
|
|
6737
|
-
return find;
|
|
6822
|
+
getByClassName(className, branch) {
|
|
6823
|
+
return this.getByMethod(this.methods.className, branch, false, className);
|
|
6738
6824
|
}
|
|
6739
|
-
|
|
6740
|
-
|
|
6741
|
-
branch = this.target;
|
|
6742
|
-
let find = [];
|
|
6743
|
-
this.loopFind(branch, (leaf) => {
|
|
6744
|
-
if (leaf.__tag === name)
|
|
6745
|
-
find.push(leaf);
|
|
6746
|
-
return false;
|
|
6747
|
-
});
|
|
6748
|
-
return find;
|
|
6825
|
+
getByTag(tag, branch) {
|
|
6826
|
+
return this.getByMethod(this.methods.tag, branch, false, tag);
|
|
6749
6827
|
}
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6828
|
+
getByMethod(method, branch, one, options) {
|
|
6829
|
+
const list = one ? null : [];
|
|
6830
|
+
this.eachFind(this.toChildren(branch), method, list, options);
|
|
6831
|
+
return list || this.findLeaf;
|
|
6832
|
+
}
|
|
6833
|
+
eachFind(children, method, list, options) {
|
|
6834
|
+
let child;
|
|
6754
6835
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
6755
|
-
|
|
6756
|
-
if (
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6836
|
+
child = children[i];
|
|
6837
|
+
if (method(child, options)) {
|
|
6838
|
+
if (list) {
|
|
6839
|
+
list.push(child);
|
|
6840
|
+
}
|
|
6841
|
+
else {
|
|
6842
|
+
this.findLeaf = child;
|
|
6843
|
+
return;
|
|
6844
|
+
}
|
|
6845
|
+
}
|
|
6846
|
+
if (child.isBranch)
|
|
6847
|
+
this.eachFind(child.children, method, list, options);
|
|
6760
6848
|
}
|
|
6761
6849
|
}
|
|
6850
|
+
toChildren(branch) {
|
|
6851
|
+
this.findLeaf = null;
|
|
6852
|
+
return [branch || this.target];
|
|
6853
|
+
}
|
|
6762
6854
|
__onRemoveChild(event) {
|
|
6763
|
-
const
|
|
6764
|
-
if (this.
|
|
6765
|
-
this.
|
|
6766
|
-
if (this.
|
|
6767
|
-
this.
|
|
6855
|
+
const { id, innerId } = event.child;
|
|
6856
|
+
if (this.idMap[id])
|
|
6857
|
+
delete this.idMap[id];
|
|
6858
|
+
if (this.innerIdMap[innerId])
|
|
6859
|
+
delete this.innerIdMap[innerId];
|
|
6860
|
+
}
|
|
6861
|
+
__checkIdChange(event) {
|
|
6862
|
+
if (event.attrName === 'id') {
|
|
6863
|
+
const id = event.oldValue;
|
|
6864
|
+
if (this.idMap[id])
|
|
6865
|
+
delete this.idMap[id];
|
|
6866
|
+
}
|
|
6768
6867
|
}
|
|
6769
6868
|
__listenEvents() {
|
|
6770
6869
|
this.__eventIds = [
|
|
6771
|
-
this.target.on_(ChildEvent.REMOVE, this.__onRemoveChild, this)
|
|
6870
|
+
this.target.on_(ChildEvent.REMOVE, this.__onRemoveChild, this),
|
|
6871
|
+
this.target.on_(PropertyEvent.CHANGE, this.__checkIdChange, this)
|
|
6772
6872
|
];
|
|
6773
6873
|
}
|
|
6774
6874
|
__removeListenEvents() {
|
|
@@ -6778,11 +6878,10 @@ class Selector {
|
|
|
6778
6878
|
destroy() {
|
|
6779
6879
|
if (this.__eventIds.length) {
|
|
6780
6880
|
this.__removeListenEvents();
|
|
6781
|
-
this.
|
|
6782
|
-
this.
|
|
6783
|
-
this.
|
|
6784
|
-
this.
|
|
6785
|
-
this.tagNameList = {};
|
|
6881
|
+
this.pather.destroy();
|
|
6882
|
+
this.findLeaf = null;
|
|
6883
|
+
this.innerIdMap = {};
|
|
6884
|
+
this.idMap = {};
|
|
6786
6885
|
}
|
|
6787
6886
|
}
|
|
6788
6887
|
}
|
|
@@ -7097,6 +7196,11 @@ function useCanvas(_canvasType, app) {
|
|
|
7097
7196
|
app.offWindowResize(fun);
|
|
7098
7197
|
}
|
|
7099
7198
|
};
|
|
7199
|
+
Platform.event = {
|
|
7200
|
+
stopDefault(_origin) { },
|
|
7201
|
+
stopNow(_origin) { },
|
|
7202
|
+
stop(_origin) { }
|
|
7203
|
+
};
|
|
7100
7204
|
Platform.canvas = Creator.canvas();
|
|
7101
7205
|
Platform.conicGradientSupport = !!Platform.canvas.context.createConicGradient;
|
|
7102
7206
|
}
|
|
@@ -7114,7 +7218,7 @@ function draw(leafer) {
|
|
|
7114
7218
|
function design(leafer) {
|
|
7115
7219
|
if (leafer.isApp)
|
|
7116
7220
|
return;
|
|
7117
|
-
leafer.__eventIds.push(leafer.on_(MoveEvent.BEFORE_MOVE, (e) => { LeafHelper.moveWorld(leafer.
|
|
7221
|
+
leafer.__eventIds.push(leafer.on_(MoveEvent.BEFORE_MOVE, (e) => { LeafHelper.moveWorld(leafer.zoomLayer, e.moveX, e.moveY); }), leafer.on_(ZoomEvent.BEFORE_ZOOM, (e) => {
|
|
7118
7222
|
const { scaleX } = leafer.zoomLayer.__, { min, max } = leafer.config.zoom;
|
|
7119
7223
|
let { scale } = e;
|
|
7120
7224
|
if (scale * Math.abs(scaleX) < min)
|
|
@@ -7195,6 +7299,8 @@ class UIData extends LeafData {
|
|
|
7195
7299
|
this.__removeInput('fill');
|
|
7196
7300
|
Paint.recycleImage('fill', this);
|
|
7197
7301
|
this.__isFills = false;
|
|
7302
|
+
if (this.__pixelFill)
|
|
7303
|
+
this.__pixelFill = false;
|
|
7198
7304
|
}
|
|
7199
7305
|
this._fill = value;
|
|
7200
7306
|
}
|
|
@@ -7211,6 +7317,8 @@ class UIData extends LeafData {
|
|
|
7211
7317
|
this.__removeInput('stroke');
|
|
7212
7318
|
Paint.recycleImage('stroke', this);
|
|
7213
7319
|
this.__isStrokes = false;
|
|
7320
|
+
if (this.__pixelStroke)
|
|
7321
|
+
this.__pixelStroke = false;
|
|
7214
7322
|
}
|
|
7215
7323
|
this._stroke = value;
|
|
7216
7324
|
}
|
|
@@ -7508,9 +7616,9 @@ const UIRender = {
|
|
|
7508
7616
|
const { fill, stroke } = this.__;
|
|
7509
7617
|
this.__drawRenderPath(canvas);
|
|
7510
7618
|
if (fill)
|
|
7511
|
-
Paint.fill('#000000', this, canvas);
|
|
7619
|
+
this.__.__pixelFill ? Paint.fills(fill, this, canvas) : Paint.fill('#000000', this, canvas);
|
|
7512
7620
|
if (stroke)
|
|
7513
|
-
Paint.stroke('#000000', this, canvas, renderOptions);
|
|
7621
|
+
this.__.__pixelStroke ? Paint.strokes(stroke, this, canvas, renderOptions) : Paint.stroke('#000000', this, canvas, renderOptions);
|
|
7514
7622
|
}
|
|
7515
7623
|
};
|
|
7516
7624
|
|
|
@@ -7557,14 +7665,19 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7557
7665
|
const { scaleX, scaleY } = this;
|
|
7558
7666
|
return scaleX !== scaleY ? { x: scaleX, y: scaleY } : scaleX;
|
|
7559
7667
|
}
|
|
7560
|
-
|
|
7561
|
-
super(data);
|
|
7562
|
-
}
|
|
7668
|
+
reset(_data) { }
|
|
7563
7669
|
set(data) {
|
|
7564
7670
|
Object.assign(this, data);
|
|
7565
7671
|
}
|
|
7566
|
-
get() {
|
|
7567
|
-
return this.__.__getInputData();
|
|
7672
|
+
get(options) {
|
|
7673
|
+
return this.__.__getInputData(options);
|
|
7674
|
+
}
|
|
7675
|
+
getProxyData() { return undefined; }
|
|
7676
|
+
find(condition) {
|
|
7677
|
+
return this.leafer ? this.leafer.selector.getBy(condition, this) : [];
|
|
7678
|
+
}
|
|
7679
|
+
findOne(condition) {
|
|
7680
|
+
return this.leafer ? this.leafer.selector.getBy(condition, this, true) : null;
|
|
7568
7681
|
}
|
|
7569
7682
|
getPath(curve) {
|
|
7570
7683
|
const path = this.__.path;
|
|
@@ -7688,6 +7801,9 @@ __decorate([
|
|
|
7688
7801
|
__decorate([
|
|
7689
7802
|
strokeType('path')
|
|
7690
7803
|
], UI.prototype, "hitStroke", void 0);
|
|
7804
|
+
__decorate([
|
|
7805
|
+
hitType(false)
|
|
7806
|
+
], UI.prototype, "hitBox", void 0);
|
|
7691
7807
|
__decorate([
|
|
7692
7808
|
hitType(true)
|
|
7693
7809
|
], UI.prototype, "hitChildren", void 0);
|
|
@@ -7748,6 +7864,9 @@ __decorate([
|
|
|
7748
7864
|
__decorate([
|
|
7749
7865
|
effectType()
|
|
7750
7866
|
], UI.prototype, "grayscale", void 0);
|
|
7867
|
+
__decorate([
|
|
7868
|
+
rewrite(Leaf.prototype.reset)
|
|
7869
|
+
], UI.prototype, "reset", null);
|
|
7751
7870
|
__decorate([
|
|
7752
7871
|
rewrite(PathDrawer.drawPathByData)
|
|
7753
7872
|
], UI.prototype, "__drawPathByData", null);
|
|
@@ -7785,8 +7904,12 @@ let Group = class Group extends UI {
|
|
|
7785
7904
|
if (data.children) {
|
|
7786
7905
|
const { children } = data;
|
|
7787
7906
|
delete data.children;
|
|
7788
|
-
if (!this.children)
|
|
7907
|
+
if (!this.children) {
|
|
7789
7908
|
this.__setBranch();
|
|
7909
|
+
}
|
|
7910
|
+
else {
|
|
7911
|
+
this.removeAll(true);
|
|
7912
|
+
}
|
|
7790
7913
|
super.set(data);
|
|
7791
7914
|
let child;
|
|
7792
7915
|
children.forEach(childData => {
|
|
@@ -7987,8 +8110,10 @@ let Ellipse = class Ellipse extends UI {
|
|
|
7987
8110
|
ellipse(path, rx, ry, rx * innerRadius, ry * innerRadius);
|
|
7988
8111
|
moveTo$3(path, width, ry);
|
|
7989
8112
|
}
|
|
7990
|
-
ellipse(path, rx, ry, rx, ry, 0,
|
|
8113
|
+
ellipse(path, rx, ry, rx, ry, 0, 360, 0, true);
|
|
7991
8114
|
}
|
|
8115
|
+
if (Platform.ellipseToCurve)
|
|
8116
|
+
this.__.path = PathConvert.toCanvasData(path, true);
|
|
7992
8117
|
}
|
|
7993
8118
|
else {
|
|
7994
8119
|
if (startAngle || endAngle) {
|
|
@@ -8298,7 +8423,7 @@ Canvas = __decorate([
|
|
|
8298
8423
|
registerUI()
|
|
8299
8424
|
], Canvas);
|
|
8300
8425
|
|
|
8301
|
-
const { copyAndSpread, includes, spread } = BoundsHelper;
|
|
8426
|
+
const { copyAndSpread, includes, spread, setByList } = BoundsHelper;
|
|
8302
8427
|
let Text = class Text extends UI {
|
|
8303
8428
|
get __tag() { return 'Text'; }
|
|
8304
8429
|
get textDrawData() {
|
|
@@ -8332,18 +8457,19 @@ let Text = class Text extends UI {
|
|
|
8332
8457
|
__updateBoxBounds() {
|
|
8333
8458
|
const data = this.__;
|
|
8334
8459
|
const layout = this.__layout;
|
|
8335
|
-
const { lineHeight, letterSpacing, fontFamily, fontSize, fontWeight, italic, textCase } = data;
|
|
8460
|
+
const { lineHeight, letterSpacing, fontFamily, fontSize, fontWeight, italic, textCase, textOverflow } = data;
|
|
8461
|
+
const width = data.__getInput('width');
|
|
8462
|
+
const height = data.__getInput('height');
|
|
8336
8463
|
data.__lineHeight = UnitConvert.number(lineHeight, fontSize);
|
|
8337
8464
|
data.__letterSpacing = UnitConvert.number(letterSpacing, fontSize);
|
|
8338
8465
|
data.__baseLine = data.__lineHeight - (data.__lineHeight - fontSize * 0.7) / 2;
|
|
8339
8466
|
data.__font = `${italic ? 'italic ' : ''}${textCase === 'small-caps' ? 'small-caps ' : ''}${fontWeight !== 'normal' ? fontWeight + ' ' : ''}${fontSize}px ${fontFamily}`;
|
|
8467
|
+
data.__clipText = textOverflow !== 'show' && (width || height);
|
|
8340
8468
|
this.__updateTextDrawData();
|
|
8341
8469
|
const { bounds } = data.__textDrawData;
|
|
8342
8470
|
const b = layout.boxBounds;
|
|
8343
8471
|
if (data.__lineHeight < fontSize)
|
|
8344
8472
|
spread(bounds, fontSize / 2);
|
|
8345
|
-
const width = data.__getInput('width');
|
|
8346
|
-
const height = data.__getInput('height');
|
|
8347
8473
|
if (width && height) {
|
|
8348
8474
|
super.__updateBoxBounds();
|
|
8349
8475
|
}
|
|
@@ -8358,6 +8484,10 @@ let Text = class Text extends UI {
|
|
|
8358
8484
|
if (contentBounds !== layout.contentBounds) {
|
|
8359
8485
|
layout.contentBounds = contentBounds;
|
|
8360
8486
|
layout.renderChanged = true;
|
|
8487
|
+
setByList(data.__textBoxBounds = {}, [b, bounds]);
|
|
8488
|
+
}
|
|
8489
|
+
else {
|
|
8490
|
+
data.__textBoxBounds = contentBounds;
|
|
8361
8491
|
}
|
|
8362
8492
|
}
|
|
8363
8493
|
__updateRenderSpread() {
|
|
@@ -8367,7 +8497,7 @@ let Text = class Text extends UI {
|
|
|
8367
8497
|
return width;
|
|
8368
8498
|
}
|
|
8369
8499
|
__updateRenderBounds() {
|
|
8370
|
-
copyAndSpread(this.__layout.renderBounds, this.
|
|
8500
|
+
copyAndSpread(this.__layout.renderBounds, this.__.__textBoxBounds, this.__layout.renderSpread);
|
|
8371
8501
|
}
|
|
8372
8502
|
};
|
|
8373
8503
|
__decorate([
|
|
@@ -8385,6 +8515,9 @@ __decorate([
|
|
|
8385
8515
|
__decorate([
|
|
8386
8516
|
affectStrokeBoundsType('outside')
|
|
8387
8517
|
], Text.prototype, "strokeAlign", void 0);
|
|
8518
|
+
__decorate([
|
|
8519
|
+
hitType('all')
|
|
8520
|
+
], Text.prototype, "hitFill", void 0);
|
|
8388
8521
|
__decorate([
|
|
8389
8522
|
boundsType('')
|
|
8390
8523
|
], Text.prototype, "text", void 0);
|
|
@@ -8424,6 +8557,9 @@ __decorate([
|
|
|
8424
8557
|
__decorate([
|
|
8425
8558
|
boundsType('top')
|
|
8426
8559
|
], Text.prototype, "verticalAlign", void 0);
|
|
8560
|
+
__decorate([
|
|
8561
|
+
boundsType('normal')
|
|
8562
|
+
], Text.prototype, "textWrap", void 0);
|
|
8427
8563
|
__decorate([
|
|
8428
8564
|
boundsType('show')
|
|
8429
8565
|
], Text.prototype, "textOverflow", void 0);
|
|
@@ -8509,10 +8645,10 @@ let Leafer = class Leafer extends Group {
|
|
|
8509
8645
|
get __tag() { return 'Leafer'; }
|
|
8510
8646
|
get isApp() { return false; }
|
|
8511
8647
|
get app() { return this.parent || this; }
|
|
8648
|
+
get cursorPoint() { return (this.interaction && this.interaction.hoverData) || { x: this.width / 2, y: this.height / 2 }; }
|
|
8512
8649
|
constructor(userConfig, data) {
|
|
8513
8650
|
super(data);
|
|
8514
8651
|
this.zoomLayer = this;
|
|
8515
|
-
this.moveLayer = this;
|
|
8516
8652
|
this.config = {
|
|
8517
8653
|
type: 'design',
|
|
8518
8654
|
start: true,
|
|
@@ -8528,6 +8664,7 @@ let Leafer = class Leafer extends Group {
|
|
|
8528
8664
|
autoDistance: 2
|
|
8529
8665
|
}
|
|
8530
8666
|
};
|
|
8667
|
+
this.leafs = 0;
|
|
8531
8668
|
this.__eventIds = [];
|
|
8532
8669
|
this.__controllers = [];
|
|
8533
8670
|
this.__readyWait = [];
|
|
@@ -8641,9 +8778,8 @@ let Leafer = class Leafer extends Group {
|
|
|
8641
8778
|
this.isLeafer = !!leafer;
|
|
8642
8779
|
this.__level = 1;
|
|
8643
8780
|
}
|
|
8644
|
-
setZoomLayer(zoomLayer
|
|
8781
|
+
setZoomLayer(zoomLayer) {
|
|
8645
8782
|
this.zoomLayer = zoomLayer;
|
|
8646
|
-
this.moveLayer = moveLayer || zoomLayer;
|
|
8647
8783
|
}
|
|
8648
8784
|
__checkAutoLayout(config) {
|
|
8649
8785
|
if (!config.width || !config.height) {
|
|
@@ -9151,10 +9287,14 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
9151
9287
|
createPattern(ui, paint, canvas.pixelRatio);
|
|
9152
9288
|
}
|
|
9153
9289
|
else {
|
|
9154
|
-
|
|
9155
|
-
|
|
9290
|
+
if (!paint.patternTask) {
|
|
9291
|
+
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
|
|
9292
|
+
paint.patternTask = null;
|
|
9293
|
+
if (canvas.bounds.hit(ui.__world))
|
|
9294
|
+
createPattern(ui, paint, canvas.pixelRatio);
|
|
9156
9295
|
ui.forceUpdate('surface');
|
|
9157
|
-
|
|
9296
|
+
}), 300);
|
|
9297
|
+
}
|
|
9158
9298
|
}
|
|
9159
9299
|
return false;
|
|
9160
9300
|
}
|
|
@@ -9518,17 +9658,30 @@ function conicGradient(paint, box) {
|
|
|
9518
9658
|
let recycleMap;
|
|
9519
9659
|
function compute(attrName, ui) {
|
|
9520
9660
|
const value = [];
|
|
9661
|
+
const data = ui.__;
|
|
9521
9662
|
let item;
|
|
9522
|
-
let paints =
|
|
9663
|
+
let paints = data.__input[attrName];
|
|
9523
9664
|
if (!(paints instanceof Array))
|
|
9524
9665
|
paints = [paints];
|
|
9525
|
-
recycleMap = recycleImage(attrName,
|
|
9666
|
+
recycleMap = recycleImage(attrName, data);
|
|
9526
9667
|
for (let i = 0, len = paints.length; i < len; i++) {
|
|
9527
9668
|
item = getLeafPaint(attrName, paints[i], ui);
|
|
9528
9669
|
if (item)
|
|
9529
9670
|
value.push(item);
|
|
9530
9671
|
}
|
|
9531
|
-
|
|
9672
|
+
data['_' + attrName] = value.length ? value : undefined;
|
|
9673
|
+
let isPixel;
|
|
9674
|
+
if (paints.length === 1) {
|
|
9675
|
+
const paint = paints[0];
|
|
9676
|
+
if (paint.type === 'image')
|
|
9677
|
+
isPixel = ImageManager.isPixel(paint);
|
|
9678
|
+
}
|
|
9679
|
+
if (attrName === 'fill') {
|
|
9680
|
+
data.__pixelFill = isPixel;
|
|
9681
|
+
}
|
|
9682
|
+
else {
|
|
9683
|
+
data.__pixelStroke = isPixel;
|
|
9684
|
+
}
|
|
9532
9685
|
}
|
|
9533
9686
|
function getLeafPaint(attrName, paint, ui) {
|
|
9534
9687
|
if (typeof paint !== 'object' || paint.visible === false || paint.opacity === 0)
|
|
@@ -9803,6 +9956,8 @@ function createRows(drawData, content, style) {
|
|
|
9803
9956
|
const { width, height } = bounds;
|
|
9804
9957
|
const charMode = width || height || __letterSpacing || (textCase !== 'none');
|
|
9805
9958
|
if (charMode) {
|
|
9959
|
+
const wrap = style.textWrap !== 'none';
|
|
9960
|
+
const breakAll = style.textWrap === 'break';
|
|
9806
9961
|
paraStart = true;
|
|
9807
9962
|
lastCharType = null;
|
|
9808
9963
|
startCharSize = charWidth = charSize = wordWidth = rowWidth = 0;
|
|
@@ -9829,16 +9984,23 @@ function createRows(drawData, content, style) {
|
|
|
9829
9984
|
langBreak = (charType === Single && (lastCharType === Single || lastCharType === Letter)) || (lastCharType === Single && charType !== After);
|
|
9830
9985
|
afterBreak = ((charType === Before || charType === Single) && (lastCharType === Symbol || lastCharType === After));
|
|
9831
9986
|
realWidth = paraStart && paraIndent ? width - paraIndent : width;
|
|
9832
|
-
if (width && rowWidth + wordWidth + charWidth > realWidth) {
|
|
9833
|
-
if (
|
|
9834
|
-
afterBreak = charType === Letter && lastCharType == After;
|
|
9835
|
-
if (langBreak || afterBreak || charType === Break || charType === Before || charType === Single || (wordWidth + charWidth > realWidth)) {
|
|
9987
|
+
if (wrap && (width && rowWidth + wordWidth + charWidth > realWidth)) {
|
|
9988
|
+
if (breakAll) {
|
|
9836
9989
|
if (wordWidth)
|
|
9837
9990
|
addWord();
|
|
9838
9991
|
addRow();
|
|
9839
9992
|
}
|
|
9840
9993
|
else {
|
|
9841
|
-
|
|
9994
|
+
if (!afterBreak)
|
|
9995
|
+
afterBreak = charType === Letter && lastCharType == After;
|
|
9996
|
+
if (langBreak || afterBreak || charType === Break || charType === Before || charType === Single || (wordWidth + charWidth > realWidth)) {
|
|
9997
|
+
if (wordWidth)
|
|
9998
|
+
addWord();
|
|
9999
|
+
addRow();
|
|
10000
|
+
}
|
|
10001
|
+
else {
|
|
10002
|
+
addRow();
|
|
10003
|
+
}
|
|
9842
10004
|
}
|
|
9843
10005
|
}
|
|
9844
10006
|
if (char === ' ' && paraStart !== true && (rowWidth + wordWidth) === 0) ;
|
|
@@ -9908,7 +10070,7 @@ function addRow() {
|
|
|
9908
10070
|
|
|
9909
10071
|
const CharMode = 0;
|
|
9910
10072
|
const WordMode = 1;
|
|
9911
|
-
const
|
|
10073
|
+
const TextMode = 2;
|
|
9912
10074
|
function layoutChar(drawData, style, width, _height) {
|
|
9913
10075
|
const { rows } = drawData;
|
|
9914
10076
|
const { textAlign, paraIndent, letterSpacing } = style;
|
|
@@ -9917,15 +10079,12 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
9917
10079
|
if (row.words) {
|
|
9918
10080
|
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
9919
10081
|
addWordWidth = (width && textAlign === 'justify' && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
9920
|
-
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode :
|
|
9921
|
-
if (
|
|
9922
|
-
row.
|
|
10082
|
+
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
10083
|
+
if (row.isOverflow && !letterSpacing)
|
|
10084
|
+
row.textMode = true;
|
|
10085
|
+
if (mode === TextMode) {
|
|
9923
10086
|
row.x += indentWidth;
|
|
9924
|
-
row
|
|
9925
|
-
word.data.forEach(char => {
|
|
9926
|
-
row.text += char.char;
|
|
9927
|
-
});
|
|
9928
|
-
});
|
|
10087
|
+
toTextChar$1(row);
|
|
9929
10088
|
}
|
|
9930
10089
|
else {
|
|
9931
10090
|
row.x += indentWidth;
|
|
@@ -9951,6 +10110,14 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
9951
10110
|
}
|
|
9952
10111
|
});
|
|
9953
10112
|
}
|
|
10113
|
+
function toTextChar$1(row) {
|
|
10114
|
+
row.text = '';
|
|
10115
|
+
row.words.forEach(word => {
|
|
10116
|
+
word.data.forEach(char => {
|
|
10117
|
+
row.text += char.char;
|
|
10118
|
+
});
|
|
10119
|
+
});
|
|
10120
|
+
}
|
|
9954
10121
|
function toWordChar(data, charX, wordChar) {
|
|
9955
10122
|
data.forEach(char => {
|
|
9956
10123
|
wordChar.char += char.char;
|
|
@@ -9971,10 +10138,10 @@ function toChar(data, charX, rowData) {
|
|
|
9971
10138
|
|
|
9972
10139
|
function layoutText(drawData, style) {
|
|
9973
10140
|
const { rows, bounds } = drawData;
|
|
9974
|
-
const { __lineHeight, __baseLine, __letterSpacing, textAlign, verticalAlign, paraSpacing
|
|
10141
|
+
const { __lineHeight, __baseLine, __letterSpacing, __clipText, textAlign, verticalAlign, paraSpacing } = style;
|
|
9975
10142
|
let { x, y, width, height } = bounds, realHeight = __lineHeight * rows.length + (paraSpacing ? paraSpacing * (drawData.paraNumber - 1) : 0);
|
|
9976
10143
|
let starY = __baseLine;
|
|
9977
|
-
if (
|
|
10144
|
+
if (__clipText && realHeight > height) {
|
|
9978
10145
|
realHeight = Math.max(height, __lineHeight);
|
|
9979
10146
|
drawData.overflow = rows.length;
|
|
9980
10147
|
}
|
|
@@ -10023,39 +10190,58 @@ function layoutText(drawData, style) {
|
|
|
10023
10190
|
bounds.x = rowX;
|
|
10024
10191
|
if (rowWidth > bounds.width)
|
|
10025
10192
|
bounds.width = rowWidth;
|
|
10193
|
+
if (__clipText && width && width < rowWidth) {
|
|
10194
|
+
row.isOverflow = true;
|
|
10195
|
+
if (!drawData.overflow)
|
|
10196
|
+
drawData.overflow = rows.length;
|
|
10197
|
+
}
|
|
10026
10198
|
}
|
|
10027
10199
|
bounds.y = y;
|
|
10028
10200
|
bounds.height = realHeight;
|
|
10029
10201
|
}
|
|
10030
10202
|
|
|
10031
|
-
function clipText(drawData,
|
|
10203
|
+
function clipText(drawData, style) {
|
|
10032
10204
|
const { rows, overflow } = drawData;
|
|
10205
|
+
let { textOverflow } = style;
|
|
10033
10206
|
rows.splice(overflow);
|
|
10034
10207
|
if (textOverflow !== 'hide') {
|
|
10035
10208
|
if (textOverflow === 'ellipsis')
|
|
10036
10209
|
textOverflow = '...';
|
|
10210
|
+
let char, charRight;
|
|
10037
10211
|
const ellipsisWidth = Platform.canvas.measureText(textOverflow).width;
|
|
10038
|
-
const
|
|
10039
|
-
|
|
10040
|
-
|
|
10041
|
-
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10212
|
+
const right = style.x + style.width - ellipsisWidth;
|
|
10213
|
+
const list = style.textWrap === 'none' ? rows : [rows[overflow - 1]];
|
|
10214
|
+
list.forEach(row => {
|
|
10215
|
+
if (row.isOverflow && row.data) {
|
|
10216
|
+
let end = row.data.length - 1;
|
|
10217
|
+
for (let i = end; i > -1; i--) {
|
|
10218
|
+
char = row.data[i];
|
|
10219
|
+
charRight = char.x + char.width;
|
|
10220
|
+
if (i === end && charRight < right) {
|
|
10221
|
+
break;
|
|
10222
|
+
}
|
|
10223
|
+
else if (charRight < right && char.char !== ' ') {
|
|
10224
|
+
row.data.splice(i + 1);
|
|
10225
|
+
row.width -= char.width;
|
|
10226
|
+
break;
|
|
10227
|
+
}
|
|
10228
|
+
row.width -= char.width;
|
|
10229
|
+
}
|
|
10230
|
+
row.width += ellipsisWidth;
|
|
10231
|
+
row.data.push({ char: textOverflow, x: charRight });
|
|
10232
|
+
if (row.textMode)
|
|
10233
|
+
toTextChar(row);
|
|
10052
10234
|
}
|
|
10053
|
-
|
|
10054
|
-
}
|
|
10055
|
-
row.width += ellipsisWidth;
|
|
10056
|
-
row.data.push({ char: textOverflow, x: charRight });
|
|
10235
|
+
});
|
|
10057
10236
|
}
|
|
10058
10237
|
}
|
|
10238
|
+
function toTextChar(row) {
|
|
10239
|
+
row.text = '';
|
|
10240
|
+
row.data.forEach(char => {
|
|
10241
|
+
row.text += char.char;
|
|
10242
|
+
});
|
|
10243
|
+
row.data = null;
|
|
10244
|
+
}
|
|
10059
10245
|
|
|
10060
10246
|
function decorationText(drawData, style) {
|
|
10061
10247
|
const { fontSize } = style;
|
|
@@ -10076,7 +10262,7 @@ const TextConvert = {
|
|
|
10076
10262
|
let x = 0, y = 0;
|
|
10077
10263
|
let width = style.__getInput('width') || 0;
|
|
10078
10264
|
let height = style.__getInput('height') || 0;
|
|
10079
|
-
const { textDecoration,
|
|
10265
|
+
const { textDecoration, __font, padding } = style;
|
|
10080
10266
|
if (padding) {
|
|
10081
10267
|
const [top, right, bottom, left] = MathHelper.fourNumber(padding);
|
|
10082
10268
|
if (width) {
|
|
@@ -10098,7 +10284,7 @@ const TextConvert = {
|
|
|
10098
10284
|
layoutText(drawData, style);
|
|
10099
10285
|
layoutChar(drawData, style, width);
|
|
10100
10286
|
if (drawData.overflow)
|
|
10101
|
-
clipText(drawData,
|
|
10287
|
+
clipText(drawData, style);
|
|
10102
10288
|
if (textDecoration !== 'none')
|
|
10103
10289
|
decorationText(drawData, style);
|
|
10104
10290
|
return drawData;
|
|
@@ -10217,4 +10403,4 @@ LeaferCanvas.prototype.updateViewSize = function () {
|
|
|
10217
10403
|
}
|
|
10218
10404
|
};
|
|
10219
10405
|
|
|
10220
|
-
export { Animate, AnimateEvent, App, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, Branch, BranchHelper, BranchRender, Canvas, CanvasManager, ChildEvent, ColorConvert$1 as ColorConvert, Creator, Cursor, DataHelper, Debug, DragEvent, DropEvent, Effect, Ellipse, EllipseHelper, Event, EventCreator, Export$1 as Export, FileHelper, Frame, Group, HitCanvasManager, Image, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafHit, LeafLayout, LeafLevelList, LeafList, LeafMask, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferEvent, LeaferImage, LeaferTypeCreator, Line, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, Path, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, Platform, PluginManager, Point, PointHelper, PointerButton, PointerEvent, Polygon, PropertyEvent, Rect, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert$1 as TextConvert,
|
|
10406
|
+
export { Animate, AnimateEvent, App, AutoBounds, BezierHelper, Bounds, BoundsHelper, Box, Branch, BranchHelper, BranchRender, Canvas, CanvasManager, ChildEvent, ColorConvert$1 as ColorConvert, Creator, Cursor, DataHelper, Debug, DragEvent, DropEvent, Effect, Ellipse, EllipseHelper, Event, EventCreator, Export$1 as Export, FileHelper, Frame, Group, HitCanvasManager, Image, ImageEvent, ImageManager, IncrementId, Interaction, InteractionBase, InteractionHelper, KeyEvent, Keyboard, LayoutEvent, Layouter, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafHit, LeafLayout, LeafLevelList, LeafList, LeafMask, LeafMatrix, LeafRender, Leafer, LeaferCanvas, LeaferCanvasBase, LeaferEvent, LeaferImage, LeaferTypeCreator, Line, MathHelper, Matrix, MatrixHelper, MoveEvent, MultiTouchHelper, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, Paint, Path, PathBounds, PathCommandDataHelper, PathCommandMap, PathConvert, PathCorner, PathCreator, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Pen, Platform, PluginManager, Point, PointHelper, PointerButton, PointerEvent, Polygon, PropertyEvent, Rect, RectHelper, RectRender, RenderEvent, Renderer, ResizeEvent, RotateEvent, Run, Selector, Star, StringNumberMap, SwipeEvent, TaskItem, TaskProcessor, Text, TextConvert$1 as TextConvert, TwoPointBounds, TwoPointBoundsHelper, UI, UIBounds, UICreator, UIEvent, UIHit, UIRender, WaitHelper, WatchEvent, Watcher, ZoomEvent, affectRenderBoundsType, affectStrokeBoundsType, aliasType, boundsType, canvasPatch, canvasSizeAttrs, cursorType, dataProcessor, dataType, defineDataProcessor, defineKey, defineLeafAttr, effectType, eraserType, getDescriptor, hitType, layoutProcessor, maskType, opacityType, pathType, positionType, registerUI, registerUIEvent, resizeType, rewrite, rewriteAble, rotationType, scaleType, setDefaultValue, sortType, strokeType, surfaceType, useCanvas, useModule, usePlugin };
|