leafer-ui 1.0.0-rc.5 → 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/README.md +1 -1
- package/dist/web.esm.js +159 -135
- package/dist/web.esm.min.js +1 -1
- package/dist/web.js +387 -236
- package/dist/web.min.js +1 -1
- package/dist/web.module.js +387 -236
- package/dist/web.module.min.js +1 -1
- package/package.json +4 -4
package/dist/web.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);
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -2086,11 +2102,11 @@ const RectHelper = {
|
|
|
2086
2102
|
const { sin: sin$4, cos: cos$4, atan2: atan2$1, ceil, abs, PI: PI$2, sqrt: sqrt$1, pow } = Math;
|
|
2087
2103
|
const { setPoint: setPoint$1, addPoint: addPoint$1 } = TwoPointBoundsHelper;
|
|
2088
2104
|
const { set: set$2 } = PointHelper;
|
|
2089
|
-
const { M: M$
|
|
2105
|
+
const { M: M$5, L: L$6, C: C$5, Q: Q$4, Z: Z$5 } = PathCommandMap;
|
|
2090
2106
|
const tempPoint = {};
|
|
2091
2107
|
const BezierHelper = {
|
|
2092
2108
|
points(data, points, curve, close) {
|
|
2093
|
-
data.push(M$
|
|
2109
|
+
data.push(M$5, points[0], points[1]);
|
|
2094
2110
|
if (curve && points.length > 5) {
|
|
2095
2111
|
let aX, aY, bX, bY, cX, cY, c1X, c1Y, c2X, c2Y;
|
|
2096
2112
|
let ba, cb, d, len = points.length;
|
|
@@ -2120,7 +2136,7 @@ const BezierHelper = {
|
|
|
2120
2136
|
data.push(Q$4, c1X, c1Y, bX, bY);
|
|
2121
2137
|
}
|
|
2122
2138
|
else {
|
|
2123
|
-
data.push(C$
|
|
2139
|
+
data.push(C$5, c2X, c2Y, c1X, c1Y, bX, bY);
|
|
2124
2140
|
}
|
|
2125
2141
|
c2X = bX + cb * cX;
|
|
2126
2142
|
c2Y = bY + cb * cY;
|
|
@@ -2130,11 +2146,11 @@ const BezierHelper = {
|
|
|
2130
2146
|
}
|
|
2131
2147
|
else {
|
|
2132
2148
|
for (let i = 2, len = points.length; i < len; i += 2) {
|
|
2133
|
-
data.push(L$
|
|
2149
|
+
data.push(L$6, points[i], points[i + 1]);
|
|
2134
2150
|
}
|
|
2135
2151
|
}
|
|
2136
2152
|
if (close)
|
|
2137
|
-
data.push(Z$
|
|
2153
|
+
data.push(Z$5);
|
|
2138
2154
|
},
|
|
2139
2155
|
rect(data, x, y, width, height) {
|
|
2140
2156
|
PathHelper.creator.path = data;
|
|
@@ -2157,7 +2173,7 @@ const BezierHelper = {
|
|
|
2157
2173
|
totalRadian += PI2;
|
|
2158
2174
|
if (totalRadian === PI$2 || (abs(BAx + BAy) < 1.e-12) || (abs(CBx + CBy) < 1.e-12)) {
|
|
2159
2175
|
if (data)
|
|
2160
|
-
data.push(L$
|
|
2176
|
+
data.push(L$6, x1, y1);
|
|
2161
2177
|
if (setPointBounds) {
|
|
2162
2178
|
setPoint$1(setPointBounds, fromX, fromY);
|
|
2163
2179
|
addPoint$1(setPointBounds, x1, y1);
|
|
@@ -2210,7 +2226,7 @@ const BezierHelper = {
|
|
|
2210
2226
|
let startY = y = rotationSin * radiusX * startCos + rotationCos * radiusY * startSin;
|
|
2211
2227
|
let fromX = cx + x, fromY = cy + y;
|
|
2212
2228
|
if (data)
|
|
2213
|
-
data.push(L$
|
|
2229
|
+
data.push(L$6, fromX, fromY);
|
|
2214
2230
|
if (setPointBounds)
|
|
2215
2231
|
setPoint$1(setPointBounds, fromX, fromY);
|
|
2216
2232
|
if (setStartPoint)
|
|
@@ -2225,7 +2241,7 @@ const BezierHelper = {
|
|
|
2225
2241
|
x2 = cx + x + control * (rotationCos * radiusX * endSin + rotationSin * radiusY * endCos);
|
|
2226
2242
|
y2 = cy + y + control * (rotationSin * radiusX * endSin - rotationCos * radiusY * endCos);
|
|
2227
2243
|
if (data)
|
|
2228
|
-
data.push(C$
|
|
2244
|
+
data.push(C$5, x1, y1, x2, y2, cx + x, cy + y);
|
|
2229
2245
|
if (setPointBounds)
|
|
2230
2246
|
toTwoPointBounds$1(cx + startX, cy + startY, x1, y1, x2, y2, cx + x, cy + y, setPointBounds, true);
|
|
2231
2247
|
startX = x;
|
|
@@ -2239,7 +2255,7 @@ const BezierHelper = {
|
|
|
2239
2255
|
set$2(setEndPoint, cx + x, cy + y);
|
|
2240
2256
|
},
|
|
2241
2257
|
quadraticCurveTo(data, fromX, fromY, x1, y1, toX, toY) {
|
|
2242
|
-
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);
|
|
2243
2259
|
},
|
|
2244
2260
|
toTwoPointBoundsByQuadraticCurve(fromX, fromY, x1, y1, toX, toY, pointBounds, addMode) {
|
|
2245
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);
|
|
@@ -2333,7 +2349,7 @@ const EllipseHelper = {
|
|
|
2333
2349
|
const centerX = fromX + halfX + rotationCos * cx - rotationSin * cy;
|
|
2334
2350
|
const centerY = fromY + halfY + rotationSin * cx + rotationCos * cy;
|
|
2335
2351
|
const anticlockwise = totalRadian < 0 ? 1 : 0;
|
|
2336
|
-
if (curveMode || Platform.
|
|
2352
|
+
if (curveMode || Platform.ellipseToCurve) {
|
|
2337
2353
|
ellipse$5(data, centerX, centerY, radiusX, radiusY, rotation, startRadian / OneRadian, endRadian / OneRadian, anticlockwise);
|
|
2338
2354
|
}
|
|
2339
2355
|
else {
|
|
@@ -2347,7 +2363,7 @@ const EllipseHelper = {
|
|
|
2347
2363
|
}
|
|
2348
2364
|
};
|
|
2349
2365
|
|
|
2350
|
-
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;
|
|
2351
2367
|
const { rect: rect$2, roundRect: roundRect$2, arcTo: arcTo$2, arc: arc$3, ellipse: ellipse$4, quadraticCurveTo: quadraticCurveTo$1 } = BezierHelper;
|
|
2352
2368
|
const { ellipticalArc } = EllipseHelper;
|
|
2353
2369
|
const debug$b = Debug.get('PathConvert');
|
|
@@ -2435,33 +2451,33 @@ const PathConvert = {
|
|
|
2435
2451
|
case m:
|
|
2436
2452
|
old[i + 1] += x;
|
|
2437
2453
|
old[i + 2] += y;
|
|
2438
|
-
case M$
|
|
2454
|
+
case M$4:
|
|
2439
2455
|
x = old[i + 1];
|
|
2440
2456
|
y = old[i + 2];
|
|
2441
|
-
data.push(M$
|
|
2457
|
+
data.push(M$4, x, y);
|
|
2442
2458
|
i += 3;
|
|
2443
2459
|
break;
|
|
2444
2460
|
case h:
|
|
2445
2461
|
old[i + 1] += x;
|
|
2446
2462
|
case H:
|
|
2447
2463
|
x = old[i + 1];
|
|
2448
|
-
data.push(L$
|
|
2464
|
+
data.push(L$5, x, y);
|
|
2449
2465
|
i += 2;
|
|
2450
2466
|
break;
|
|
2451
2467
|
case v:
|
|
2452
2468
|
old[i + 1] += y;
|
|
2453
2469
|
case V:
|
|
2454
2470
|
y = old[i + 1];
|
|
2455
|
-
data.push(L$
|
|
2471
|
+
data.push(L$5, x, y);
|
|
2456
2472
|
i += 2;
|
|
2457
2473
|
break;
|
|
2458
2474
|
case l:
|
|
2459
2475
|
old[i + 1] += x;
|
|
2460
2476
|
old[i + 2] += y;
|
|
2461
|
-
case L$
|
|
2477
|
+
case L$5:
|
|
2462
2478
|
x = old[i + 1];
|
|
2463
2479
|
y = old[i + 2];
|
|
2464
|
-
data.push(L$
|
|
2480
|
+
data.push(L$5, x, y);
|
|
2465
2481
|
i += 3;
|
|
2466
2482
|
break;
|
|
2467
2483
|
case s:
|
|
@@ -2471,14 +2487,14 @@ const PathConvert = {
|
|
|
2471
2487
|
old[i + 4] += y;
|
|
2472
2488
|
command = S;
|
|
2473
2489
|
case S:
|
|
2474
|
-
smooth = (lastCommand === C$
|
|
2490
|
+
smooth = (lastCommand === C$4) || (lastCommand === S);
|
|
2475
2491
|
x1 = smooth ? (x * 2 - controlX) : old[i + 1];
|
|
2476
2492
|
y1 = smooth ? (y * 2 - controlY) : old[i + 2];
|
|
2477
2493
|
controlX = old[i + 1];
|
|
2478
2494
|
controlY = old[i + 2];
|
|
2479
2495
|
x = old[i + 3];
|
|
2480
2496
|
y = old[i + 4];
|
|
2481
|
-
data.push(C$
|
|
2497
|
+
data.push(C$4, x1, y1, controlX, controlY, x, y);
|
|
2482
2498
|
i += 5;
|
|
2483
2499
|
break;
|
|
2484
2500
|
case c:
|
|
@@ -2488,13 +2504,13 @@ const PathConvert = {
|
|
|
2488
2504
|
old[i + 4] += y;
|
|
2489
2505
|
old[i + 5] += x;
|
|
2490
2506
|
old[i + 6] += y;
|
|
2491
|
-
command = C$
|
|
2492
|
-
case C$
|
|
2507
|
+
command = C$4;
|
|
2508
|
+
case C$4:
|
|
2493
2509
|
controlX = old[i + 3];
|
|
2494
2510
|
controlY = old[i + 4];
|
|
2495
2511
|
x = old[i + 5];
|
|
2496
2512
|
y = old[i + 6];
|
|
2497
|
-
data.push(C$
|
|
2513
|
+
data.push(C$4, old[i + 1], old[i + 2], controlX, controlY, x, y);
|
|
2498
2514
|
i += 7;
|
|
2499
2515
|
break;
|
|
2500
2516
|
case t:
|
|
@@ -2534,8 +2550,8 @@ const PathConvert = {
|
|
|
2534
2550
|
i += 8;
|
|
2535
2551
|
break;
|
|
2536
2552
|
case z:
|
|
2537
|
-
case Z$
|
|
2538
|
-
data.push(Z$
|
|
2553
|
+
case Z$4:
|
|
2554
|
+
data.push(Z$4);
|
|
2539
2555
|
i++;
|
|
2540
2556
|
break;
|
|
2541
2557
|
case N$3:
|
|
@@ -2580,7 +2596,7 @@ const PathConvert = {
|
|
|
2580
2596
|
y = old[i + 2];
|
|
2581
2597
|
i += 4;
|
|
2582
2598
|
break;
|
|
2583
|
-
case U$
|
|
2599
|
+
case U$4:
|
|
2584
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);
|
|
2585
2601
|
x = setEndPoint$1.x;
|
|
2586
2602
|
y = setEndPoint$1.y;
|
|
@@ -2611,26 +2627,26 @@ const PathConvert = {
|
|
|
2611
2627
|
};
|
|
2612
2628
|
const { current, pushData, copyData } = PathConvert;
|
|
2613
2629
|
|
|
2614
|
-
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;
|
|
2615
2631
|
const startPoint = {};
|
|
2616
2632
|
const PathCommandDataHelper = {
|
|
2617
2633
|
beginPath(data) {
|
|
2618
2634
|
data.length = 0;
|
|
2619
2635
|
},
|
|
2620
2636
|
moveTo(data, x, y) {
|
|
2621
|
-
data.push(M$
|
|
2637
|
+
data.push(M$3, x, y);
|
|
2622
2638
|
},
|
|
2623
2639
|
lineTo(data, x, y) {
|
|
2624
|
-
data.push(L$
|
|
2640
|
+
data.push(L$4, x, y);
|
|
2625
2641
|
},
|
|
2626
2642
|
bezierCurveTo(data, x1, y1, x2, y2, x, y) {
|
|
2627
|
-
data.push(C$
|
|
2643
|
+
data.push(C$3, x1, y1, x2, y2, x, y);
|
|
2628
2644
|
},
|
|
2629
2645
|
quadraticCurveTo(data, x1, y1, x, y) {
|
|
2630
2646
|
data.push(Q$2, x1, y1, x, y);
|
|
2631
2647
|
},
|
|
2632
2648
|
closePath(data) {
|
|
2633
|
-
data.push(Z$
|
|
2649
|
+
data.push(Z$3);
|
|
2634
2650
|
},
|
|
2635
2651
|
rect(data, x, y, width, height) {
|
|
2636
2652
|
data.push(N$2, x, y, width, height);
|
|
@@ -2672,7 +2688,7 @@ const PathCommandDataHelper = {
|
|
|
2672
2688
|
}
|
|
2673
2689
|
},
|
|
2674
2690
|
arcTo(data, x1, y1, x2, y2, radius) {
|
|
2675
|
-
data.push(U$
|
|
2691
|
+
data.push(U$3, x1, y1, x2, y2, radius);
|
|
2676
2692
|
},
|
|
2677
2693
|
drawEllipse(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
|
|
2678
2694
|
if (rotation === undefined)
|
|
@@ -2682,7 +2698,7 @@ const PathCommandDataHelper = {
|
|
|
2682
2698
|
if (endAngle === undefined)
|
|
2683
2699
|
endAngle = 360;
|
|
2684
2700
|
BezierHelper.ellipse(null, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise, null, null, startPoint);
|
|
2685
|
-
data.push(M$
|
|
2701
|
+
data.push(M$3, startPoint.x, startPoint.y);
|
|
2686
2702
|
ellipse$3(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
|
|
2687
2703
|
},
|
|
2688
2704
|
drawArc(data, x, y, radius, startAngle, endAngle, anticlockwise) {
|
|
@@ -2691,7 +2707,7 @@ const PathCommandDataHelper = {
|
|
|
2691
2707
|
if (endAngle === undefined)
|
|
2692
2708
|
endAngle = 360;
|
|
2693
2709
|
BezierHelper.arc(null, x, y, radius, startAngle, endAngle, anticlockwise, null, null, startPoint);
|
|
2694
|
-
data.push(M$
|
|
2710
|
+
data.push(M$3, startPoint.x, startPoint.y);
|
|
2695
2711
|
arc$2(data, x, y, radius, startAngle, endAngle, anticlockwise);
|
|
2696
2712
|
},
|
|
2697
2713
|
drawPoints(data, points, curve, close) {
|
|
@@ -2768,7 +2784,7 @@ class PathCreator {
|
|
|
2768
2784
|
}
|
|
2769
2785
|
}
|
|
2770
2786
|
|
|
2771
|
-
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;
|
|
2772
2788
|
const debug$a = Debug.get('PathDrawer');
|
|
2773
2789
|
const PathDrawer = {
|
|
2774
2790
|
drawPathByData(drawer, data) {
|
|
@@ -2779,15 +2795,15 @@ const PathDrawer = {
|
|
|
2779
2795
|
while (i < len) {
|
|
2780
2796
|
command = data[i];
|
|
2781
2797
|
switch (command) {
|
|
2782
|
-
case M$
|
|
2798
|
+
case M$2:
|
|
2783
2799
|
drawer.moveTo(data[i + 1], data[i + 2]);
|
|
2784
2800
|
i += 3;
|
|
2785
2801
|
break;
|
|
2786
|
-
case L$
|
|
2802
|
+
case L$3:
|
|
2787
2803
|
drawer.lineTo(data[i + 1], data[i + 2]);
|
|
2788
2804
|
i += 3;
|
|
2789
2805
|
break;
|
|
2790
|
-
case C$
|
|
2806
|
+
case C$2:
|
|
2791
2807
|
drawer.bezierCurveTo(data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], data[i + 6]);
|
|
2792
2808
|
i += 7;
|
|
2793
2809
|
break;
|
|
@@ -2795,7 +2811,7 @@ const PathDrawer = {
|
|
|
2795
2811
|
drawer.quadraticCurveTo(data[i + 1], data[i + 2], data[i + 3], data[i + 4]);
|
|
2796
2812
|
i += 5;
|
|
2797
2813
|
break;
|
|
2798
|
-
case Z$
|
|
2814
|
+
case Z$2:
|
|
2799
2815
|
drawer.closePath();
|
|
2800
2816
|
i += 1;
|
|
2801
2817
|
break;
|
|
@@ -2827,7 +2843,7 @@ const PathDrawer = {
|
|
|
2827
2843
|
drawer.arc(data[i + 1], data[i + 2], data[i + 3], 0, PI2, false);
|
|
2828
2844
|
i += 4;
|
|
2829
2845
|
break;
|
|
2830
|
-
case U$
|
|
2846
|
+
case U$2:
|
|
2831
2847
|
drawer.arcTo(data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5]);
|
|
2832
2848
|
i += 6;
|
|
2833
2849
|
break;
|
|
@@ -2839,7 +2855,7 @@ const PathDrawer = {
|
|
|
2839
2855
|
}
|
|
2840
2856
|
};
|
|
2841
2857
|
|
|
2842
|
-
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;
|
|
2843
2859
|
const { toTwoPointBounds, toTwoPointBoundsByQuadraticCurve, arcTo, arc, ellipse: ellipse$1 } = BezierHelper;
|
|
2844
2860
|
const { add: add$1, copy: copy$6, addPoint, setPoint, addBounds, toBounds: toBounds$3 } = TwoPointBoundsHelper;
|
|
2845
2861
|
const debug$9 = Debug.get('PathBounds');
|
|
@@ -2861,7 +2877,7 @@ const PathBounds = {
|
|
|
2861
2877
|
while (i < len) {
|
|
2862
2878
|
command = data[i];
|
|
2863
2879
|
if (i === 0) {
|
|
2864
|
-
if (command === Z || command === C || command === Q) {
|
|
2880
|
+
if (command === Z$1 || command === C$1 || command === Q) {
|
|
2865
2881
|
setPoint(setPointBounds, x, y);
|
|
2866
2882
|
}
|
|
2867
2883
|
else {
|
|
@@ -2869,14 +2885,14 @@ const PathBounds = {
|
|
|
2869
2885
|
}
|
|
2870
2886
|
}
|
|
2871
2887
|
switch (command) {
|
|
2872
|
-
case M:
|
|
2873
|
-
case L$
|
|
2888
|
+
case M$1:
|
|
2889
|
+
case L$2:
|
|
2874
2890
|
x = data[i + 1];
|
|
2875
2891
|
y = data[i + 2];
|
|
2876
2892
|
addPoint(setPointBounds, x, y);
|
|
2877
2893
|
i += 3;
|
|
2878
2894
|
break;
|
|
2879
|
-
case C:
|
|
2895
|
+
case C$1:
|
|
2880
2896
|
toX = data[i + 5];
|
|
2881
2897
|
toY = data[i + 6];
|
|
2882
2898
|
toTwoPointBounds(x, y, data[i + 1], data[i + 2], data[i + 3], data[i + 4], toX, toY, tempPointBounds);
|
|
@@ -2896,7 +2912,7 @@ const PathBounds = {
|
|
|
2896
2912
|
y = toY;
|
|
2897
2913
|
i += 5;
|
|
2898
2914
|
break;
|
|
2899
|
-
case Z:
|
|
2915
|
+
case Z$1:
|
|
2900
2916
|
i += 1;
|
|
2901
2917
|
break;
|
|
2902
2918
|
case N:
|
|
@@ -2943,7 +2959,7 @@ const PathBounds = {
|
|
|
2943
2959
|
x += radius;
|
|
2944
2960
|
i += 4;
|
|
2945
2961
|
break;
|
|
2946
|
-
case U:
|
|
2962
|
+
case U$1:
|
|
2947
2963
|
arcTo(null, x, y, data[i + 1], data[i + 2], data[i + 3], data[i + 4], data[i + 5], tempPointBounds, setEndPoint);
|
|
2948
2964
|
i === 0 ? copy$6(setPointBounds, tempPointBounds) : add$1(setPointBounds, tempPointBounds);
|
|
2949
2965
|
x = setEndPoint.x;
|
|
@@ -2958,9 +2974,60 @@ const PathBounds = {
|
|
|
2958
2974
|
}
|
|
2959
2975
|
};
|
|
2960
2976
|
|
|
2977
|
+
const { M, L: L$1, C, Z, U } = PathCommandMap;
|
|
2961
2978
|
const PathCorner = {
|
|
2962
|
-
smooth(data,
|
|
2963
|
-
|
|
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;
|
|
2964
3031
|
}
|
|
2965
3032
|
};
|
|
2966
3033
|
|
|
@@ -3012,9 +3079,7 @@ class TaskItem {
|
|
|
3012
3079
|
}
|
|
3013
3080
|
|
|
3014
3081
|
class TaskProcessor {
|
|
3015
|
-
get total() {
|
|
3016
|
-
return this.list.length + this.delayNumber;
|
|
3017
|
-
}
|
|
3082
|
+
get total() { return this.list.length + this.delayNumber; }
|
|
3018
3083
|
get finishedIndex() {
|
|
3019
3084
|
return this.isComplete ? 0 : this.index + this.parallelSuccessNumber;
|
|
3020
3085
|
}
|
|
@@ -3070,8 +3135,10 @@ class TaskProcessor {
|
|
|
3070
3135
|
else {
|
|
3071
3136
|
this.delayNumber++;
|
|
3072
3137
|
setTimeout(() => {
|
|
3073
|
-
this.delayNumber
|
|
3074
|
-
|
|
3138
|
+
if (this.delayNumber) {
|
|
3139
|
+
this.delayNumber--;
|
|
3140
|
+
this.push(task, start);
|
|
3141
|
+
}
|
|
3075
3142
|
}, delay);
|
|
3076
3143
|
}
|
|
3077
3144
|
this.isComplete = false;
|
|
@@ -3088,6 +3155,7 @@ class TaskProcessor {
|
|
|
3088
3155
|
this.parallelSuccessNumber = 0;
|
|
3089
3156
|
this.list = [];
|
|
3090
3157
|
this.parallelList = [];
|
|
3158
|
+
this.delayNumber = 0;
|
|
3091
3159
|
}
|
|
3092
3160
|
start() {
|
|
3093
3161
|
if (!this.running) {
|
|
@@ -4137,6 +4205,17 @@ const LeafHelper = {
|
|
|
4137
4205
|
parent.worldToInner(position);
|
|
4138
4206
|
t.set(position);
|
|
4139
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;
|
|
4140
4219
|
}
|
|
4141
4220
|
};
|
|
4142
4221
|
const L = LeafHelper;
|
|
@@ -5213,6 +5292,8 @@ const LeafDataProxy = {
|
|
|
5213
5292
|
const oldValue = this.__.__getInput(name);
|
|
5214
5293
|
if (typeof newValue === 'object' || oldValue !== newValue) {
|
|
5215
5294
|
this.__[name] = newValue;
|
|
5295
|
+
if (this.proxyData)
|
|
5296
|
+
this.setProxyAttr(name, newValue);
|
|
5216
5297
|
const { CHANGE } = PropertyEvent;
|
|
5217
5298
|
const event = new PropertyEvent(CHANGE, this, name, oldValue, newValue);
|
|
5218
5299
|
if (this.hasEvent(CHANGE) && !this.isLeafer)
|
|
@@ -5222,10 +5303,21 @@ const LeafDataProxy = {
|
|
|
5222
5303
|
}
|
|
5223
5304
|
else {
|
|
5224
5305
|
this.__[name] = newValue;
|
|
5306
|
+
if (this.proxyData)
|
|
5307
|
+
this.setProxyAttr(name, newValue);
|
|
5225
5308
|
}
|
|
5226
5309
|
},
|
|
5227
5310
|
__getAttr(name) {
|
|
5311
|
+
if (this.proxyData)
|
|
5312
|
+
return this.getProxyAttr(name);
|
|
5228
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];
|
|
5229
5321
|
}
|
|
5230
5322
|
};
|
|
5231
5323
|
|
|
@@ -5435,6 +5527,10 @@ const LeafHit = {
|
|
|
5435
5527
|
setRadius(point, this.__.hitRadius);
|
|
5436
5528
|
}
|
|
5437
5529
|
toInnerRadiusPointOf(point, this.__world, inner);
|
|
5530
|
+
if (this.__.hitBox) {
|
|
5531
|
+
if (BoundsHelper.hitRadiusPoint(this.__layout.boxBounds, inner))
|
|
5532
|
+
return true;
|
|
5533
|
+
}
|
|
5438
5534
|
return this.__hit(inner);
|
|
5439
5535
|
},
|
|
5440
5536
|
__drawHitPath(canvas) {
|
|
@@ -5478,12 +5574,21 @@ const LeafMask = {
|
|
|
5478
5574
|
__updateMask(value) {
|
|
5479
5575
|
this.__hasMask = value ? true : this.children.some(item => item.__.isMask);
|
|
5480
5576
|
},
|
|
5481
|
-
__renderMask(canvas, content, mask) {
|
|
5577
|
+
__renderMask(canvas, content, mask, recycle) {
|
|
5578
|
+
content.opacity = 1;
|
|
5482
5579
|
content.resetTransform();
|
|
5483
5580
|
content.useMask(mask);
|
|
5484
|
-
canvas.resetTransform();
|
|
5485
5581
|
canvas.opacity = this.__worldOpacity;
|
|
5582
|
+
canvas.resetTransform();
|
|
5486
5583
|
canvas.copyWorld(content);
|
|
5584
|
+
if (recycle) {
|
|
5585
|
+
content.recycle();
|
|
5586
|
+
mask.recycle();
|
|
5587
|
+
}
|
|
5588
|
+
else {
|
|
5589
|
+
content.clear();
|
|
5590
|
+
mask.clear();
|
|
5591
|
+
}
|
|
5487
5592
|
},
|
|
5488
5593
|
__removeMask(child) {
|
|
5489
5594
|
if (child) {
|
|
@@ -5538,15 +5643,13 @@ const BranchRender = {
|
|
|
5538
5643
|
const { children } = this;
|
|
5539
5644
|
if (this.__hasMask && children.length > 1) {
|
|
5540
5645
|
let mask;
|
|
5541
|
-
|
|
5542
|
-
|
|
5646
|
+
const maskCanvas = canvas.getSameCanvas();
|
|
5647
|
+
const contentCanvas = canvas.getSameCanvas();
|
|
5543
5648
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
5544
5649
|
child = children[i];
|
|
5545
5650
|
if (child.isMask) {
|
|
5546
5651
|
if (mask) {
|
|
5547
5652
|
this.__renderMask(canvas, contentCanvas, maskCanvas);
|
|
5548
|
-
maskCanvas.clear();
|
|
5549
|
-
contentCanvas.clear();
|
|
5550
5653
|
}
|
|
5551
5654
|
else {
|
|
5552
5655
|
mask = true;
|
|
@@ -5554,11 +5657,9 @@ const BranchRender = {
|
|
|
5554
5657
|
child.__render(maskCanvas, options);
|
|
5555
5658
|
continue;
|
|
5556
5659
|
}
|
|
5557
|
-
child.__render(contentCanvas, options);
|
|
5660
|
+
child.__render(mask ? contentCanvas : canvas, options);
|
|
5558
5661
|
}
|
|
5559
|
-
this.__renderMask(canvas, contentCanvas, maskCanvas);
|
|
5560
|
-
maskCanvas.recycle();
|
|
5561
|
-
contentCanvas.recycle();
|
|
5662
|
+
this.__renderMask(canvas, contentCanvas, maskCanvas, true);
|
|
5562
5663
|
}
|
|
5563
5664
|
else {
|
|
5564
5665
|
const { bounds, hideBounds } = options;
|
|
@@ -5652,6 +5753,7 @@ let Leaf = class Leaf {
|
|
|
5652
5753
|
}
|
|
5653
5754
|
}
|
|
5654
5755
|
set(_data) { }
|
|
5756
|
+
get(_options) { return undefined; }
|
|
5655
5757
|
toJSON() {
|
|
5656
5758
|
return this.__.__getInputData();
|
|
5657
5759
|
}
|
|
@@ -5660,6 +5762,10 @@ let Leaf = class Leaf {
|
|
|
5660
5762
|
}
|
|
5661
5763
|
__setAttr(_attrName, _newValue) { }
|
|
5662
5764
|
__getAttr(_attrName) { return undefined; }
|
|
5765
|
+
setProxyAttr(_attrName, _newValue) { }
|
|
5766
|
+
getProxyAttr(_attrName) { return undefined; }
|
|
5767
|
+
find(_condition) { return undefined; }
|
|
5768
|
+
findOne(_condition) { return undefined; }
|
|
5663
5769
|
forceUpdate(attrName) {
|
|
5664
5770
|
if (attrName === undefined)
|
|
5665
5771
|
attrName = 'width';
|
|
@@ -5684,7 +5790,7 @@ let Leaf = class Leaf {
|
|
|
5684
5790
|
__onUpdateSize() { }
|
|
5685
5791
|
__updateEraser(_value) { }
|
|
5686
5792
|
__updateMask(_value) { }
|
|
5687
|
-
__renderMask(_canvas, _content, _mask) { }
|
|
5793
|
+
__renderMask(_canvas, _content, _mask, _recycle) { }
|
|
5688
5794
|
__removeMask(_child) { }
|
|
5689
5795
|
getWorld(attrName) {
|
|
5690
5796
|
this.__layout.checkUpdate();
|
|
@@ -6541,7 +6647,7 @@ class Renderer {
|
|
|
6541
6647
|
}
|
|
6542
6648
|
|
|
6543
6649
|
const { hitRadiusPoint } = BoundsHelper;
|
|
6544
|
-
class
|
|
6650
|
+
class Pather {
|
|
6545
6651
|
constructor(target, selector) {
|
|
6546
6652
|
this.target = target;
|
|
6547
6653
|
this.selector = selector;
|
|
@@ -6661,117 +6767,108 @@ class FindPath {
|
|
|
6661
6767
|
class Selector {
|
|
6662
6768
|
constructor(target, userConfig) {
|
|
6663
6769
|
this.config = {};
|
|
6664
|
-
this.
|
|
6665
|
-
this.
|
|
6666
|
-
this.
|
|
6667
|
-
|
|
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
|
+
};
|
|
6668
6778
|
this.target = target;
|
|
6669
6779
|
if (userConfig)
|
|
6670
6780
|
this.config = DataHelper.default(userConfig, this.config);
|
|
6671
|
-
this.
|
|
6781
|
+
this.pather = new Pather(target, this);
|
|
6672
6782
|
this.__listenEvents();
|
|
6673
6783
|
}
|
|
6674
6784
|
getByPoint(hitPoint, hitRadius, options) {
|
|
6675
6785
|
if (Platform.name === 'node')
|
|
6676
6786
|
this.target.emit(LayoutEvent.CHECK_UPDATE);
|
|
6677
|
-
return this.
|
|
6678
|
-
}
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
|
|
6684
|
-
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
|
|
6690
|
-
|
|
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);
|
|
6691
6806
|
}
|
|
6692
6807
|
}
|
|
6693
|
-
getByInnerId(
|
|
6694
|
-
|
|
6808
|
+
getByInnerId(innerId, branch) {
|
|
6809
|
+
const cache = this.innerIdMap[innerId];
|
|
6695
6810
|
if (cache)
|
|
6696
6811
|
return cache;
|
|
6697
|
-
|
|
6698
|
-
|
|
6699
|
-
let find;
|
|
6700
|
-
this.loopFind(branch, (leaf) => {
|
|
6701
|
-
if (leaf.innerId === name) {
|
|
6702
|
-
find = leaf;
|
|
6703
|
-
this.innerIdList[name] = find;
|
|
6704
|
-
return true;
|
|
6705
|
-
}
|
|
6706
|
-
else {
|
|
6707
|
-
return false;
|
|
6708
|
-
}
|
|
6709
|
-
});
|
|
6710
|
-
return find;
|
|
6812
|
+
this.eachFind(this.toChildren(branch), this.methods.innerId, null, innerId);
|
|
6813
|
+
return this.findLeaf;
|
|
6711
6814
|
}
|
|
6712
|
-
getById(
|
|
6713
|
-
|
|
6714
|
-
if (cache)
|
|
6815
|
+
getById(id, branch) {
|
|
6816
|
+
const cache = this.idMap[id];
|
|
6817
|
+
if (cache && LeafHelper.hasParent(cache, branch || this.target))
|
|
6715
6818
|
return cache;
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
let find;
|
|
6719
|
-
this.loopFind(branch, (leaf) => {
|
|
6720
|
-
if (leaf.id === name) {
|
|
6721
|
-
find = leaf;
|
|
6722
|
-
this.idList[name] = find;
|
|
6723
|
-
return true;
|
|
6724
|
-
}
|
|
6725
|
-
else {
|
|
6726
|
-
return false;
|
|
6727
|
-
}
|
|
6728
|
-
});
|
|
6729
|
-
return find;
|
|
6819
|
+
this.eachFind(this.toChildren(branch), this.methods.id, null, id);
|
|
6820
|
+
return this.findLeaf;
|
|
6730
6821
|
}
|
|
6731
|
-
getByClassName(
|
|
6732
|
-
|
|
6733
|
-
branch = this.target;
|
|
6734
|
-
let find = [];
|
|
6735
|
-
this.loopFind(branch, (leaf) => {
|
|
6736
|
-
if (leaf.className === name)
|
|
6737
|
-
find.push(leaf);
|
|
6738
|
-
return false;
|
|
6739
|
-
});
|
|
6740
|
-
return find;
|
|
6822
|
+
getByClassName(className, branch) {
|
|
6823
|
+
return this.getByMethod(this.methods.className, branch, false, className);
|
|
6741
6824
|
}
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
branch = this.target;
|
|
6745
|
-
let find = [];
|
|
6746
|
-
this.loopFind(branch, (leaf) => {
|
|
6747
|
-
if (leaf.__tag === name)
|
|
6748
|
-
find.push(leaf);
|
|
6749
|
-
return false;
|
|
6750
|
-
});
|
|
6751
|
-
return find;
|
|
6825
|
+
getByTag(tag, branch) {
|
|
6826
|
+
return this.getByMethod(this.methods.tag, branch, false, tag);
|
|
6752
6827
|
}
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
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;
|
|
6757
6835
|
for (let i = 0, len = children.length; i < len; i++) {
|
|
6758
|
-
|
|
6759
|
-
if (
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
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);
|
|
6763
6848
|
}
|
|
6764
6849
|
}
|
|
6850
|
+
toChildren(branch) {
|
|
6851
|
+
this.findLeaf = null;
|
|
6852
|
+
return [branch || this.target];
|
|
6853
|
+
}
|
|
6765
6854
|
__onRemoveChild(event) {
|
|
6766
|
-
const
|
|
6767
|
-
if (this.
|
|
6768
|
-
this.
|
|
6769
|
-
if (this.
|
|
6770
|
-
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
|
+
}
|
|
6771
6867
|
}
|
|
6772
6868
|
__listenEvents() {
|
|
6773
6869
|
this.__eventIds = [
|
|
6774
|
-
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)
|
|
6775
6872
|
];
|
|
6776
6873
|
}
|
|
6777
6874
|
__removeListenEvents() {
|
|
@@ -6781,11 +6878,10 @@ class Selector {
|
|
|
6781
6878
|
destroy() {
|
|
6782
6879
|
if (this.__eventIds.length) {
|
|
6783
6880
|
this.__removeListenEvents();
|
|
6784
|
-
this.
|
|
6785
|
-
this.
|
|
6786
|
-
this.
|
|
6787
|
-
this.
|
|
6788
|
-
this.tagNameList = {};
|
|
6881
|
+
this.pather.destroy();
|
|
6882
|
+
this.findLeaf = null;
|
|
6883
|
+
this.innerIdMap = {};
|
|
6884
|
+
this.idMap = {};
|
|
6789
6885
|
}
|
|
6790
6886
|
}
|
|
6791
6887
|
}
|
|
@@ -7007,7 +7103,7 @@ const WheelEventHelper = {
|
|
|
7007
7103
|
let { zoomMode, zoomSpeed } = config;
|
|
7008
7104
|
const delta = e.deltaY || e.deltaX;
|
|
7009
7105
|
if (zoomMode) {
|
|
7010
|
-
zoom = !e.deltaX && (Platform.intWheelDeltaY ? Math.abs(delta) > 17 : Math.ceil(delta) !== delta);
|
|
7106
|
+
zoom = (zoomMode === 'mouse') ? true : (!e.deltaX && (Platform.intWheelDeltaY ? Math.abs(delta) > 17 : Math.ceil(delta) !== delta));
|
|
7011
7107
|
if (e.shiftKey || e.metaKey || e.ctrlKey)
|
|
7012
7108
|
zoom = true;
|
|
7013
7109
|
}
|
|
@@ -7816,8 +7912,15 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
7816
7912
|
set(data) {
|
|
7817
7913
|
Object.assign(this, data);
|
|
7818
7914
|
}
|
|
7819
|
-
get() {
|
|
7820
|
-
return this.__.__getInputData();
|
|
7915
|
+
get(options) {
|
|
7916
|
+
return this.__.__getInputData(options);
|
|
7917
|
+
}
|
|
7918
|
+
getProxyData() { return undefined; }
|
|
7919
|
+
find(condition) {
|
|
7920
|
+
return this.leafer ? this.leafer.selector.getBy(condition, this) : [];
|
|
7921
|
+
}
|
|
7922
|
+
findOne(condition) {
|
|
7923
|
+
return this.leafer ? this.leafer.selector.getBy(condition, this, true) : null;
|
|
7821
7924
|
}
|
|
7822
7925
|
getPath(curve) {
|
|
7823
7926
|
const path = this.__.path;
|
|
@@ -7941,6 +8044,9 @@ __decorate([
|
|
|
7941
8044
|
__decorate([
|
|
7942
8045
|
strokeType('path')
|
|
7943
8046
|
], UI.prototype, "hitStroke", void 0);
|
|
8047
|
+
__decorate([
|
|
8048
|
+
hitType(false)
|
|
8049
|
+
], UI.prototype, "hitBox", void 0);
|
|
7944
8050
|
__decorate([
|
|
7945
8051
|
hitType(true)
|
|
7946
8052
|
], UI.prototype, "hitChildren", void 0);
|
|
@@ -8249,7 +8355,7 @@ let Ellipse = class Ellipse extends UI {
|
|
|
8249
8355
|
}
|
|
8250
8356
|
ellipse(path, rx, ry, rx, ry, 0, 360, 0, true);
|
|
8251
8357
|
}
|
|
8252
|
-
if (Platform.
|
|
8358
|
+
if (Platform.ellipseToCurve)
|
|
8253
8359
|
this.__.path = PathConvert.toCanvasData(path, true);
|
|
8254
8360
|
}
|
|
8255
8361
|
else {
|
|
@@ -8560,7 +8666,7 @@ Canvas = __decorate([
|
|
|
8560
8666
|
registerUI()
|
|
8561
8667
|
], Canvas);
|
|
8562
8668
|
|
|
8563
|
-
const { copyAndSpread, includes, spread } = BoundsHelper;
|
|
8669
|
+
const { copyAndSpread, includes, spread, setByList } = BoundsHelper;
|
|
8564
8670
|
let Text = class Text extends UI {
|
|
8565
8671
|
get __tag() { return 'Text'; }
|
|
8566
8672
|
get textDrawData() {
|
|
@@ -8594,18 +8700,19 @@ let Text = class Text extends UI {
|
|
|
8594
8700
|
__updateBoxBounds() {
|
|
8595
8701
|
const data = this.__;
|
|
8596
8702
|
const layout = this.__layout;
|
|
8597
|
-
const { lineHeight, letterSpacing, fontFamily, fontSize, fontWeight, italic, textCase } = data;
|
|
8703
|
+
const { lineHeight, letterSpacing, fontFamily, fontSize, fontWeight, italic, textCase, textOverflow } = data;
|
|
8704
|
+
const width = data.__getInput('width');
|
|
8705
|
+
const height = data.__getInput('height');
|
|
8598
8706
|
data.__lineHeight = UnitConvert.number(lineHeight, fontSize);
|
|
8599
8707
|
data.__letterSpacing = UnitConvert.number(letterSpacing, fontSize);
|
|
8600
8708
|
data.__baseLine = data.__lineHeight - (data.__lineHeight - fontSize * 0.7) / 2;
|
|
8601
8709
|
data.__font = `${italic ? 'italic ' : ''}${textCase === 'small-caps' ? 'small-caps ' : ''}${fontWeight !== 'normal' ? fontWeight + ' ' : ''}${fontSize}px ${fontFamily}`;
|
|
8710
|
+
data.__clipText = textOverflow !== 'show' && (width || height);
|
|
8602
8711
|
this.__updateTextDrawData();
|
|
8603
8712
|
const { bounds } = data.__textDrawData;
|
|
8604
8713
|
const b = layout.boxBounds;
|
|
8605
8714
|
if (data.__lineHeight < fontSize)
|
|
8606
8715
|
spread(bounds, fontSize / 2);
|
|
8607
|
-
const width = data.__getInput('width');
|
|
8608
|
-
const height = data.__getInput('height');
|
|
8609
8716
|
if (width && height) {
|
|
8610
8717
|
super.__updateBoxBounds();
|
|
8611
8718
|
}
|
|
@@ -8620,6 +8727,10 @@ let Text = class Text extends UI {
|
|
|
8620
8727
|
if (contentBounds !== layout.contentBounds) {
|
|
8621
8728
|
layout.contentBounds = contentBounds;
|
|
8622
8729
|
layout.renderChanged = true;
|
|
8730
|
+
setByList(data.__textBoxBounds = {}, [b, bounds]);
|
|
8731
|
+
}
|
|
8732
|
+
else {
|
|
8733
|
+
data.__textBoxBounds = contentBounds;
|
|
8623
8734
|
}
|
|
8624
8735
|
}
|
|
8625
8736
|
__updateRenderSpread() {
|
|
@@ -8629,7 +8740,7 @@ let Text = class Text extends UI {
|
|
|
8629
8740
|
return width;
|
|
8630
8741
|
}
|
|
8631
8742
|
__updateRenderBounds() {
|
|
8632
|
-
copyAndSpread(this.__layout.renderBounds, this.
|
|
8743
|
+
copyAndSpread(this.__layout.renderBounds, this.__.__textBoxBounds, this.__layout.renderSpread);
|
|
8633
8744
|
}
|
|
8634
8745
|
};
|
|
8635
8746
|
__decorate([
|
|
@@ -8647,6 +8758,9 @@ __decorate([
|
|
|
8647
8758
|
__decorate([
|
|
8648
8759
|
affectStrokeBoundsType('outside')
|
|
8649
8760
|
], Text.prototype, "strokeAlign", void 0);
|
|
8761
|
+
__decorate([
|
|
8762
|
+
hitType('all')
|
|
8763
|
+
], Text.prototype, "hitFill", void 0);
|
|
8650
8764
|
__decorate([
|
|
8651
8765
|
boundsType('')
|
|
8652
8766
|
], Text.prototype, "text", void 0);
|
|
@@ -8686,6 +8800,9 @@ __decorate([
|
|
|
8686
8800
|
__decorate([
|
|
8687
8801
|
boundsType('top')
|
|
8688
8802
|
], Text.prototype, "verticalAlign", void 0);
|
|
8803
|
+
__decorate([
|
|
8804
|
+
boundsType('normal')
|
|
8805
|
+
], Text.prototype, "textWrap", void 0);
|
|
8689
8806
|
__decorate([
|
|
8690
8807
|
boundsType('show')
|
|
8691
8808
|
], Text.prototype, "textOverflow", void 0);
|
|
@@ -9416,8 +9533,9 @@ function checkImage(ui, canvas, paint, allowPaint) {
|
|
|
9416
9533
|
if (!paint.patternTask) {
|
|
9417
9534
|
paint.patternTask = ImageManager.patternTasker.add(() => __awaiter(this, void 0, void 0, function* () {
|
|
9418
9535
|
paint.patternTask = null;
|
|
9419
|
-
if (canvas.bounds.hit(ui.__world)
|
|
9420
|
-
ui.
|
|
9536
|
+
if (canvas.bounds.hit(ui.__world))
|
|
9537
|
+
createPattern(ui, paint, canvas.pixelRatio);
|
|
9538
|
+
ui.forceUpdate('surface');
|
|
9421
9539
|
}), 300);
|
|
9422
9540
|
}
|
|
9423
9541
|
}
|
|
@@ -10081,6 +10199,8 @@ function createRows(drawData, content, style) {
|
|
|
10081
10199
|
const { width, height } = bounds;
|
|
10082
10200
|
const charMode = width || height || __letterSpacing || (textCase !== 'none');
|
|
10083
10201
|
if (charMode) {
|
|
10202
|
+
const wrap = style.textWrap !== 'none';
|
|
10203
|
+
const breakAll = style.textWrap === 'break';
|
|
10084
10204
|
paraStart = true;
|
|
10085
10205
|
lastCharType = null;
|
|
10086
10206
|
startCharSize = charWidth = charSize = wordWidth = rowWidth = 0;
|
|
@@ -10107,16 +10227,23 @@ function createRows(drawData, content, style) {
|
|
|
10107
10227
|
langBreak = (charType === Single && (lastCharType === Single || lastCharType === Letter)) || (lastCharType === Single && charType !== After);
|
|
10108
10228
|
afterBreak = ((charType === Before || charType === Single) && (lastCharType === Symbol || lastCharType === After));
|
|
10109
10229
|
realWidth = paraStart && paraIndent ? width - paraIndent : width;
|
|
10110
|
-
if (width && rowWidth + wordWidth + charWidth > realWidth) {
|
|
10111
|
-
if (
|
|
10112
|
-
afterBreak = charType === Letter && lastCharType == After;
|
|
10113
|
-
if (langBreak || afterBreak || charType === Break || charType === Before || charType === Single || (wordWidth + charWidth > realWidth)) {
|
|
10230
|
+
if (wrap && (width && rowWidth + wordWidth + charWidth > realWidth)) {
|
|
10231
|
+
if (breakAll) {
|
|
10114
10232
|
if (wordWidth)
|
|
10115
10233
|
addWord();
|
|
10116
10234
|
addRow();
|
|
10117
10235
|
}
|
|
10118
10236
|
else {
|
|
10119
|
-
|
|
10237
|
+
if (!afterBreak)
|
|
10238
|
+
afterBreak = charType === Letter && lastCharType == After;
|
|
10239
|
+
if (langBreak || afterBreak || charType === Break || charType === Before || charType === Single || (wordWidth + charWidth > realWidth)) {
|
|
10240
|
+
if (wordWidth)
|
|
10241
|
+
addWord();
|
|
10242
|
+
addRow();
|
|
10243
|
+
}
|
|
10244
|
+
else {
|
|
10245
|
+
addRow();
|
|
10246
|
+
}
|
|
10120
10247
|
}
|
|
10121
10248
|
}
|
|
10122
10249
|
if (char === ' ' && paraStart !== true && (rowWidth + wordWidth) === 0) ;
|
|
@@ -10186,7 +10313,7 @@ function addRow() {
|
|
|
10186
10313
|
|
|
10187
10314
|
const CharMode = 0;
|
|
10188
10315
|
const WordMode = 1;
|
|
10189
|
-
const
|
|
10316
|
+
const TextMode = 2;
|
|
10190
10317
|
function layoutChar(drawData, style, width, _height) {
|
|
10191
10318
|
const { rows } = drawData;
|
|
10192
10319
|
const { textAlign, paraIndent, letterSpacing } = style;
|
|
@@ -10195,15 +10322,12 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
10195
10322
|
if (row.words) {
|
|
10196
10323
|
indentWidth = paraIndent && row.paraStart ? paraIndent : 0;
|
|
10197
10324
|
addWordWidth = (width && textAlign === 'justify' && row.words.length > 1) ? (width - row.width - indentWidth) / (row.words.length - 1) : 0;
|
|
10198
|
-
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode :
|
|
10199
|
-
if (
|
|
10200
|
-
row.
|
|
10325
|
+
mode = (letterSpacing || row.isOverflow) ? CharMode : (addWordWidth > 0.01 ? WordMode : TextMode);
|
|
10326
|
+
if (row.isOverflow && !letterSpacing)
|
|
10327
|
+
row.textMode = true;
|
|
10328
|
+
if (mode === TextMode) {
|
|
10201
10329
|
row.x += indentWidth;
|
|
10202
|
-
row
|
|
10203
|
-
word.data.forEach(char => {
|
|
10204
|
-
row.text += char.char;
|
|
10205
|
-
});
|
|
10206
|
-
});
|
|
10330
|
+
toTextChar$1(row);
|
|
10207
10331
|
}
|
|
10208
10332
|
else {
|
|
10209
10333
|
row.x += indentWidth;
|
|
@@ -10229,6 +10353,14 @@ function layoutChar(drawData, style, width, _height) {
|
|
|
10229
10353
|
}
|
|
10230
10354
|
});
|
|
10231
10355
|
}
|
|
10356
|
+
function toTextChar$1(row) {
|
|
10357
|
+
row.text = '';
|
|
10358
|
+
row.words.forEach(word => {
|
|
10359
|
+
word.data.forEach(char => {
|
|
10360
|
+
row.text += char.char;
|
|
10361
|
+
});
|
|
10362
|
+
});
|
|
10363
|
+
}
|
|
10232
10364
|
function toWordChar(data, charX, wordChar) {
|
|
10233
10365
|
data.forEach(char => {
|
|
10234
10366
|
wordChar.char += char.char;
|
|
@@ -10249,10 +10381,10 @@ function toChar(data, charX, rowData) {
|
|
|
10249
10381
|
|
|
10250
10382
|
function layoutText(drawData, style) {
|
|
10251
10383
|
const { rows, bounds } = drawData;
|
|
10252
|
-
const { __lineHeight, __baseLine, __letterSpacing, textAlign, verticalAlign, paraSpacing
|
|
10384
|
+
const { __lineHeight, __baseLine, __letterSpacing, __clipText, textAlign, verticalAlign, paraSpacing } = style;
|
|
10253
10385
|
let { x, y, width, height } = bounds, realHeight = __lineHeight * rows.length + (paraSpacing ? paraSpacing * (drawData.paraNumber - 1) : 0);
|
|
10254
10386
|
let starY = __baseLine;
|
|
10255
|
-
if (
|
|
10387
|
+
if (__clipText && realHeight > height) {
|
|
10256
10388
|
realHeight = Math.max(height, __lineHeight);
|
|
10257
10389
|
drawData.overflow = rows.length;
|
|
10258
10390
|
}
|
|
@@ -10301,39 +10433,58 @@ function layoutText(drawData, style) {
|
|
|
10301
10433
|
bounds.x = rowX;
|
|
10302
10434
|
if (rowWidth > bounds.width)
|
|
10303
10435
|
bounds.width = rowWidth;
|
|
10436
|
+
if (__clipText && width && width < rowWidth) {
|
|
10437
|
+
row.isOverflow = true;
|
|
10438
|
+
if (!drawData.overflow)
|
|
10439
|
+
drawData.overflow = rows.length;
|
|
10440
|
+
}
|
|
10304
10441
|
}
|
|
10305
10442
|
bounds.y = y;
|
|
10306
10443
|
bounds.height = realHeight;
|
|
10307
10444
|
}
|
|
10308
10445
|
|
|
10309
|
-
function clipText(drawData,
|
|
10446
|
+
function clipText(drawData, style) {
|
|
10310
10447
|
const { rows, overflow } = drawData;
|
|
10448
|
+
let { textOverflow } = style;
|
|
10311
10449
|
rows.splice(overflow);
|
|
10312
10450
|
if (textOverflow !== 'hide') {
|
|
10313
10451
|
if (textOverflow === 'ellipsis')
|
|
10314
10452
|
textOverflow = '...';
|
|
10453
|
+
let char, charRight;
|
|
10315
10454
|
const ellipsisWidth = Platform.canvas.measureText(textOverflow).width;
|
|
10316
|
-
const
|
|
10317
|
-
|
|
10318
|
-
|
|
10319
|
-
|
|
10320
|
-
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
-
|
|
10329
|
-
|
|
10455
|
+
const right = style.x + style.width - ellipsisWidth;
|
|
10456
|
+
const list = style.textWrap === 'none' ? rows : [rows[overflow - 1]];
|
|
10457
|
+
list.forEach(row => {
|
|
10458
|
+
if (row.isOverflow && row.data) {
|
|
10459
|
+
let end = row.data.length - 1;
|
|
10460
|
+
for (let i = end; i > -1; i--) {
|
|
10461
|
+
char = row.data[i];
|
|
10462
|
+
charRight = char.x + char.width;
|
|
10463
|
+
if (i === end && charRight < right) {
|
|
10464
|
+
break;
|
|
10465
|
+
}
|
|
10466
|
+
else if (charRight < right && char.char !== ' ') {
|
|
10467
|
+
row.data.splice(i + 1);
|
|
10468
|
+
row.width -= char.width;
|
|
10469
|
+
break;
|
|
10470
|
+
}
|
|
10471
|
+
row.width -= char.width;
|
|
10472
|
+
}
|
|
10473
|
+
row.width += ellipsisWidth;
|
|
10474
|
+
row.data.push({ char: textOverflow, x: charRight });
|
|
10475
|
+
if (row.textMode)
|
|
10476
|
+
toTextChar(row);
|
|
10330
10477
|
}
|
|
10331
|
-
|
|
10332
|
-
}
|
|
10333
|
-
row.width += ellipsisWidth;
|
|
10334
|
-
row.data.push({ char: textOverflow, x: charRight });
|
|
10478
|
+
});
|
|
10335
10479
|
}
|
|
10336
10480
|
}
|
|
10481
|
+
function toTextChar(row) {
|
|
10482
|
+
row.text = '';
|
|
10483
|
+
row.data.forEach(char => {
|
|
10484
|
+
row.text += char.char;
|
|
10485
|
+
});
|
|
10486
|
+
row.data = null;
|
|
10487
|
+
}
|
|
10337
10488
|
|
|
10338
10489
|
function decorationText(drawData, style) {
|
|
10339
10490
|
const { fontSize } = style;
|
|
@@ -10354,7 +10505,7 @@ const TextConvert = {
|
|
|
10354
10505
|
let x = 0, y = 0;
|
|
10355
10506
|
let width = style.__getInput('width') || 0;
|
|
10356
10507
|
let height = style.__getInput('height') || 0;
|
|
10357
|
-
const { textDecoration,
|
|
10508
|
+
const { textDecoration, __font, padding } = style;
|
|
10358
10509
|
if (padding) {
|
|
10359
10510
|
const [top, right, bottom, left] = MathHelper.fourNumber(padding);
|
|
10360
10511
|
if (width) {
|
|
@@ -10376,7 +10527,7 @@ const TextConvert = {
|
|
|
10376
10527
|
layoutText(drawData, style);
|
|
10377
10528
|
layoutChar(drawData, style, width);
|
|
10378
10529
|
if (drawData.overflow)
|
|
10379
|
-
clipText(drawData,
|
|
10530
|
+
clipText(drawData, style);
|
|
10380
10531
|
if (textDecoration !== 'none')
|
|
10381
10532
|
decorationText(drawData, style);
|
|
10382
10533
|
return drawData;
|