@leafer/worker 1.9.7 → 1.9.8
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/worker.js +572 -383
- package/dist/worker.min.js +1 -1
- package/dist/worker.min.js.map +1 -1
- package/dist/worker.module.js +583 -383
- package/dist/worker.module.min.js +1 -1
- package/dist/worker.module.min.js.map +1 -1
- package/package.json +23 -23
package/dist/worker.js
CHANGED
|
@@ -229,17 +229,32 @@ var LeaferUI = function(exports) {
|
|
|
229
229
|
this.__input = this.__middle = null;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
|
-
|
|
233
|
-
const
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
232
|
+
let tempA, tempB, tempTo;
|
|
233
|
+
const {max: max$5} = Math, tempFour = [ 0, 0, 0, 0 ];
|
|
234
|
+
const FourNumberHelper = {
|
|
235
|
+
zero: [ ...tempFour ],
|
|
236
|
+
tempFour: tempFour,
|
|
237
|
+
set(to, top, right, bottom, left) {
|
|
238
|
+
if (right === undefined) right = bottom = left = top;
|
|
239
|
+
to[0] = top;
|
|
240
|
+
to[1] = right;
|
|
241
|
+
to[2] = bottom;
|
|
242
|
+
to[3] = left;
|
|
243
|
+
return to;
|
|
244
|
+
},
|
|
245
|
+
setTemp(top, right, bottom, left) {
|
|
246
|
+
return set$1(tempFour, top, right, bottom, left);
|
|
239
247
|
},
|
|
240
|
-
|
|
248
|
+
toTempAB(a, b, change) {
|
|
249
|
+
tempTo = change ? isNumber(a) ? b : a : [];
|
|
250
|
+
if (isNumber(a)) tempA = setTemp(a), tempB = b; else if (isNumber(b)) tempA = a,
|
|
251
|
+
tempB = setTemp(b); else tempA = a, tempB = b;
|
|
252
|
+
if (tempA.length !== 4) tempA = get$5(tempA);
|
|
253
|
+
if (tempB.length !== 4) tempB = get$5(tempB);
|
|
254
|
+
},
|
|
255
|
+
get(num, maxValue) {
|
|
241
256
|
let data;
|
|
242
|
-
if (
|
|
257
|
+
if (!isNumber(num)) {
|
|
243
258
|
switch (num.length) {
|
|
244
259
|
case 4:
|
|
245
260
|
data = isUndefined(maxValue) ? num : [ ...num ];
|
|
@@ -262,9 +277,36 @@ var LeaferUI = function(exports) {
|
|
|
262
277
|
}
|
|
263
278
|
}
|
|
264
279
|
if (!data) data = [ num, num, num, num ];
|
|
265
|
-
if (maxValue) for (let i = 0; i < 4; i++) if (data[i] > maxValue) data[i] = maxValue;
|
|
280
|
+
if (!isUndefined(maxValue)) for (let i = 0; i < 4; i++) if (data[i] > maxValue) data[i] = maxValue;
|
|
266
281
|
return data;
|
|
267
282
|
},
|
|
283
|
+
max(t, other, change) {
|
|
284
|
+
if (isNumber(t) && isNumber(other)) return max$5(t, other);
|
|
285
|
+
toTempAB(t, other, change);
|
|
286
|
+
return set$1(tempTo, max$5(tempA[0], tempB[0]), max$5(tempA[1], tempB[1]), max$5(tempA[2], tempB[2]), max$5(tempA[3], tempB[3]));
|
|
287
|
+
},
|
|
288
|
+
add(t, other, change) {
|
|
289
|
+
if (isNumber(t) && isNumber(other)) return t + other;
|
|
290
|
+
toTempAB(t, other, change);
|
|
291
|
+
return set$1(tempTo, tempA[0] + tempB[0], tempA[1] + tempB[1], tempA[2] + tempB[2], tempA[3] + tempB[3]);
|
|
292
|
+
},
|
|
293
|
+
swapAndScale(t, scaleX, scaleY, change) {
|
|
294
|
+
if (isNumber(t)) return scaleX === scaleY ? t * scaleX : [ t * scaleY, t * scaleX ];
|
|
295
|
+
const to = change ? t : [];
|
|
296
|
+
const [top, right, bottom, left] = t.length === 4 ? t : get$5(t);
|
|
297
|
+
return set$1(to, bottom * scaleY, left * scaleX, top * scaleY, right * scaleX);
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
const {set: set$1, get: get$5, setTemp: setTemp, toTempAB: toTempAB} = FourNumberHelper;
|
|
301
|
+
const {round: round$6, pow: pow$2, PI: PI$4} = Math;
|
|
302
|
+
const MathHelper = {
|
|
303
|
+
within(value, min, max) {
|
|
304
|
+
if (isObject(min)) max = min.max, min = min.min;
|
|
305
|
+
if (!isUndefined(min) && value < min) value = min;
|
|
306
|
+
if (!isUndefined(max) && value > max) value = max;
|
|
307
|
+
return value;
|
|
308
|
+
},
|
|
309
|
+
fourNumber: FourNumberHelper.get,
|
|
268
310
|
formatRotation(rotation, unsign) {
|
|
269
311
|
rotation %= 360;
|
|
270
312
|
if (unsign) {
|
|
@@ -402,13 +444,13 @@ var LeaferUI = function(exports) {
|
|
|
402
444
|
to.f = t.f * pixelRatio;
|
|
403
445
|
},
|
|
404
446
|
scaleOfOuter(t, origin, scaleX, scaleY) {
|
|
405
|
-
M$
|
|
406
|
-
M$
|
|
447
|
+
M$b.toInnerPoint(t, origin, tempPoint$4);
|
|
448
|
+
M$b.scaleOfInner(t, tempPoint$4, scaleX, scaleY);
|
|
407
449
|
},
|
|
408
450
|
scaleOfInner(t, origin, scaleX, scaleY = scaleX) {
|
|
409
|
-
M$
|
|
410
|
-
M$
|
|
411
|
-
M$
|
|
451
|
+
M$b.translateInner(t, origin.x, origin.y);
|
|
452
|
+
M$b.scale(t, scaleX, scaleY);
|
|
453
|
+
M$b.translateInner(t, -origin.x, -origin.y);
|
|
412
454
|
},
|
|
413
455
|
rotate(t, rotation) {
|
|
414
456
|
const {a: a, b: b, c: c, d: d} = t;
|
|
@@ -421,13 +463,13 @@ var LeaferUI = function(exports) {
|
|
|
421
463
|
t.d = c * sinR + d * cosR;
|
|
422
464
|
},
|
|
423
465
|
rotateOfOuter(t, origin, rotation) {
|
|
424
|
-
M$
|
|
425
|
-
M$
|
|
466
|
+
M$b.toInnerPoint(t, origin, tempPoint$4);
|
|
467
|
+
M$b.rotateOfInner(t, tempPoint$4, rotation);
|
|
426
468
|
},
|
|
427
469
|
rotateOfInner(t, origin, rotation) {
|
|
428
|
-
M$
|
|
429
|
-
M$
|
|
430
|
-
M$
|
|
470
|
+
M$b.translateInner(t, origin.x, origin.y);
|
|
471
|
+
M$b.rotate(t, rotation);
|
|
472
|
+
M$b.translateInner(t, -origin.x, -origin.y);
|
|
431
473
|
},
|
|
432
474
|
skew(t, skewX, skewY) {
|
|
433
475
|
const {a: a, b: b, c: c, d: d} = t;
|
|
@@ -443,13 +485,13 @@ var LeaferUI = function(exports) {
|
|
|
443
485
|
}
|
|
444
486
|
},
|
|
445
487
|
skewOfOuter(t, origin, skewX, skewY) {
|
|
446
|
-
M$
|
|
447
|
-
M$
|
|
488
|
+
M$b.toInnerPoint(t, origin, tempPoint$4);
|
|
489
|
+
M$b.skewOfInner(t, tempPoint$4, skewX, skewY);
|
|
448
490
|
},
|
|
449
491
|
skewOfInner(t, origin, skewX, skewY = 0) {
|
|
450
|
-
M$
|
|
451
|
-
M$
|
|
452
|
-
M$
|
|
492
|
+
M$b.translateInner(t, origin.x, origin.y);
|
|
493
|
+
M$b.skew(t, skewX, skewY);
|
|
494
|
+
M$b.translateInner(t, -origin.x, -origin.y);
|
|
453
495
|
},
|
|
454
496
|
multiply(t, child) {
|
|
455
497
|
const {a: a, b: b, c: c, d: d, e: e, f: f} = t;
|
|
@@ -488,15 +530,15 @@ var LeaferUI = function(exports) {
|
|
|
488
530
|
to.f = e * parent.b + f * parent.d + parent.f;
|
|
489
531
|
},
|
|
490
532
|
divide(t, child) {
|
|
491
|
-
M$
|
|
533
|
+
M$b.multiply(t, M$b.tempInvert(child));
|
|
492
534
|
},
|
|
493
535
|
divideParent(t, parent) {
|
|
494
|
-
M$
|
|
536
|
+
M$b.multiplyParent(t, M$b.tempInvert(parent));
|
|
495
537
|
},
|
|
496
538
|
tempInvert(t) {
|
|
497
|
-
const {tempMatrix: tempMatrix} = M$
|
|
498
|
-
M$
|
|
499
|
-
M$
|
|
539
|
+
const {tempMatrix: tempMatrix} = M$b;
|
|
540
|
+
M$b.copy(tempMatrix, t);
|
|
541
|
+
M$b.invert(tempMatrix);
|
|
500
542
|
return tempMatrix;
|
|
501
543
|
},
|
|
502
544
|
invert(t) {
|
|
@@ -574,7 +616,7 @@ var LeaferUI = function(exports) {
|
|
|
574
616
|
}
|
|
575
617
|
t.e = x;
|
|
576
618
|
t.f = y;
|
|
577
|
-
if (origin = origin || around) M$
|
|
619
|
+
if (origin = origin || around) M$b.translateInner(t, -origin.x, -origin.y, !around);
|
|
578
620
|
},
|
|
579
621
|
getLayout(t, origin, around, firstSkewY) {
|
|
580
622
|
const {a: a, b: b, c: c, d: d, e: e, f: f} = t;
|
|
@@ -635,10 +677,10 @@ var LeaferUI = function(exports) {
|
|
|
635
677
|
return world;
|
|
636
678
|
},
|
|
637
679
|
reset(t) {
|
|
638
|
-
M$
|
|
680
|
+
M$b.set(t);
|
|
639
681
|
}
|
|
640
682
|
};
|
|
641
|
-
const M$
|
|
683
|
+
const M$b = MatrixHelper;
|
|
642
684
|
const {toInnerPoint: toInnerPoint$2, toOuterPoint: toOuterPoint$3} = MatrixHelper;
|
|
643
685
|
const {sin: sin$5, cos: cos$5, abs: abs$7, sqrt: sqrt$4, atan2: atan2$2, min: min$1, round: round$5} = Math;
|
|
644
686
|
const PointHelper = {
|
|
@@ -973,7 +1015,7 @@ var LeaferUI = function(exports) {
|
|
|
973
1015
|
MatrixHelper.reset(this);
|
|
974
1016
|
}
|
|
975
1017
|
}
|
|
976
|
-
const tempMatrix$
|
|
1018
|
+
const tempMatrix$2 = new Matrix;
|
|
977
1019
|
const TwoPointBoundsHelper = {
|
|
978
1020
|
tempPointBounds: {},
|
|
979
1021
|
setPoint(t, minX, minY) {
|
|
@@ -1103,9 +1145,9 @@ var LeaferUI = function(exports) {
|
|
|
1103
1145
|
let right$4, bottom$3, boundsRight, boundsBottom;
|
|
1104
1146
|
const point$2 = {};
|
|
1105
1147
|
const toPoint$5 = {};
|
|
1106
|
-
const tempBounds$
|
|
1148
|
+
const tempBounds$3 = {};
|
|
1107
1149
|
const BoundsHelper = {
|
|
1108
|
-
tempBounds: tempBounds$
|
|
1150
|
+
tempBounds: tempBounds$3,
|
|
1109
1151
|
set(t, x = 0, y = 0, width = 0, height = 0) {
|
|
1110
1152
|
t.x = x;
|
|
1111
1153
|
t.y = y;
|
|
@@ -1156,19 +1198,11 @@ var LeaferUI = function(exports) {
|
|
|
1156
1198
|
B.move(t, x, y);
|
|
1157
1199
|
return t;
|
|
1158
1200
|
},
|
|
1159
|
-
toOffsetOutBounds(t, to,
|
|
1160
|
-
if (!to)
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
}
|
|
1165
|
-
if (parent) {
|
|
1166
|
-
to.offsetX = -(B.maxX(parent) - t.x);
|
|
1167
|
-
to.offsetY = -(B.maxY(parent) - t.y);
|
|
1168
|
-
} else {
|
|
1169
|
-
to.offsetX = t.x + t.width;
|
|
1170
|
-
to.offsetY = t.y + t.height;
|
|
1171
|
-
}
|
|
1201
|
+
toOffsetOutBounds(t, to, offsetBounds) {
|
|
1202
|
+
if (!to) to = t; else copy$c(to, t);
|
|
1203
|
+
if (!offsetBounds) offsetBounds = t;
|
|
1204
|
+
to.offsetX = B.maxX(offsetBounds);
|
|
1205
|
+
to.offsetY = B.maxY(offsetBounds);
|
|
1172
1206
|
B.move(to, -to.offsetX, -to.offsetY);
|
|
1173
1207
|
},
|
|
1174
1208
|
scale(t, scaleX, scaleY = scaleX, onlySize) {
|
|
@@ -1182,9 +1216,9 @@ var LeaferUI = function(exports) {
|
|
|
1182
1216
|
t.height *= scaleY;
|
|
1183
1217
|
},
|
|
1184
1218
|
tempToOuterOf(t, matrix) {
|
|
1185
|
-
B.copy(tempBounds$
|
|
1186
|
-
B.toOuterOf(tempBounds$
|
|
1187
|
-
return tempBounds$
|
|
1219
|
+
B.copy(tempBounds$3, t);
|
|
1220
|
+
B.toOuterOf(tempBounds$3, matrix);
|
|
1221
|
+
return tempBounds$3;
|
|
1188
1222
|
},
|
|
1189
1223
|
getOuterOf(t, matrix) {
|
|
1190
1224
|
t = Object.assign({}, t);
|
|
@@ -1242,9 +1276,9 @@ var LeaferUI = function(exports) {
|
|
|
1242
1276
|
put(t, put, align = "center", putScale = 1, changeSize = true, to) {
|
|
1243
1277
|
to || (to = put);
|
|
1244
1278
|
if (isString(putScale)) putScale = B.getFitScale(t, put, putScale === "cover");
|
|
1245
|
-
tempBounds$
|
|
1246
|
-
tempBounds$
|
|
1247
|
-
AlignHelper.toPoint(align, tempBounds$
|
|
1279
|
+
tempBounds$3.width = changeSize ? put.width *= putScale : put.width * putScale;
|
|
1280
|
+
tempBounds$3.height = changeSize ? put.height *= putScale : put.height * putScale;
|
|
1281
|
+
AlignHelper.toPoint(align, tempBounds$3, t, to, true, true);
|
|
1248
1282
|
},
|
|
1249
1283
|
getSpread(t, spread, side) {
|
|
1250
1284
|
const n = {};
|
|
@@ -1314,7 +1348,7 @@ var LeaferUI = function(exports) {
|
|
|
1314
1348
|
first = false;
|
|
1315
1349
|
if (!addMode) copy$c(t, bounds);
|
|
1316
1350
|
} else {
|
|
1317
|
-
add$
|
|
1351
|
+
add$2(t, bounds);
|
|
1318
1352
|
}
|
|
1319
1353
|
}
|
|
1320
1354
|
}
|
|
@@ -1328,7 +1362,7 @@ var LeaferUI = function(exports) {
|
|
|
1328
1362
|
B.set(t, point.x, point.y);
|
|
1329
1363
|
},
|
|
1330
1364
|
addPoint(t, point) {
|
|
1331
|
-
add$
|
|
1365
|
+
add$2(t, point, true);
|
|
1332
1366
|
},
|
|
1333
1367
|
getPoints(t) {
|
|
1334
1368
|
const {x: x, y: y, width: width, height: height} = t;
|
|
@@ -1397,7 +1431,7 @@ var LeaferUI = function(exports) {
|
|
|
1397
1431
|
}
|
|
1398
1432
|
};
|
|
1399
1433
|
const B = BoundsHelper;
|
|
1400
|
-
const {add: add$
|
|
1434
|
+
const {add: add$2, copy: copy$c} = B;
|
|
1401
1435
|
class Bounds {
|
|
1402
1436
|
get minX() {
|
|
1403
1437
|
return BoundsHelper.minX(this);
|
|
@@ -1540,7 +1574,7 @@ var LeaferUI = function(exports) {
|
|
|
1540
1574
|
BoundsHelper.reset(this);
|
|
1541
1575
|
}
|
|
1542
1576
|
}
|
|
1543
|
-
const tempBounds$
|
|
1577
|
+
const tempBounds$2 = new Bounds;
|
|
1544
1578
|
class AutoBounds {
|
|
1545
1579
|
constructor(top, right, bottom, left, width, height) {
|
|
1546
1580
|
isObject(top) ? this.copy(top) : this.set(top, right, bottom, left, width, height);
|
|
@@ -2103,7 +2137,7 @@ var LeaferUI = function(exports) {
|
|
|
2103
2137
|
const {pixelRatio: pixelRatio, pixelSnap: pixelSnap} = this, w = this.worldTransform;
|
|
2104
2138
|
if (parentMatrix) multiplyParent$4(matrix, parentMatrix, w);
|
|
2105
2139
|
pixelScale(matrix, pixelRatio, w);
|
|
2106
|
-
if (pixelSnap) {
|
|
2140
|
+
if (pixelSnap && !matrix.ignorePixelSnap) {
|
|
2107
2141
|
if (matrix.half && matrix.half * pixelRatio % 2) w.e = round$4(w.e - .5) + .5, w.f = round$4(w.f - .5) + .5; else w.e = round$4(w.e),
|
|
2108
2142
|
w.f = round$4(w.f);
|
|
2109
2143
|
}
|
|
@@ -2386,12 +2420,12 @@ var LeaferUI = function(exports) {
|
|
|
2386
2420
|
const {sin: sin$4, cos: cos$4, hypot: hypot, atan2: atan2$1, ceil: ceil$2, abs: abs$6, PI: PI$3, sqrt: sqrt$3, pow: pow$1} = Math;
|
|
2387
2421
|
const {setPoint: setPoint$4, addPoint: addPoint$2} = TwoPointBoundsHelper;
|
|
2388
2422
|
const {set: set, toNumberPoints: toNumberPoints$1} = PointHelper;
|
|
2389
|
-
const {M: M$
|
|
2423
|
+
const {M: M$a, L: L$a, C: C$8, Q: Q$7, Z: Z$8} = PathCommandMap;
|
|
2390
2424
|
const tempPoint$2 = {};
|
|
2391
2425
|
const BezierHelper = {
|
|
2392
2426
|
points(data, originPoints, curve, close) {
|
|
2393
2427
|
let points = toNumberPoints$1(originPoints);
|
|
2394
|
-
data.push(M$
|
|
2428
|
+
data.push(M$a, points[0], points[1]);
|
|
2395
2429
|
if (curve && points.length > 5) {
|
|
2396
2430
|
let aX, aY, bX, bY, cX, cY, c1X, c1Y, c2X, c2Y;
|
|
2397
2431
|
let ba, cb, d, len = points.length;
|
|
@@ -2498,7 +2532,7 @@ var LeaferUI = function(exports) {
|
|
|
2498
2532
|
let startX = x = rotationCos * radiusX * startCos - rotationSin * radiusY * startSin;
|
|
2499
2533
|
let startY = y = rotationSin * radiusX * startCos + rotationCos * radiusY * startSin;
|
|
2500
2534
|
let fromX = cx + x, fromY = cy + y;
|
|
2501
|
-
if (data) data.push(data.length ? L$a : M$
|
|
2535
|
+
if (data) data.push(data.length ? L$a : M$a, fromX, fromY);
|
|
2502
2536
|
if (setPointBounds) setPoint$4(setPointBounds, fromX, fromY);
|
|
2503
2537
|
if (setStartPoint) set(setStartPoint, fromX, fromY);
|
|
2504
2538
|
for (let i = 0; i < parts; i++) {
|
|
@@ -2623,7 +2657,7 @@ var LeaferUI = function(exports) {
|
|
|
2623
2657
|
}
|
|
2624
2658
|
}
|
|
2625
2659
|
};
|
|
2626
|
-
const {M: M$
|
|
2660
|
+
const {M: M$9, m: m, L: L$9, l: l, H: H, h: h, V: V, v: v, C: C$7, c: c, S: S, s: s, Q: Q$6, q: q, T: T, t: t, A: A, a: a, Z: Z$7, z: z, N: N$5, D: D$6, X: X$5, G: G$5, F: F$6, O: O$6, P: P$5, U: U$5} = PathCommandMap;
|
|
2627
2661
|
const {rect: rect$3, roundRect: roundRect$2, arcTo: arcTo$3, arc: arc$3, ellipse: ellipse$4, quadraticCurveTo: quadraticCurveTo$1} = BezierHelper;
|
|
2628
2662
|
const {ellipticalArc: ellipticalArc} = EllipseHelper;
|
|
2629
2663
|
const debug$f = Debug.get("PathConvert");
|
|
@@ -2710,10 +2744,10 @@ var LeaferUI = function(exports) {
|
|
|
2710
2744
|
old[i + 1] += x;
|
|
2711
2745
|
old[i + 2] += y;
|
|
2712
2746
|
|
|
2713
|
-
case M$
|
|
2747
|
+
case M$9:
|
|
2714
2748
|
x = old[i + 1];
|
|
2715
2749
|
y = old[i + 2];
|
|
2716
|
-
data.push(M$
|
|
2750
|
+
data.push(M$9, x, y);
|
|
2717
2751
|
i += 3;
|
|
2718
2752
|
break;
|
|
2719
2753
|
|
|
@@ -2900,7 +2934,7 @@ var LeaferUI = function(exports) {
|
|
|
2900
2934
|
list.forEach(item => {
|
|
2901
2935
|
switch (item.name) {
|
|
2902
2936
|
case "M":
|
|
2903
|
-
data.push(M$
|
|
2937
|
+
data.push(M$9, item.x, item.y);
|
|
2904
2938
|
break;
|
|
2905
2939
|
|
|
2906
2940
|
case "L":
|
|
@@ -2937,7 +2971,7 @@ var LeaferUI = function(exports) {
|
|
|
2937
2971
|
}
|
|
2938
2972
|
};
|
|
2939
2973
|
const {current: current, pushData: pushData, copyData: copyData} = PathConvert;
|
|
2940
|
-
const {M: M$
|
|
2974
|
+
const {M: M$8, L: L$8, C: C$6, Q: Q$5, Z: Z$6, N: N$4, D: D$5, X: X$4, G: G$4, F: F$5, O: O$5, P: P$4, U: U$4} = PathCommandMap;
|
|
2941
2975
|
const {getMinDistanceFrom: getMinDistanceFrom, getRadianFrom: getRadianFrom} = PointHelper;
|
|
2942
2976
|
const {tan: tan, min: min, abs: abs$5} = Math;
|
|
2943
2977
|
const startPoint = {};
|
|
@@ -2946,7 +2980,7 @@ var LeaferUI = function(exports) {
|
|
|
2946
2980
|
data.length = 0;
|
|
2947
2981
|
},
|
|
2948
2982
|
moveTo(data, x, y) {
|
|
2949
|
-
data.push(M$
|
|
2983
|
+
data.push(M$8, x, y);
|
|
2950
2984
|
},
|
|
2951
2985
|
lineTo(data, x, y) {
|
|
2952
2986
|
data.push(L$8, x, y);
|
|
@@ -3001,12 +3035,12 @@ var LeaferUI = function(exports) {
|
|
|
3001
3035
|
},
|
|
3002
3036
|
drawEllipse(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise) {
|
|
3003
3037
|
BezierHelper.ellipse(null, x, y, radiusX, radiusY, isNull(rotation) ? 0 : rotation, isNull(startAngle) ? 0 : startAngle, isNull(endAngle) ? 360 : endAngle, anticlockwise, null, null, startPoint);
|
|
3004
|
-
data.push(M$
|
|
3038
|
+
data.push(M$8, startPoint.x, startPoint.y);
|
|
3005
3039
|
ellipse$3(data, x, y, radiusX, radiusY, rotation, startAngle, endAngle, anticlockwise);
|
|
3006
3040
|
},
|
|
3007
3041
|
drawArc(data, x, y, radius, startAngle, endAngle, anticlockwise) {
|
|
3008
3042
|
BezierHelper.arc(null, x, y, radius, isNull(startAngle) ? 0 : startAngle, isNull(endAngle) ? 360 : endAngle, anticlockwise, null, null, startPoint);
|
|
3009
|
-
data.push(M$
|
|
3043
|
+
data.push(M$8, startPoint.x, startPoint.y);
|
|
3010
3044
|
arc$2(data, x, y, radius, startAngle, endAngle, anticlockwise);
|
|
3011
3045
|
},
|
|
3012
3046
|
drawPoints(data, points, curve, close) {
|
|
@@ -3104,7 +3138,7 @@ var LeaferUI = function(exports) {
|
|
|
3104
3138
|
}
|
|
3105
3139
|
paint() {}
|
|
3106
3140
|
}
|
|
3107
|
-
const {M: M$
|
|
3141
|
+
const {M: M$7, L: L$7, C: C$5, Q: Q$4, Z: Z$5, N: N$3, D: D$4, X: X$3, G: G$3, F: F$4, O: O$4, P: P$3, U: U$3} = PathCommandMap;
|
|
3108
3142
|
const debug$e = Debug.get("PathDrawer");
|
|
3109
3143
|
const PathDrawer = {
|
|
3110
3144
|
drawPathByData(drawer, data) {
|
|
@@ -3114,7 +3148,7 @@ var LeaferUI = function(exports) {
|
|
|
3114
3148
|
while (i < len) {
|
|
3115
3149
|
command = data[i];
|
|
3116
3150
|
switch (command) {
|
|
3117
|
-
case M$
|
|
3151
|
+
case M$7:
|
|
3118
3152
|
drawer.moveTo(data[i + 1], data[i + 2]);
|
|
3119
3153
|
i += 3;
|
|
3120
3154
|
break;
|
|
@@ -3186,7 +3220,7 @@ var LeaferUI = function(exports) {
|
|
|
3186
3220
|
}
|
|
3187
3221
|
}
|
|
3188
3222
|
};
|
|
3189
|
-
const {M: M$
|
|
3223
|
+
const {M: M$6, L: L$6, C: C$4, Q: Q$3, Z: Z$4, N: N$2, D: D$3, X: X$2, G: G$2, F: F$3, O: O$3, P: P$2, U: U$2} = PathCommandMap;
|
|
3190
3224
|
const {toTwoPointBounds: toTwoPointBounds, toTwoPointBoundsByQuadraticCurve: toTwoPointBoundsByQuadraticCurve, arcTo: arcTo$1, arc: arc, ellipse: ellipse$1} = BezierHelper;
|
|
3191
3225
|
const {addPointBounds: addPointBounds, copy: copy$a, addPoint: addPoint$1, setPoint: setPoint$3, addBounds: addBounds, toBounds: toBounds$2} = TwoPointBoundsHelper;
|
|
3192
3226
|
const debug$d = Debug.get("PathBounds");
|
|
@@ -3213,7 +3247,7 @@ var LeaferUI = function(exports) {
|
|
|
3213
3247
|
}
|
|
3214
3248
|
}
|
|
3215
3249
|
switch (command) {
|
|
3216
|
-
case M$
|
|
3250
|
+
case M$6:
|
|
3217
3251
|
case L$6:
|
|
3218
3252
|
x = data[i + 1];
|
|
3219
3253
|
y = data[i + 2];
|
|
@@ -3312,7 +3346,7 @@ var LeaferUI = function(exports) {
|
|
|
3312
3346
|
}
|
|
3313
3347
|
}
|
|
3314
3348
|
};
|
|
3315
|
-
const {M: M$
|
|
3349
|
+
const {M: M$5, L: L$5, Z: Z$3} = PathCommandMap;
|
|
3316
3350
|
const {getCenterX: getCenterX, getCenterY: getCenterY} = PointHelper;
|
|
3317
3351
|
const {arcTo: arcTo} = PathCommandDataHelper;
|
|
3318
3352
|
const PathCorner = {
|
|
@@ -3324,16 +3358,16 @@ var LeaferUI = function(exports) {
|
|
|
3324
3358
|
while (i < len) {
|
|
3325
3359
|
command = data[i];
|
|
3326
3360
|
switch (command) {
|
|
3327
|
-
case M$
|
|
3361
|
+
case M$5:
|
|
3328
3362
|
startX = lastX = data[i + 1];
|
|
3329
3363
|
startY = lastY = data[i + 2];
|
|
3330
3364
|
i += 3;
|
|
3331
3365
|
if (data[i] === L$5) {
|
|
3332
3366
|
secondX = data[i + 1];
|
|
3333
3367
|
secondY = data[i + 2];
|
|
3334
|
-
smooth.push(M$
|
|
3368
|
+
smooth.push(M$5, getCenterX(startX, secondX), getCenterY(startY, secondY));
|
|
3335
3369
|
} else {
|
|
3336
|
-
smooth.push(M$
|
|
3370
|
+
smooth.push(M$5, startX, startY);
|
|
3337
3371
|
}
|
|
3338
3372
|
break;
|
|
3339
3373
|
|
|
@@ -3753,7 +3787,7 @@ var LeaferUI = function(exports) {
|
|
|
3753
3787
|
};
|
|
3754
3788
|
const I$1 = ImageManager;
|
|
3755
3789
|
const {IMAGE: IMAGE, create: create$1} = IncrementId;
|
|
3756
|
-
const {floor: floor$2, max: max$
|
|
3790
|
+
const {floor: floor$2, max: max$4} = Math;
|
|
3757
3791
|
class LeaferImage {
|
|
3758
3792
|
get url() {
|
|
3759
3793
|
return this.config.url;
|
|
@@ -3841,7 +3875,7 @@ var LeaferUI = function(exports) {
|
|
|
3841
3875
|
}
|
|
3842
3876
|
if (data) return data;
|
|
3843
3877
|
}
|
|
3844
|
-
const canvas = Platform.origin.createCanvas(max$
|
|
3878
|
+
const canvas = Platform.origin.createCanvas(max$4(floor$2(width + (xGap || 0)), 1), max$4(floor$2(height + (yGap || 0)), 1));
|
|
3845
3879
|
const ctx = canvas.getContext("2d");
|
|
3846
3880
|
if (opacity) ctx.globalAlpha = opacity;
|
|
3847
3881
|
ctx.imageSmoothingEnabled = smooth === false ? false : true;
|
|
@@ -4573,7 +4607,7 @@ var LeaferUI = function(exports) {
|
|
|
4573
4607
|
}
|
|
4574
4608
|
};
|
|
4575
4609
|
const {getRelativeWorld: getRelativeWorld$1, updateBounds: updateBounds$3} = LeafHelper;
|
|
4576
|
-
const {toOuterOf: toOuterOf$
|
|
4610
|
+
const {toOuterOf: toOuterOf$3, getPoints: getPoints, copy: copy$8} = BoundsHelper;
|
|
4577
4611
|
const localContent = "_localContentBounds";
|
|
4578
4612
|
const worldContent = "_worldContentBounds", worldBox = "_worldBoxBounds", worldStroke = "_worldStrokeBounds";
|
|
4579
4613
|
class LeafLayout {
|
|
@@ -4593,7 +4627,7 @@ var LeaferUI = function(exports) {
|
|
|
4593
4627
|
this._renderBounds = bounds;
|
|
4594
4628
|
}
|
|
4595
4629
|
get localContentBounds() {
|
|
4596
|
-
toOuterOf$
|
|
4630
|
+
toOuterOf$3(this.contentBounds, this.leaf.__localMatrix, this[localContent] || (this[localContent] = {}));
|
|
4597
4631
|
return this[localContent];
|
|
4598
4632
|
}
|
|
4599
4633
|
get localStrokeBounds() {
|
|
@@ -4603,15 +4637,15 @@ var LeaferUI = function(exports) {
|
|
|
4603
4637
|
return this._localRenderBounds || this;
|
|
4604
4638
|
}
|
|
4605
4639
|
get worldContentBounds() {
|
|
4606
|
-
toOuterOf$
|
|
4640
|
+
toOuterOf$3(this.contentBounds, this.leaf.__world, this[worldContent] || (this[worldContent] = {}));
|
|
4607
4641
|
return this[worldContent];
|
|
4608
4642
|
}
|
|
4609
4643
|
get worldBoxBounds() {
|
|
4610
|
-
toOuterOf$
|
|
4644
|
+
toOuterOf$3(this.boxBounds, this.leaf.__world, this[worldBox] || (this[worldBox] = {}));
|
|
4611
4645
|
return this[worldBox];
|
|
4612
4646
|
}
|
|
4613
4647
|
get worldStrokeBounds() {
|
|
4614
|
-
toOuterOf$
|
|
4648
|
+
toOuterOf$3(this.strokeBounds, this.leaf.__world, this[worldStroke] || (this[worldStroke] = {}));
|
|
4615
4649
|
return this[worldStroke];
|
|
4616
4650
|
}
|
|
4617
4651
|
get a() {
|
|
@@ -5382,12 +5416,12 @@ var LeaferUI = function(exports) {
|
|
|
5382
5416
|
};
|
|
5383
5417
|
const {updateMatrix: updateMatrix$3, updateAllMatrix: updateAllMatrix$3} = LeafHelper;
|
|
5384
5418
|
const {updateBounds: updateBounds$2} = BranchHelper;
|
|
5385
|
-
const {toOuterOf: toOuterOf$
|
|
5419
|
+
const {toOuterOf: toOuterOf$2, copyAndSpread: copyAndSpread$3, copy: copy$7} = BoundsHelper;
|
|
5386
5420
|
const {toBounds: toBounds$1} = PathBounds;
|
|
5387
5421
|
const LeafBounds = {
|
|
5388
5422
|
__updateWorldBounds() {
|
|
5389
5423
|
const layout = this.__layout;
|
|
5390
|
-
toOuterOf$
|
|
5424
|
+
toOuterOf$2(layout.renderBounds, this.__world, this.__world);
|
|
5391
5425
|
if (layout.resized) {
|
|
5392
5426
|
if (layout.resized === "inner") this.__onUpdateSize();
|
|
5393
5427
|
if (this.__hasLocalEvent) BoundsEvent.emitLocal(this);
|
|
@@ -5443,13 +5477,13 @@ var LeaferUI = function(exports) {
|
|
|
5443
5477
|
__updateLocalBoxBounds() {
|
|
5444
5478
|
if (this.__hasMotionPath) this.__updateMotionPath();
|
|
5445
5479
|
if (this.__hasAutoLayout) this.__updateAutoLayout();
|
|
5446
|
-
toOuterOf$
|
|
5480
|
+
toOuterOf$2(this.__layout.boxBounds, this.__local, this.__local);
|
|
5447
5481
|
},
|
|
5448
5482
|
__updateLocalStrokeBounds() {
|
|
5449
|
-
toOuterOf$
|
|
5483
|
+
toOuterOf$2(this.__layout.strokeBounds, this.__localMatrix, this.__layout.localStrokeBounds);
|
|
5450
5484
|
},
|
|
5451
5485
|
__updateLocalRenderBounds() {
|
|
5452
|
-
toOuterOf$
|
|
5486
|
+
toOuterOf$2(this.__layout.renderBounds, this.__localMatrix, this.__layout.localRenderBounds);
|
|
5453
5487
|
},
|
|
5454
5488
|
__updateBoxBounds(_secondLayout, _bounds) {
|
|
5455
5489
|
const b = this.__layout.boxBounds;
|
|
@@ -5487,11 +5521,11 @@ var LeaferUI = function(exports) {
|
|
|
5487
5521
|
},
|
|
5488
5522
|
__updateStrokeBounds(_bounds) {
|
|
5489
5523
|
const layout = this.__layout;
|
|
5490
|
-
copyAndSpread$
|
|
5524
|
+
copyAndSpread$3(layout.strokeBounds, layout.boxBounds, layout.strokeBoxSpread);
|
|
5491
5525
|
},
|
|
5492
5526
|
__updateRenderBounds(_bounds) {
|
|
5493
|
-
const layout = this.__layout;
|
|
5494
|
-
|
|
5527
|
+
const layout = this.__layout, {renderSpread: renderSpread} = layout;
|
|
5528
|
+
isNumber(renderSpread) && renderSpread <= 0 ? copy$7(layout.renderBounds, layout.strokeBounds) : copyAndSpread$3(layout.renderBounds, layout.boxBounds, renderSpread);
|
|
5495
5529
|
}
|
|
5496
5530
|
};
|
|
5497
5531
|
const LeafRender = {
|
|
@@ -5583,9 +5617,10 @@ var LeaferUI = function(exports) {
|
|
|
5583
5617
|
};
|
|
5584
5618
|
const tempScaleData$1 = {};
|
|
5585
5619
|
const {LEAF: LEAF, create: create} = IncrementId;
|
|
5620
|
+
const {stintSet: stintSet$3} = DataHelper;
|
|
5586
5621
|
const {toInnerPoint: toInnerPoint, toOuterPoint: toOuterPoint, multiplyParent: multiplyParent$1} = MatrixHelper;
|
|
5587
|
-
const {toOuterOf: toOuterOf} = BoundsHelper;
|
|
5588
|
-
const {copy: copy$6, move: move$
|
|
5622
|
+
const {toOuterOf: toOuterOf$1} = BoundsHelper;
|
|
5623
|
+
const {copy: copy$6, move: move$8} = PointHelper;
|
|
5589
5624
|
const {moveLocal: moveLocal, zoomOfLocal: zoomOfLocal, rotateOfLocal: rotateOfLocal, skewOfLocal: skewOfLocal, moveWorld: moveWorld, zoomOfWorld: zoomOfWorld, rotateOfWorld: rotateOfWorld, skewOfWorld: skewOfWorld, transform: transform, transformWorld: transformWorld, setTransform: setTransform, getFlipTransform: getFlipTransform, getLocalOrigin: getLocalOrigin, getRelativeWorld: getRelativeWorld, drop: drop} = LeafHelper;
|
|
5590
5625
|
exports.Leaf = class Leaf {
|
|
5591
5626
|
get tag() {
|
|
@@ -5859,8 +5894,9 @@ var LeaferUI = function(exports) {
|
|
|
5859
5894
|
if (!this.__cameraWorld) this.__cameraWorld = {};
|
|
5860
5895
|
const cameraWorld = this.__cameraWorld, world = this.__world;
|
|
5861
5896
|
multiplyParent$1(world, options.matrix, cameraWorld, undefined, world);
|
|
5862
|
-
toOuterOf(this.__layout.renderBounds, cameraWorld, cameraWorld);
|
|
5863
|
-
cameraWorld
|
|
5897
|
+
toOuterOf$1(this.__layout.renderBounds, cameraWorld, cameraWorld);
|
|
5898
|
+
stintSet$3(cameraWorld, "half", world.half);
|
|
5899
|
+
stintSet$3(cameraWorld, "ignorePixelSnap", world.ignorePixelSnap);
|
|
5864
5900
|
return cameraWorld;
|
|
5865
5901
|
} else {
|
|
5866
5902
|
return this.__world;
|
|
@@ -5894,7 +5930,7 @@ var LeaferUI = function(exports) {
|
|
|
5894
5930
|
getWorldBounds(inner, relative, change) {
|
|
5895
5931
|
const matrix = relative ? getRelativeWorld(this, relative) : this.worldTransform;
|
|
5896
5932
|
const to = change ? inner : {};
|
|
5897
|
-
toOuterOf(inner, matrix, to);
|
|
5933
|
+
toOuterOf$1(inner, matrix, to);
|
|
5898
5934
|
return to;
|
|
5899
5935
|
}
|
|
5900
5936
|
worldToLocal(world, to, distance, relative) {
|
|
@@ -5927,7 +5963,7 @@ var LeaferUI = function(exports) {
|
|
|
5927
5963
|
}
|
|
5928
5964
|
getBoxPointByInner(inner, _relative, _distance, change) {
|
|
5929
5965
|
const point = change ? inner : Object.assign({}, inner), {x: x, y: y} = this.boxBounds;
|
|
5930
|
-
move$
|
|
5966
|
+
move$8(point, -x, -y);
|
|
5931
5967
|
return point;
|
|
5932
5968
|
}
|
|
5933
5969
|
getInnerPoint(world, relative, distance, change) {
|
|
@@ -5937,7 +5973,7 @@ var LeaferUI = function(exports) {
|
|
|
5937
5973
|
}
|
|
5938
5974
|
getInnerPointByBox(box, _relative, _distance, change) {
|
|
5939
5975
|
const point = change ? box : Object.assign({}, box), {x: x, y: y} = this.boxBounds;
|
|
5940
|
-
move$
|
|
5976
|
+
move$8(point, x, y);
|
|
5941
5977
|
return point;
|
|
5942
5978
|
}
|
|
5943
5979
|
getInnerPointByLocal(local, _relative, distance, change) {
|
|
@@ -6373,7 +6409,7 @@ var LeaferUI = function(exports) {
|
|
|
6373
6409
|
this.levelMap = null;
|
|
6374
6410
|
}
|
|
6375
6411
|
}
|
|
6376
|
-
const version = "1.9.
|
|
6412
|
+
const version = "1.9.8";
|
|
6377
6413
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6378
6414
|
get allowBackgroundColor() {
|
|
6379
6415
|
return true;
|
|
@@ -6771,6 +6807,7 @@ var LeaferUI = function(exports) {
|
|
|
6771
6807
|
usePartRender: true,
|
|
6772
6808
|
maxFPS: 120
|
|
6773
6809
|
};
|
|
6810
|
+
this.frames = [];
|
|
6774
6811
|
this.target = target;
|
|
6775
6812
|
this.canvas = canvas;
|
|
6776
6813
|
if (userConfig) this.config = DataHelper.default(userConfig, this.config);
|
|
@@ -6923,12 +6960,15 @@ var LeaferUI = function(exports) {
|
|
|
6923
6960
|
const target = this.target;
|
|
6924
6961
|
if (this.requestTime || !target) return;
|
|
6925
6962
|
if (target.parentApp) return target.parentApp.requestRender(false);
|
|
6926
|
-
|
|
6963
|
+
this.requestTime = this.frameTime || Date.now();
|
|
6927
6964
|
const render = () => {
|
|
6928
|
-
const nowFPS = 1e3 / (Date.now() - requestTime);
|
|
6965
|
+
const nowFPS = 1e3 / ((this.frameTime = Date.now()) - this.requestTime);
|
|
6929
6966
|
const {maxFPS: maxFPS} = this.config;
|
|
6930
|
-
if (maxFPS && nowFPS > maxFPS
|
|
6931
|
-
|
|
6967
|
+
if (maxFPS && nowFPS > maxFPS) return Platform.requestRender(render);
|
|
6968
|
+
const {frames: frames} = this;
|
|
6969
|
+
if (frames.length > 30) frames.shift();
|
|
6970
|
+
frames.push(nowFPS);
|
|
6971
|
+
this.FPS = Math.round(frames.reduce((a, b) => a + b, 0) / frames.length);
|
|
6932
6972
|
this.requestTime = 0;
|
|
6933
6973
|
this.checkRender();
|
|
6934
6974
|
};
|
|
@@ -7538,39 +7578,40 @@ var LeaferUI = function(exports) {
|
|
|
7538
7578
|
return data;
|
|
7539
7579
|
}
|
|
7540
7580
|
}
|
|
7581
|
+
const {max: max$3, add: add$1} = FourNumberHelper;
|
|
7541
7582
|
const UIBounds = {
|
|
7542
7583
|
__updateStrokeSpread() {
|
|
7543
|
-
let
|
|
7584
|
+
let spread = 0, boxSpread = 0;
|
|
7544
7585
|
const data = this.__, {strokeAlign: strokeAlign, __maxStrokeWidth: strokeWidth} = data, box = this.__box;
|
|
7545
7586
|
if ((data.stroke || data.hitStroke === "all") && strokeWidth && strokeAlign !== "inside") {
|
|
7546
|
-
|
|
7587
|
+
boxSpread = spread = strokeAlign === "center" ? strokeWidth / 2 : strokeWidth;
|
|
7547
7588
|
if (!data.__boxStroke) {
|
|
7548
|
-
const miterLimitAddWidth = data.__isLinePath ? 0 : 10 *
|
|
7589
|
+
const miterLimitAddWidth = data.__isLinePath ? 0 : 10 * spread;
|
|
7549
7590
|
const storkeCapAddWidth = data.strokeCap === "none" ? 0 : strokeWidth;
|
|
7550
|
-
|
|
7591
|
+
spread += Math.max(miterLimitAddWidth, storkeCapAddWidth);
|
|
7551
7592
|
}
|
|
7552
7593
|
}
|
|
7553
|
-
if (data.__useArrow)
|
|
7594
|
+
if (data.__useArrow) spread += strokeWidth * 5;
|
|
7554
7595
|
if (box) {
|
|
7555
|
-
|
|
7556
|
-
|
|
7596
|
+
spread = max$3(spread, box.__layout.strokeSpread = box.__updateStrokeSpread());
|
|
7597
|
+
boxSpread = Math.max(boxSpread, box.__layout.strokeBoxSpread);
|
|
7557
7598
|
}
|
|
7558
|
-
this.__layout.strokeBoxSpread =
|
|
7559
|
-
return
|
|
7599
|
+
this.__layout.strokeBoxSpread = boxSpread;
|
|
7600
|
+
return spread;
|
|
7560
7601
|
},
|
|
7561
7602
|
__updateRenderSpread() {
|
|
7562
|
-
let
|
|
7563
|
-
const {shadow: shadow, innerShadow: innerShadow, blur: blur, backgroundBlur: backgroundBlur, filter: filter, renderSpread: renderSpread} = this.__;
|
|
7564
|
-
if (shadow)
|
|
7565
|
-
if (blur)
|
|
7566
|
-
if (filter)
|
|
7567
|
-
if (renderSpread)
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
if (
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
return
|
|
7603
|
+
let spread = 0;
|
|
7604
|
+
const {shadow: shadow, innerShadow: innerShadow, blur: blur, backgroundBlur: backgroundBlur, filter: filter, renderSpread: renderSpread} = this.__, {strokeSpread: strokeSpread} = this.__layout, box = this.__box;
|
|
7605
|
+
if (shadow) spread = Effect.getShadowRenderSpread(this, shadow);
|
|
7606
|
+
if (blur) spread = max$3(spread, blur);
|
|
7607
|
+
if (filter) spread = add$1(spread, Filter.getSpread(filter));
|
|
7608
|
+
if (renderSpread) spread = add$1(spread, renderSpread);
|
|
7609
|
+
if (strokeSpread) spread = add$1(spread, strokeSpread);
|
|
7610
|
+
let shapeSpread = spread;
|
|
7611
|
+
if (innerShadow) shapeSpread = max$3(shapeSpread, Effect.getInnerShadowSpread(this, innerShadow));
|
|
7612
|
+
if (backgroundBlur) shapeSpread = max$3(shapeSpread, backgroundBlur);
|
|
7613
|
+
this.__layout.renderShapeSpread = shapeSpread;
|
|
7614
|
+
return box ? max$3(box.__updateRenderSpread(), spread) : spread;
|
|
7574
7615
|
}
|
|
7575
7616
|
};
|
|
7576
7617
|
const {float: float$1} = MathHelper;
|
|
@@ -8712,7 +8753,7 @@ var LeaferUI = function(exports) {
|
|
|
8712
8753
|
__decorate([ dataType(false) ], exports.Canvas.prototype, "safeResize", void 0);
|
|
8713
8754
|
__decorate([ resizeType() ], exports.Canvas.prototype, "contextSettings", void 0);
|
|
8714
8755
|
exports.Canvas = __decorate([ registerUI() ], exports.Canvas);
|
|
8715
|
-
const {copyAndSpread: copyAndSpread$
|
|
8756
|
+
const {copyAndSpread: copyAndSpread$2, includes: includes, spread: spread, setList: setList} = BoundsHelper;
|
|
8716
8757
|
exports.Text = class Text extends exports.UI {
|
|
8717
8758
|
get __tag() {
|
|
8718
8759
|
return "Text";
|
|
@@ -8758,13 +8799,13 @@ var LeaferUI = function(exports) {
|
|
|
8758
8799
|
if (this.isOverflow) setList(data.__textBoxBounds = {}, [ b, contentBounds ]), layout.renderChanged = true; else data.__textBoxBounds = b;
|
|
8759
8800
|
}
|
|
8760
8801
|
__updateRenderSpread() {
|
|
8761
|
-
let
|
|
8762
|
-
if (!
|
|
8763
|
-
return
|
|
8802
|
+
let spread = super.__updateRenderSpread();
|
|
8803
|
+
if (!spread) spread = this.isOverflow ? 1 : 0;
|
|
8804
|
+
return spread;
|
|
8764
8805
|
}
|
|
8765
8806
|
__updateRenderBounds() {
|
|
8766
8807
|
const {renderBounds: renderBounds, renderSpread: renderSpread} = this.__layout;
|
|
8767
|
-
copyAndSpread$
|
|
8808
|
+
copyAndSpread$2(renderBounds, this.__.__textBoxBounds, renderSpread);
|
|
8768
8809
|
if (this.__box) this.__box.__layout.renderBounds = renderBounds;
|
|
8769
8810
|
}
|
|
8770
8811
|
__updateChange() {
|
|
@@ -9123,9 +9164,9 @@ var LeaferUI = function(exports) {
|
|
|
9123
9164
|
static setData(data) {
|
|
9124
9165
|
this.data = data;
|
|
9125
9166
|
}
|
|
9126
|
-
static getValidMove(leaf,
|
|
9127
|
-
const move = leaf.getLocalPoint(
|
|
9128
|
-
PointHelper.move(move,
|
|
9167
|
+
static getValidMove(leaf, localStart, worldTotal, checkLimit = true) {
|
|
9168
|
+
const move = leaf.getLocalPoint(worldTotal, null, true);
|
|
9169
|
+
PointHelper.move(move, localStart.x - leaf.x, localStart.y - leaf.y);
|
|
9129
9170
|
if (checkLimit) this.limitMove(leaf, move);
|
|
9130
9171
|
DragBoundsHelper.axisMove(leaf, move);
|
|
9131
9172
|
return move;
|
|
@@ -10079,8 +10120,8 @@ var LeaferUI = function(exports) {
|
|
|
10079
10120
|
if (isHitPixel) {
|
|
10080
10121
|
const {renderBounds: renderBounds} = this.__layout;
|
|
10081
10122
|
const size = Platform.image.hitCanvasSize;
|
|
10082
|
-
const scale = h.hitScale = tempBounds$
|
|
10083
|
-
const {x: x, y: y, width: width, height: height} = tempBounds$
|
|
10123
|
+
const scale = h.hitScale = tempBounds$2.set(0, 0, size, size).getFitMatrix(renderBounds).a;
|
|
10124
|
+
const {x: x, y: y, width: width, height: height} = tempBounds$2.set(renderBounds).scale(scale);
|
|
10084
10125
|
h.resize({
|
|
10085
10126
|
width: width,
|
|
10086
10127
|
height: height,
|
|
@@ -10167,8 +10208,8 @@ var LeaferUI = function(exports) {
|
|
|
10167
10208
|
canvas$1.hitPixel = function(radiusPoint, offset, scale = 1) {
|
|
10168
10209
|
let {x: x, y: y, radiusX: radiusX, radiusY: radiusY} = radiusPoint;
|
|
10169
10210
|
if (offset) x -= offset.x, y -= offset.y;
|
|
10170
|
-
tempBounds$
|
|
10171
|
-
const {data: data} = this.context.getImageData(tempBounds$
|
|
10211
|
+
tempBounds$2.set(x - radiusX, y - radiusY, radiusX * 2, radiusY * 2).scale(scale).ceil();
|
|
10212
|
+
const {data: data} = this.context.getImageData(tempBounds$2.x, tempBounds$2.y, tempBounds$2.width || 1, tempBounds$2.height || 1);
|
|
10172
10213
|
for (let i = 0, len = data.length; i < len; i += 4) {
|
|
10173
10214
|
if (data[i + 3] > 0) return true;
|
|
10174
10215
|
}
|
|
@@ -10353,23 +10394,27 @@ var LeaferUI = function(exports) {
|
|
|
10353
10394
|
out.recycle(ui.__nowWorld);
|
|
10354
10395
|
}
|
|
10355
10396
|
}
|
|
10356
|
-
const {getSpread: getSpread, getOuterOf: getOuterOf, getByMove: getByMove, getIntersectData: getIntersectData} = BoundsHelper;
|
|
10397
|
+
const {getSpread: getSpread, copyAndSpread: copyAndSpread$1, toOuterOf: toOuterOf, getOuterOf: getOuterOf, getByMove: getByMove, move: move$7, getIntersectData: getIntersectData} = BoundsHelper;
|
|
10398
|
+
const tempBounds$1 = {};
|
|
10357
10399
|
function shape(ui, current, options) {
|
|
10358
10400
|
const canvas = current.getSameCanvas();
|
|
10359
|
-
const nowWorld = ui.__nowWorld,
|
|
10360
|
-
|
|
10401
|
+
const currentBounds = current.bounds, nowWorld = ui.__nowWorld, layout = ui.__layout;
|
|
10402
|
+
const nowWorldShapeBounds = ui.__nowWorldShapeBounds || (ui.__nowWorldShapeBounds = {});
|
|
10403
|
+
toOuterOf(layout.strokeSpread ? (copyAndSpread$1(tempBounds$1, layout.boxBounds, layout.strokeSpread),
|
|
10404
|
+
tempBounds$1) : layout.boxBounds, nowWorld, nowWorldShapeBounds);
|
|
10405
|
+
let bounds, renderBounds, matrix, fitMatrix, shapeBounds, worldCanvas;
|
|
10361
10406
|
let {scaleX: scaleX, scaleY: scaleY} = ui.getRenderScaleData(true);
|
|
10362
|
-
if (currentBounds.includes(
|
|
10407
|
+
if (currentBounds.includes(nowWorldShapeBounds)) {
|
|
10363
10408
|
worldCanvas = canvas;
|
|
10364
|
-
bounds = shapeBounds =
|
|
10409
|
+
bounds = shapeBounds = nowWorldShapeBounds;
|
|
10410
|
+
renderBounds = nowWorld;
|
|
10365
10411
|
} else {
|
|
10366
|
-
const {renderShapeSpread: spread} = ui.__layout;
|
|
10367
10412
|
let worldClipBounds;
|
|
10368
10413
|
if (Platform.fullImageShadow) {
|
|
10369
|
-
worldClipBounds =
|
|
10414
|
+
worldClipBounds = nowWorldShapeBounds;
|
|
10370
10415
|
} else {
|
|
10371
|
-
const spreadBounds =
|
|
10372
|
-
worldClipBounds = getIntersectData(spreadBounds,
|
|
10416
|
+
const spreadBounds = layout.renderShapeSpread ? getSpread(currentBounds, FourNumberHelper.swapAndScale(layout.renderShapeSpread, scaleX, scaleY)) : currentBounds;
|
|
10417
|
+
worldClipBounds = getIntersectData(spreadBounds, nowWorldShapeBounds);
|
|
10373
10418
|
}
|
|
10374
10419
|
fitMatrix = currentBounds.getFitMatrix(worldClipBounds);
|
|
10375
10420
|
let {a: fitScaleX, d: fitScaleY} = fitMatrix;
|
|
@@ -10379,8 +10424,10 @@ var LeaferUI = function(exports) {
|
|
|
10379
10424
|
scaleX *= fitScaleX;
|
|
10380
10425
|
scaleY *= fitScaleY;
|
|
10381
10426
|
}
|
|
10382
|
-
shapeBounds = getOuterOf(
|
|
10427
|
+
shapeBounds = getOuterOf(nowWorldShapeBounds, fitMatrix);
|
|
10383
10428
|
bounds = getByMove(shapeBounds, -fitMatrix.e, -fitMatrix.f);
|
|
10429
|
+
renderBounds = getOuterOf(nowWorld, fitMatrix);
|
|
10430
|
+
move$7(renderBounds, -fitMatrix.e, -fitMatrix.f);
|
|
10384
10431
|
const userMatrix = options.matrix;
|
|
10385
10432
|
if (userMatrix) {
|
|
10386
10433
|
matrix = new Matrix(fitMatrix);
|
|
@@ -10399,6 +10446,7 @@ var LeaferUI = function(exports) {
|
|
|
10399
10446
|
matrix: matrix,
|
|
10400
10447
|
fitMatrix: fitMatrix,
|
|
10401
10448
|
bounds: bounds,
|
|
10449
|
+
renderBounds: renderBounds,
|
|
10402
10450
|
worldCanvas: worldCanvas,
|
|
10403
10451
|
shapeBounds: shapeBounds,
|
|
10404
10452
|
scaleX: scaleX,
|
|
@@ -10496,7 +10544,7 @@ var LeaferUI = function(exports) {
|
|
|
10496
10544
|
drawTextStroke: drawTextStroke,
|
|
10497
10545
|
shape: shape
|
|
10498
10546
|
};
|
|
10499
|
-
let origin$1 = {}, tempMatrix = getMatrixData();
|
|
10547
|
+
let origin$1 = {}, tempMatrix$1 = getMatrixData();
|
|
10500
10548
|
const {get: get$3, rotateOfOuter: rotateOfOuter$1, translate: translate$1, scaleOfOuter: scaleOfOuter$1, multiplyParent: multiplyParent, scale: scaleHelper, rotate: rotate$2, skew: skewHelper} = MatrixHelper;
|
|
10501
10549
|
function fillOrFitMode(data, box, x, y, scaleX, scaleY, rotation) {
|
|
10502
10550
|
const transform = get$3();
|
|
@@ -10508,12 +10556,12 @@ var LeaferUI = function(exports) {
|
|
|
10508
10556
|
}, rotation);
|
|
10509
10557
|
data.transform = transform;
|
|
10510
10558
|
}
|
|
10511
|
-
function clipMode(data, box, x, y, scaleX, scaleY, rotation, skew,
|
|
10559
|
+
function clipMode(data, box, x, y, scaleX, scaleY, rotation, skew, clipScaleX, clipScaleY) {
|
|
10512
10560
|
const transform = get$3();
|
|
10513
10561
|
layout$3(transform, box, x, y, scaleX, scaleY, rotation, skew);
|
|
10514
|
-
if (
|
|
10515
|
-
tempMatrix.a =
|
|
10516
|
-
multiplyParent(transform, tempMatrix);
|
|
10562
|
+
if (clipScaleX) {
|
|
10563
|
+
tempMatrix$1.a = clipScaleX, tempMatrix$1.d = clipScaleY;
|
|
10564
|
+
multiplyParent(transform, tempMatrix$1);
|
|
10517
10565
|
}
|
|
10518
10566
|
data.transform = transform;
|
|
10519
10567
|
}
|
|
@@ -10606,7 +10654,12 @@ var LeaferUI = function(exports) {
|
|
|
10606
10654
|
|
|
10607
10655
|
case "normal":
|
|
10608
10656
|
case "clip":
|
|
10609
|
-
if (tempImage.x || tempImage.y || scaleX || clipSize || rotation || skew)
|
|
10657
|
+
if (tempImage.x || tempImage.y || scaleX || clipSize || rotation || skew) {
|
|
10658
|
+
let clipScaleX, clipScaleY;
|
|
10659
|
+
if (clipSize) clipScaleX = box.width / clipSize.width, clipScaleY = box.height / clipSize.height;
|
|
10660
|
+
clipMode(data, box, tempImage.x, tempImage.y, scaleX, scaleY, rotation, skew, clipScaleX, clipScaleY);
|
|
10661
|
+
if (clipScaleX) scaleX = scaleX ? scaleX * clipScaleX : scaleX, scaleY = scaleY ? scaleY * clipScaleY : clipScaleY;
|
|
10662
|
+
}
|
|
10610
10663
|
break;
|
|
10611
10664
|
|
|
10612
10665
|
case "repeat":
|
|
@@ -10751,7 +10804,7 @@ var LeaferUI = function(exports) {
|
|
|
10751
10804
|
if (leafer && leafer.viewReady) leafer.renderer.ignore = value;
|
|
10752
10805
|
}
|
|
10753
10806
|
const {get: get$1, scale: scale$2, copy: copy$4} = MatrixHelper;
|
|
10754
|
-
const {floor: floor$1, ceil: ceil$1, max: max$
|
|
10807
|
+
const {floor: floor$1, ceil: ceil$1, max: max$2, abs: abs$4} = Math;
|
|
10755
10808
|
function createPattern(ui, paint, pixelRatio) {
|
|
10756
10809
|
let {scaleX: scaleX, scaleY: scaleY} = ui.getRenderScaleData(true, paint.scaleFixed);
|
|
10757
10810
|
const id = scaleX + "-" + scaleY + "-" + pixelRatio;
|
|
@@ -10799,8 +10852,8 @@ var LeaferUI = function(exports) {
|
|
|
10799
10852
|
if (transform || scaleX !== 1 || scaleY !== 1) {
|
|
10800
10853
|
const canvasWidth = width + (xGap || 0);
|
|
10801
10854
|
const canvasHeight = height + (yGap || 0);
|
|
10802
|
-
scaleX /= canvasWidth / max$
|
|
10803
|
-
scaleY /= canvasHeight / max$
|
|
10855
|
+
scaleX /= canvasWidth / max$2(floor$1(canvasWidth), 1);
|
|
10856
|
+
scaleY /= canvasHeight / max$2(floor$1(canvasHeight), 1);
|
|
10804
10857
|
if (!imageMatrix) {
|
|
10805
10858
|
imageMatrix = get$1();
|
|
10806
10859
|
if (transform) copy$4(imageMatrix, transform);
|
|
@@ -10825,17 +10878,15 @@ var LeaferUI = function(exports) {
|
|
|
10825
10878
|
if (allowDraw) {
|
|
10826
10879
|
if (data.repeat) {
|
|
10827
10880
|
allowDraw = false;
|
|
10828
|
-
} else {
|
|
10829
|
-
|
|
10830
|
-
|
|
10831
|
-
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
height *= data.scaleY;
|
|
10836
|
-
}
|
|
10837
|
-
allowDraw = width * height > Platform.image.maxCacheSize;
|
|
10881
|
+
} else if (!(paint.changeful || Platform.name === "miniapp" && ResizeEvent.isResizing(ui) || Export.running)) {
|
|
10882
|
+
let {width: width, height: height} = data;
|
|
10883
|
+
width *= scaleX * pixelRatio;
|
|
10884
|
+
height *= scaleY * pixelRatio;
|
|
10885
|
+
if (data.scaleX) {
|
|
10886
|
+
width *= data.scaleX;
|
|
10887
|
+
height *= data.scaleY;
|
|
10838
10888
|
}
|
|
10889
|
+
allowDraw = width * height > Platform.image.maxCacheSize;
|
|
10839
10890
|
}
|
|
10840
10891
|
}
|
|
10841
10892
|
if (allowDraw) {
|
|
@@ -10993,17 +11044,17 @@ var LeaferUI = function(exports) {
|
|
|
10993
11044
|
conicGradient: conicGradient,
|
|
10994
11045
|
getTransform: getTransform
|
|
10995
11046
|
};
|
|
10996
|
-
const {copy: copy$3, toOffsetOutBounds: toOffsetOutBounds$1} = BoundsHelper;
|
|
10997
|
-
const tempBounds = {};
|
|
11047
|
+
const {copy: copy$3, move: move$6, toOffsetOutBounds: toOffsetOutBounds$1} = BoundsHelper, {max: max$1} = Math;
|
|
11048
|
+
const tempBounds = {}, tempMatrix = new Matrix;
|
|
10998
11049
|
const offsetOutBounds$1 = {};
|
|
10999
11050
|
function shadow$1(ui, current, shape) {
|
|
11000
|
-
let copyBounds,
|
|
11001
|
-
const {__nowWorld: nowWorld
|
|
11051
|
+
let copyBounds, transform;
|
|
11052
|
+
const {__nowWorld: nowWorld} = ui;
|
|
11002
11053
|
const {shadow: shadow} = ui.__;
|
|
11003
|
-
const {worldCanvas: worldCanvas, bounds: bounds, shapeBounds: shapeBounds, scaleX: scaleX, scaleY: scaleY} = shape;
|
|
11054
|
+
const {worldCanvas: worldCanvas, bounds: bounds, renderBounds: renderBounds, shapeBounds: shapeBounds, scaleX: scaleX, scaleY: scaleY} = shape;
|
|
11004
11055
|
const other = current.getSameCanvas();
|
|
11005
11056
|
const end = shadow.length - 1;
|
|
11006
|
-
toOffsetOutBounds$1(bounds, offsetOutBounds$1);
|
|
11057
|
+
toOffsetOutBounds$1(bounds, offsetOutBounds$1, renderBounds);
|
|
11007
11058
|
shadow.forEach((item, index) => {
|
|
11008
11059
|
let otherScale = 1;
|
|
11009
11060
|
if (item.scaleFixed) {
|
|
@@ -11011,63 +11062,69 @@ var LeaferUI = function(exports) {
|
|
|
11011
11062
|
if (sx > 1) otherScale = 1 / sx;
|
|
11012
11063
|
}
|
|
11013
11064
|
other.setWorldShadow(offsetOutBounds$1.offsetX + item.x * scaleX * otherScale, offsetOutBounds$1.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale, ColorConvert.string(item.color));
|
|
11014
|
-
|
|
11015
|
-
|
|
11016
|
-
|
|
11065
|
+
transform = getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
|
|
11066
|
+
if (transform) other.setTransform(transform);
|
|
11067
|
+
drawWorldShadow(other, offsetOutBounds$1, shape);
|
|
11068
|
+
if (transform) other.resetTransform();
|
|
11069
|
+
copyBounds = renderBounds;
|
|
11017
11070
|
if (item.box) {
|
|
11018
11071
|
other.restore();
|
|
11019
11072
|
other.save();
|
|
11020
11073
|
if (worldCanvas) {
|
|
11021
|
-
other.copyWorld(other,
|
|
11074
|
+
other.copyWorld(other, renderBounds, nowWorld, "copy");
|
|
11022
11075
|
copyBounds = nowWorld;
|
|
11023
11076
|
}
|
|
11024
11077
|
worldCanvas ? other.copyWorld(worldCanvas, nowWorld, nowWorld, "destination-out") : other.copyWorld(shape.canvas, shapeBounds, bounds, "destination-out");
|
|
11025
11078
|
}
|
|
11026
|
-
|
|
11079
|
+
LeafHelper.copyCanvasByWorld(ui, current, other, copyBounds, item.blendMode);
|
|
11027
11080
|
if (end && index < end) other.clearWorld(copyBounds);
|
|
11028
11081
|
});
|
|
11029
11082
|
other.recycle(copyBounds);
|
|
11030
11083
|
}
|
|
11031
|
-
function
|
|
11032
|
-
let
|
|
11033
|
-
shadow.forEach(item =>
|
|
11034
|
-
|
|
11084
|
+
function getShadowRenderSpread(_ui, shadow) {
|
|
11085
|
+
let top = 0, right = 0, bottom = 0, left = 0, x, y, spread, blur;
|
|
11086
|
+
shadow.forEach(item => {
|
|
11087
|
+
x = item.x || 0, y = item.y || 0, spread = item.spread || 0, blur = (item.blur || 0) * 1.5;
|
|
11088
|
+
top = max$1(top, spread + blur - y);
|
|
11089
|
+
right = max$1(right, spread + blur + x);
|
|
11090
|
+
bottom = max$1(bottom, spread + blur + y);
|
|
11091
|
+
left = max$1(left, spread + blur - x);
|
|
11092
|
+
});
|
|
11093
|
+
return top === right && right === bottom && bottom === left ? top : [ top, right, bottom, left ];
|
|
11094
|
+
}
|
|
11095
|
+
function getShadowTransform(ui, canvas, _shape, shadow, outBounds, otherScale, isInnerShaodw) {
|
|
11096
|
+
if (shadow.spread) {
|
|
11097
|
+
const spreadScale = 1 + shadow.spread * 2 / ui.__layout.strokeBounds.width * otherScale * (isInnerShaodw ? -1 : 1);
|
|
11098
|
+
tempMatrix.set().scaleOfOuter({
|
|
11099
|
+
x: (outBounds.x + outBounds.width / 2) * canvas.pixelRatio,
|
|
11100
|
+
y: (outBounds.y + outBounds.height / 2) * canvas.pixelRatio
|
|
11101
|
+
}, spreadScale);
|
|
11102
|
+
return tempMatrix;
|
|
11103
|
+
}
|
|
11104
|
+
return undefined;
|
|
11035
11105
|
}
|
|
11036
|
-
function drawWorldShadow(canvas, outBounds,
|
|
11037
|
-
const {
|
|
11106
|
+
function drawWorldShadow(canvas, outBounds, shape) {
|
|
11107
|
+
const {shapeBounds: shapeBounds} = shape;
|
|
11108
|
+
let from, to;
|
|
11038
11109
|
if (Platform.fullImageShadow) {
|
|
11039
11110
|
copy$3(tempBounds, canvas.bounds);
|
|
11040
|
-
tempBounds.x
|
|
11041
|
-
|
|
11042
|
-
if (spreadScale) {
|
|
11043
|
-
const {fitMatrix: fitMatrix} = shape;
|
|
11044
|
-
tempBounds.x -= (bounds.x + (fitMatrix ? fitMatrix.e : 0) + bounds.width / 2) * (spreadScale - 1);
|
|
11045
|
-
tempBounds.y -= (bounds.y + (fitMatrix ? fitMatrix.f : 0) + bounds.height / 2) * (spreadScale - 1);
|
|
11046
|
-
tempBounds.width *= spreadScale;
|
|
11047
|
-
tempBounds.height *= spreadScale;
|
|
11048
|
-
}
|
|
11049
|
-
canvas.copyWorld(shape.canvas, canvas.bounds, tempBounds);
|
|
11111
|
+
move$6(tempBounds, outBounds.x - shapeBounds.x, outBounds.y - shapeBounds.y);
|
|
11112
|
+
from = canvas.bounds, to = tempBounds;
|
|
11050
11113
|
} else {
|
|
11051
|
-
|
|
11052
|
-
copy$3(tempBounds, outBounds);
|
|
11053
|
-
tempBounds.x -= outBounds.width / 2 * (spreadScale - 1);
|
|
11054
|
-
tempBounds.y -= outBounds.height / 2 * (spreadScale - 1);
|
|
11055
|
-
tempBounds.width *= spreadScale;
|
|
11056
|
-
tempBounds.height *= spreadScale;
|
|
11057
|
-
}
|
|
11058
|
-
canvas.copyWorld(shape.canvas, shapeBounds, spreadScale ? tempBounds : outBounds);
|
|
11114
|
+
from = shapeBounds, to = outBounds;
|
|
11059
11115
|
}
|
|
11116
|
+
canvas.copyWorld(shape.canvas, from, to);
|
|
11060
11117
|
}
|
|
11061
11118
|
const {toOffsetOutBounds: toOffsetOutBounds} = BoundsHelper;
|
|
11062
11119
|
const offsetOutBounds = {};
|
|
11063
11120
|
function innerShadow(ui, current, shape) {
|
|
11064
|
-
let copyBounds,
|
|
11065
|
-
const {__nowWorld: nowWorld
|
|
11121
|
+
let copyBounds, transform;
|
|
11122
|
+
const {__nowWorld: nowWorld} = ui;
|
|
11066
11123
|
const {innerShadow: innerShadow} = ui.__;
|
|
11067
|
-
const {worldCanvas: worldCanvas, bounds: bounds, shapeBounds: shapeBounds, scaleX: scaleX, scaleY: scaleY} = shape;
|
|
11124
|
+
const {worldCanvas: worldCanvas, bounds: bounds, renderBounds: renderBounds, shapeBounds: shapeBounds, scaleX: scaleX, scaleY: scaleY} = shape;
|
|
11068
11125
|
const other = current.getSameCanvas();
|
|
11069
11126
|
const end = innerShadow.length - 1;
|
|
11070
|
-
toOffsetOutBounds(bounds, offsetOutBounds);
|
|
11127
|
+
toOffsetOutBounds(bounds, offsetOutBounds, renderBounds);
|
|
11071
11128
|
innerShadow.forEach((item, index) => {
|
|
11072
11129
|
let otherScale = 1;
|
|
11073
11130
|
if (item.scaleFixed) {
|
|
@@ -11076,16 +11133,17 @@ var LeaferUI = function(exports) {
|
|
|
11076
11133
|
}
|
|
11077
11134
|
other.save();
|
|
11078
11135
|
other.setWorldShadow(offsetOutBounds.offsetX + item.x * scaleX * otherScale, offsetOutBounds.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale);
|
|
11079
|
-
|
|
11080
|
-
|
|
11136
|
+
transform = getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
|
|
11137
|
+
if (transform) other.setTransform(transform);
|
|
11138
|
+
drawWorldShadow(other, offsetOutBounds, shape);
|
|
11081
11139
|
other.restore();
|
|
11082
11140
|
if (worldCanvas) {
|
|
11083
|
-
other.copyWorld(other,
|
|
11141
|
+
other.copyWorld(other, renderBounds, nowWorld, "copy");
|
|
11084
11142
|
other.copyWorld(worldCanvas, nowWorld, nowWorld, "source-out");
|
|
11085
11143
|
copyBounds = nowWorld;
|
|
11086
11144
|
} else {
|
|
11087
11145
|
other.copyWorld(shape.canvas, shapeBounds, bounds, "source-out");
|
|
11088
|
-
copyBounds =
|
|
11146
|
+
copyBounds = renderBounds;
|
|
11089
11147
|
}
|
|
11090
11148
|
other.fillWorld(copyBounds, ColorConvert.string(item.color), "source-in");
|
|
11091
11149
|
LeafHelper.copyCanvasByWorld(ui, current, other, copyBounds, item.blendMode);
|
|
@@ -11093,6 +11151,7 @@ var LeaferUI = function(exports) {
|
|
|
11093
11151
|
});
|
|
11094
11152
|
other.recycle(copyBounds);
|
|
11095
11153
|
}
|
|
11154
|
+
const getInnerShadowSpread = getShadowRenderSpread;
|
|
11096
11155
|
function blur(ui, current, origin) {
|
|
11097
11156
|
const {blur: blur} = ui.__;
|
|
11098
11157
|
origin.setWorldBlur(blur * ui.__nowWorld.a);
|
|
@@ -11105,10 +11164,12 @@ var LeaferUI = function(exports) {
|
|
|
11105
11164
|
innerShadow: innerShadow,
|
|
11106
11165
|
blur: blur,
|
|
11107
11166
|
backgroundBlur: backgroundBlur,
|
|
11108
|
-
|
|
11167
|
+
getShadowRenderSpread: getShadowRenderSpread,
|
|
11168
|
+
getShadowTransform: getShadowTransform,
|
|
11109
11169
|
isTransformShadow(_shadow) {
|
|
11110
11170
|
return undefined;
|
|
11111
|
-
}
|
|
11171
|
+
},
|
|
11172
|
+
getInnerShadowSpread: getInnerShadowSpread
|
|
11112
11173
|
};
|
|
11113
11174
|
const {excludeRenderBounds: excludeRenderBounds} = LeafBoundsHelper;
|
|
11114
11175
|
let usedGrayscaleAlpha;
|
|
@@ -11122,6 +11183,7 @@ var LeaferUI = function(exports) {
|
|
|
11122
11183
|
maskEnd(this, currentMask, canvas, contentCanvas, maskCanvas, maskOpacity, undefined, true);
|
|
11123
11184
|
maskCanvas = contentCanvas = null;
|
|
11124
11185
|
}
|
|
11186
|
+
if (mask === "clipping" || mask === "clipping-path") excludeRenderBounds(child, options) || child.__render(canvas, options);
|
|
11125
11187
|
maskOpacity = child.__.opacity;
|
|
11126
11188
|
usedGrayscaleAlpha = false;
|
|
11127
11189
|
if (mask === "path" || mask === "clipping-path") {
|
|
@@ -11139,7 +11201,6 @@ var LeaferUI = function(exports) {
|
|
|
11139
11201
|
if (!contentCanvas) contentCanvas = getCanvas(canvas);
|
|
11140
11202
|
child.__render(maskCanvas, options);
|
|
11141
11203
|
}
|
|
11142
|
-
if (mask === "clipping" || mask === "clipping-path") excludeRenderBounds(child, options) || child.__render(canvas, options);
|
|
11143
11204
|
continue;
|
|
11144
11205
|
}
|
|
11145
11206
|
const childBlendMode = maskOpacity === 1 && child.__.__blendMode;
|
|
@@ -11704,10 +11765,6 @@ var LeaferUI = function(exports) {
|
|
|
11704
11765
|
if (t.config) {
|
|
11705
11766
|
const isSelect = key === "target";
|
|
11706
11767
|
if (isSelect) {
|
|
11707
|
-
t.setDimOthers(false);
|
|
11708
|
-
t.setBright(false);
|
|
11709
|
-
if (isArray(value) && value.length > 1 && value[0].locked) value.splice(0, 1);
|
|
11710
|
-
if (t.single) t.element.syncEventer = null;
|
|
11711
11768
|
const {beforeSelect: beforeSelect} = t.config;
|
|
11712
11769
|
if (beforeSelect) {
|
|
11713
11770
|
const check = beforeSelect({
|
|
@@ -11715,6 +11772,10 @@ var LeaferUI = function(exports) {
|
|
|
11715
11772
|
});
|
|
11716
11773
|
if (isObject(check)) value = check; else if (check === false) return;
|
|
11717
11774
|
}
|
|
11775
|
+
t.setDimOthers(false);
|
|
11776
|
+
t.setBright(false);
|
|
11777
|
+
if (isArray(value) && value.length > 1 && value[0].locked) value.splice(0, 1);
|
|
11778
|
+
if (t.single) t.element.syncEventer = null;
|
|
11718
11779
|
}
|
|
11719
11780
|
const type = isSelect ? EditorEvent.BEFORE_SELECT : EditorEvent.BEFORE_HOVER;
|
|
11720
11781
|
if (this.hasEvent(type)) this.emitEvent(new EditorEvent(type, {
|
|
@@ -11885,11 +11946,12 @@ var LeaferUI = function(exports) {
|
|
|
11885
11946
|
return !!this.originList;
|
|
11886
11947
|
}
|
|
11887
11948
|
get running() {
|
|
11888
|
-
const {editor: editor} = this;
|
|
11889
|
-
return this.hittable && editor.visible && editor.hittable && editor.mergeConfig.selector &&
|
|
11949
|
+
const {editor: editor, app: app} = this;
|
|
11950
|
+
return this.hittable && editor.visible && editor.hittable && editor.mergeConfig.selector && (app && app.mode === "normal");
|
|
11890
11951
|
}
|
|
11891
11952
|
get isMoveMode() {
|
|
11892
|
-
|
|
11953
|
+
const {app: app} = this;
|
|
11954
|
+
return app && app.interaction.moveMode;
|
|
11893
11955
|
}
|
|
11894
11956
|
constructor(editor) {
|
|
11895
11957
|
super();
|
|
@@ -11952,12 +12014,12 @@ var LeaferUI = function(exports) {
|
|
|
11952
12014
|
onTap(e) {
|
|
11953
12015
|
if (e.multiTouch) return;
|
|
11954
12016
|
const {editor: editor} = this;
|
|
11955
|
-
const {select: select} = editor.mergeConfig;
|
|
12017
|
+
const {select: select, selectKeep: selectKeep} = editor.mergeConfig;
|
|
11956
12018
|
if (select === "tap") this.checkAndSelect(e); else if (this.waitSelect) this.waitSelect();
|
|
11957
12019
|
if (this.needRemoveItem) {
|
|
11958
12020
|
editor.removeItem(this.needRemoveItem);
|
|
11959
12021
|
} else if (this.isMoveMode) {
|
|
11960
|
-
editor.target = null;
|
|
12022
|
+
if (!selectKeep) editor.target = null;
|
|
11961
12023
|
}
|
|
11962
12024
|
}
|
|
11963
12025
|
checkAndSelect(e) {
|
|
@@ -11972,7 +12034,7 @@ var LeaferUI = function(exports) {
|
|
|
11972
12034
|
editor.target = find;
|
|
11973
12035
|
}
|
|
11974
12036
|
} else if (this.allow(e.target)) {
|
|
11975
|
-
if (!this.isHoldMultipleSelectKey(e)) editor.target = null;
|
|
12037
|
+
if (!this.isHoldMultipleSelectKey(e) && !this.editor.mergedConfig.selectKeep) editor.target = null;
|
|
11976
12038
|
}
|
|
11977
12039
|
}
|
|
11978
12040
|
}
|
|
@@ -12087,91 +12149,95 @@ var LeaferUI = function(exports) {
|
|
|
12087
12149
|
const {toPoint: toPoint} = AroundHelper;
|
|
12088
12150
|
const {within: within$3, sign: sign$1} = MathHelper;
|
|
12089
12151
|
const EditDataHelper = {
|
|
12090
|
-
getScaleData(target, startBounds, direction,
|
|
12152
|
+
getScaleData(target, startBounds, direction, totalMoveOrScale, lockRatio, around, flipable, scaleMode) {
|
|
12091
12153
|
let align, origin = {}, scaleX = 1, scaleY = 1;
|
|
12092
12154
|
const {boxBounds: boxBounds, widthRange: widthRange, heightRange: heightRange, dragBounds: dragBounds, worldBoxBounds: worldBoxBounds} = target;
|
|
12093
12155
|
const {width: width, height: height} = startBounds;
|
|
12094
|
-
if (around) {
|
|
12095
|
-
totalMove.x *= 2;
|
|
12096
|
-
totalMove.y *= 2;
|
|
12097
|
-
}
|
|
12098
12156
|
const originChangedScaleX = target.scaleX / startBounds.scaleX;
|
|
12099
12157
|
const originChangedScaleY = target.scaleY / startBounds.scaleY;
|
|
12100
12158
|
const signX = sign$1(originChangedScaleX);
|
|
12101
12159
|
const signY = sign$1(originChangedScaleY);
|
|
12102
12160
|
const changedScaleX = scaleMode ? originChangedScaleX : signX * boxBounds.width / width;
|
|
12103
12161
|
const changedScaleY = scaleMode ? originChangedScaleY : signY * boxBounds.height / height;
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
|
|
12107
|
-
|
|
12108
|
-
|
|
12109
|
-
|
|
12110
|
-
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12114
|
-
|
|
12162
|
+
if (isNumber(totalMoveOrScale)) {
|
|
12163
|
+
scaleX = scaleY = Math.sqrt(totalMoveOrScale);
|
|
12164
|
+
} else {
|
|
12165
|
+
if (around) {
|
|
12166
|
+
totalMoveOrScale.x *= 2;
|
|
12167
|
+
totalMoveOrScale.y *= 2;
|
|
12168
|
+
}
|
|
12169
|
+
totalMoveOrScale.x *= scaleMode ? originChangedScaleX : signX;
|
|
12170
|
+
totalMoveOrScale.y *= scaleMode ? originChangedScaleY : signY;
|
|
12171
|
+
const topScale = (-totalMoveOrScale.y + height) / height;
|
|
12172
|
+
const rightScale = (totalMoveOrScale.x + width) / width;
|
|
12173
|
+
const bottomScale = (totalMoveOrScale.y + height) / height;
|
|
12174
|
+
const leftScale = (-totalMoveOrScale.x + width) / width;
|
|
12175
|
+
switch (direction) {
|
|
12176
|
+
case top$1:
|
|
12177
|
+
scaleY = topScale;
|
|
12178
|
+
align = "bottom";
|
|
12179
|
+
break;
|
|
12115
12180
|
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12181
|
+
case right$2:
|
|
12182
|
+
scaleX = rightScale;
|
|
12183
|
+
align = "left";
|
|
12184
|
+
break;
|
|
12120
12185
|
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12186
|
+
case bottom$1:
|
|
12187
|
+
scaleY = bottomScale;
|
|
12188
|
+
align = "top";
|
|
12189
|
+
break;
|
|
12125
12190
|
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12191
|
+
case left$2:
|
|
12192
|
+
scaleX = leftScale;
|
|
12193
|
+
align = "right";
|
|
12194
|
+
break;
|
|
12130
12195
|
|
|
12131
|
-
|
|
12132
|
-
|
|
12133
|
-
|
|
12134
|
-
|
|
12135
|
-
|
|
12196
|
+
case topLeft$1:
|
|
12197
|
+
scaleY = topScale;
|
|
12198
|
+
scaleX = leftScale;
|
|
12199
|
+
align = "bottom-right";
|
|
12200
|
+
break;
|
|
12136
12201
|
|
|
12137
|
-
|
|
12138
|
-
|
|
12139
|
-
|
|
12140
|
-
|
|
12141
|
-
|
|
12202
|
+
case topRight$1:
|
|
12203
|
+
scaleY = topScale;
|
|
12204
|
+
scaleX = rightScale;
|
|
12205
|
+
align = "bottom-left";
|
|
12206
|
+
break;
|
|
12142
12207
|
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
|
|
12146
|
-
|
|
12147
|
-
|
|
12208
|
+
case bottomRight:
|
|
12209
|
+
scaleY = bottomScale;
|
|
12210
|
+
scaleX = rightScale;
|
|
12211
|
+
align = "top-left";
|
|
12212
|
+
break;
|
|
12148
12213
|
|
|
12149
|
-
|
|
12150
|
-
|
|
12151
|
-
|
|
12152
|
-
|
|
12153
|
-
|
|
12154
|
-
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
|
|
12158
|
-
|
|
12159
|
-
|
|
12160
|
-
|
|
12161
|
-
|
|
12162
|
-
|
|
12163
|
-
|
|
12214
|
+
case bottomLeft:
|
|
12215
|
+
scaleY = bottomScale;
|
|
12216
|
+
scaleX = leftScale;
|
|
12217
|
+
align = "top-right";
|
|
12218
|
+
}
|
|
12219
|
+
if (lockRatio) {
|
|
12220
|
+
if (lockRatio === "corner" && direction % 2) {
|
|
12221
|
+
lockRatio = false;
|
|
12222
|
+
} else {
|
|
12223
|
+
let scale;
|
|
12224
|
+
switch (direction) {
|
|
12225
|
+
case top$1:
|
|
12226
|
+
case bottom$1:
|
|
12227
|
+
scale = scaleY;
|
|
12228
|
+
break;
|
|
12164
12229
|
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12230
|
+
case left$2:
|
|
12231
|
+
case right$2:
|
|
12232
|
+
scale = scaleX;
|
|
12233
|
+
break;
|
|
12169
12234
|
|
|
12170
|
-
|
|
12171
|
-
|
|
12235
|
+
default:
|
|
12236
|
+
scale = Math.sqrt(Math.abs(scaleX * scaleY));
|
|
12237
|
+
}
|
|
12238
|
+
scaleX = scaleX < 0 ? -scale : scale;
|
|
12239
|
+
scaleY = scaleY < 0 ? -scale : scale;
|
|
12172
12240
|
}
|
|
12173
|
-
scaleX = scaleX < 0 ? -scale : scale;
|
|
12174
|
-
scaleY = scaleY < 0 ? -scale : scale;
|
|
12175
12241
|
}
|
|
12176
12242
|
}
|
|
12177
12243
|
const useScaleX = scaleX !== 1, useScaleY = scaleY !== 1;
|
|
@@ -12452,6 +12518,9 @@ var LeaferUI = function(exports) {
|
|
|
12452
12518
|
const {moveable: moveable, resizeable: resizeable, rotateable: rotateable} = this.mergeConfig;
|
|
12453
12519
|
return isString(moveable) || isString(resizeable) || isString(rotateable);
|
|
12454
12520
|
}
|
|
12521
|
+
get canDragLimitAnimate() {
|
|
12522
|
+
return this.moving && this.mergeConfig.dragLimitAnimate && this.target.dragBounds;
|
|
12523
|
+
}
|
|
12455
12524
|
constructor(editor) {
|
|
12456
12525
|
super();
|
|
12457
12526
|
this.view = new exports.Group;
|
|
@@ -12685,10 +12754,9 @@ var LeaferUI = function(exports) {
|
|
|
12685
12754
|
onDragStart(e) {
|
|
12686
12755
|
this.dragging = true;
|
|
12687
12756
|
const point = this.dragPoint = e.current, {pointType: pointType} = point;
|
|
12688
|
-
const {
|
|
12757
|
+
const {moveable: moveable, resizeable: resizeable, rotateable: rotateable, skewable: skewable} = this.mergeConfig;
|
|
12689
12758
|
if (pointType === "move") {
|
|
12690
12759
|
moveable && (this.moving = true);
|
|
12691
|
-
editor.opacity = hideOnMove ? 0 : 1;
|
|
12692
12760
|
} else {
|
|
12693
12761
|
if (pointType.includes("rotate") || this.isHoldRotateKey(e) || !resizeable) {
|
|
12694
12762
|
rotateable && (this.rotating = true);
|
|
@@ -12697,23 +12765,7 @@ var LeaferUI = function(exports) {
|
|
|
12697
12765
|
} else if (pointType === "resize") resizeable && (this.resizing = true);
|
|
12698
12766
|
if (pointType === "skew") skewable && (this.skewing = true);
|
|
12699
12767
|
}
|
|
12700
|
-
|
|
12701
|
-
dragStartData.y = e.y;
|
|
12702
|
-
dragStartData.point = {
|
|
12703
|
-
x: target.x,
|
|
12704
|
-
y: target.y
|
|
12705
|
-
};
|
|
12706
|
-
dragStartData.bounds = Object.assign({}, target.getLayoutBounds("box", "local"));
|
|
12707
|
-
dragStartData.rotation = target.rotation;
|
|
12708
|
-
if (pointType && pointType.includes("resize")) ResizeEvent.resizingKeys = editor.leafList.keys;
|
|
12709
|
-
}
|
|
12710
|
-
onDragEnd(e) {
|
|
12711
|
-
if (this.moving && this.mergeConfig.dragLimitAnimate && this.target.dragBounds) this.transformTool.onMove(e);
|
|
12712
|
-
this.dragPoint = null;
|
|
12713
|
-
this.resetDoing();
|
|
12714
|
-
const {pointType: pointType} = e.current;
|
|
12715
|
-
if (pointType === "move") this.editor.opacity = 1;
|
|
12716
|
-
if (pointType && pointType.includes("resize")) ResizeEvent.resizingKeys = null;
|
|
12768
|
+
this.onTransformStart(e);
|
|
12717
12769
|
}
|
|
12718
12770
|
onDrag(e) {
|
|
12719
12771
|
const {transformTool: transformTool, moving: moving, resizing: resizing, rotating: rotating, skewing: skewing} = this;
|
|
@@ -12728,37 +12780,59 @@ var LeaferUI = function(exports) {
|
|
|
12728
12780
|
}
|
|
12729
12781
|
updatePointCursor(this, e);
|
|
12730
12782
|
}
|
|
12731
|
-
|
|
12732
|
-
|
|
12783
|
+
onDragEnd(e) {
|
|
12784
|
+
this.onTransformEnd(e);
|
|
12785
|
+
this.dragPoint = null;
|
|
12786
|
+
}
|
|
12787
|
+
onTransformStart(e) {
|
|
12788
|
+
if (this.canUse) {
|
|
12789
|
+
if (this.moving) this.editor.opacity = this.mergedConfig.hideOnMove ? 0 : 1;
|
|
12790
|
+
if (this.resizing) ResizeEvent.resizingKeys = this.editor.leafList.keys;
|
|
12791
|
+
const {dragStartData: dragStartData, target: target} = this;
|
|
12792
|
+
dragStartData.x = e.x;
|
|
12793
|
+
dragStartData.y = e.y;
|
|
12794
|
+
dragStartData.totalOffset = getPointData();
|
|
12795
|
+
dragStartData.point = {
|
|
12796
|
+
x: target.x,
|
|
12797
|
+
y: target.y
|
|
12798
|
+
};
|
|
12799
|
+
dragStartData.bounds = Object.assign({}, target.getLayoutBounds("box", "local"));
|
|
12800
|
+
dragStartData.rotation = target.rotation;
|
|
12801
|
+
}
|
|
12802
|
+
}
|
|
12803
|
+
onTransformEnd(e) {
|
|
12804
|
+
if (this.canUse) {
|
|
12805
|
+
if (this.canDragLimitAnimate && (e instanceof exports.DragEvent || e instanceof exports.MoveEvent)) this.transformTool.onMove(e);
|
|
12806
|
+
if (this.resizing) ResizeEvent.resizingKeys = null;
|
|
12807
|
+
this.dragging = this.gesturing = this.moving = this.resizing = this.rotating = this.skewing = false;
|
|
12808
|
+
this.editor.opacity = 1;
|
|
12809
|
+
this.update();
|
|
12810
|
+
}
|
|
12733
12811
|
}
|
|
12734
12812
|
onMove(e) {
|
|
12735
12813
|
if (this.canGesture && e.moveType !== "drag") {
|
|
12736
12814
|
e.stop();
|
|
12737
|
-
if (isString(this.
|
|
12815
|
+
if (isString(this.mergedConfig.moveable)) {
|
|
12738
12816
|
this.gesturing = this.moving = true;
|
|
12739
|
-
this.transformTool.onMove(e);
|
|
12817
|
+
e.type === exports.MoveEvent.START ? this.onTransformStart(e) : this.transformTool.onMove(e);
|
|
12740
12818
|
}
|
|
12741
12819
|
}
|
|
12742
12820
|
}
|
|
12743
|
-
onMoveEnd(e) {
|
|
12744
|
-
if (this.moving) this.transformTool.onMove(e);
|
|
12745
|
-
this.resetDoing();
|
|
12746
|
-
}
|
|
12747
12821
|
onScale(e) {
|
|
12748
12822
|
if (this.canGesture) {
|
|
12749
12823
|
e.stop();
|
|
12750
|
-
if (isString(this.
|
|
12824
|
+
if (isString(this.mergedConfig.resizeable)) {
|
|
12751
12825
|
this.gesturing = this.resizing = true;
|
|
12752
|
-
this.transformTool.onScale(e);
|
|
12826
|
+
e.type === exports.ZoomEvent.START ? this.onTransformStart(e) : this.transformTool.onScale(e);
|
|
12753
12827
|
}
|
|
12754
12828
|
}
|
|
12755
12829
|
}
|
|
12756
12830
|
onRotate(e) {
|
|
12757
12831
|
if (this.canGesture) {
|
|
12758
12832
|
e.stop();
|
|
12759
|
-
if (isString(this.
|
|
12833
|
+
if (isString(this.mergedConfig.rotateable)) {
|
|
12760
12834
|
this.gesturing = this.rotating = true;
|
|
12761
|
-
this.transformTool.onRotate(e);
|
|
12835
|
+
e.type === exports.RotateEvent.START ? this.onTransformStart(e) : this.transformTool.onRotate(e);
|
|
12762
12836
|
}
|
|
12763
12837
|
}
|
|
12764
12838
|
}
|
|
@@ -12771,8 +12845,7 @@ var LeaferUI = function(exports) {
|
|
|
12771
12845
|
updatePointCursor(this, e);
|
|
12772
12846
|
}
|
|
12773
12847
|
onArrow(e) {
|
|
12774
|
-
|
|
12775
|
-
if (this.canUse && editor.editing && this.mergeConfig.keyEvent) {
|
|
12848
|
+
if (this.canUse && this.mergeConfig.keyEvent) {
|
|
12776
12849
|
let x = 0, y = 0;
|
|
12777
12850
|
const distance = e.shiftKey ? 10 : 1;
|
|
12778
12851
|
switch (e.code) {
|
|
@@ -12791,7 +12864,7 @@ var LeaferUI = function(exports) {
|
|
|
12791
12864
|
case "ArrowRight":
|
|
12792
12865
|
x = distance;
|
|
12793
12866
|
}
|
|
12794
|
-
if (x || y) transformTool.move(x, y);
|
|
12867
|
+
if (x || y) this.transformTool.move(x, y);
|
|
12795
12868
|
}
|
|
12796
12869
|
}
|
|
12797
12870
|
onDoubleTap(e) {
|
|
@@ -12832,7 +12905,7 @@ var LeaferUI = function(exports) {
|
|
|
12832
12905
|
const {rect: rect, editor: editor, __eventIds: events} = this;
|
|
12833
12906
|
events.push(rect.on_([ [ exports.PointerEvent.DOUBLE_TAP, this.onDoubleTap, this ], [ exports.PointerEvent.LONG_PRESS, this.onLongPress, this ] ]));
|
|
12834
12907
|
this.waitLeafer(() => {
|
|
12835
|
-
events.push(editor.app.on_([ [ [ exports.KeyEvent.HOLD, exports.KeyEvent.UP ], this.onKey, this ], [ exports.KeyEvent.DOWN, this.onArrow, this ], [ exports.MoveEvent.BEFORE_MOVE, this.onMove, this, true ], [ exports.ZoomEvent.BEFORE_ZOOM, this.onScale, this, true ], [ exports.RotateEvent.BEFORE_ROTATE, this.onRotate, this, true ], [ exports.MoveEvent.END,
|
|
12908
|
+
events.push(editor.app.on_([ [ [ exports.KeyEvent.HOLD, exports.KeyEvent.UP ], this.onKey, this ], [ exports.KeyEvent.DOWN, this.onArrow, this ], [ [ exports.MoveEvent.START, exports.MoveEvent.BEFORE_MOVE ], this.onMove, this, true ], [ [ exports.ZoomEvent.START, exports.ZoomEvent.BEFORE_ZOOM ], this.onScale, this, true ], [ [ exports.RotateEvent.START, exports.RotateEvent.BEFORE_ROTATE ], this.onRotate, this, true ], [ [ exports.MoveEvent.END, exports.ZoomEvent.END, exports.RotateEvent.END ], this.onTransformEnd, this ] ]));
|
|
12836
12909
|
});
|
|
12837
12910
|
}
|
|
12838
12911
|
__removeListenEvents() {
|
|
@@ -13181,56 +13254,61 @@ var LeaferUI = function(exports) {
|
|
|
13181
13254
|
const isMoveEnd = e.type === exports.MoveEvent.END || e.type === exports.DragEvent.END;
|
|
13182
13255
|
const axisDrag = isString(target.draggable);
|
|
13183
13256
|
const checkLimitMove = !dragLimitAnimate || isMoveEnd || axisDrag;
|
|
13257
|
+
const total = {
|
|
13258
|
+
x: e.totalX,
|
|
13259
|
+
y: e.totalY
|
|
13260
|
+
};
|
|
13184
13261
|
if (e instanceof exports.MoveEvent) {
|
|
13185
|
-
move
|
|
13186
|
-
if (checkLimitMove) exports.DragEvent.limitMove(target, move);
|
|
13187
|
-
} else {
|
|
13188
|
-
const total = {
|
|
13189
|
-
x: e.totalX,
|
|
13190
|
-
y: e.totalY
|
|
13191
|
-
};
|
|
13192
|
-
if (e.shiftKey) {
|
|
13193
|
-
if (Math.abs(total.x) > Math.abs(total.y)) total.y = 0; else total.x = 0;
|
|
13194
|
-
}
|
|
13195
|
-
move = exports.DragEvent.getValidMove(target, dragStartData.point, total, checkLimitMove);
|
|
13262
|
+
PointHelper.move(total, target.getWorldPointByLocal(dragStartData.totalOffset, null, true));
|
|
13196
13263
|
}
|
|
13264
|
+
if (e.shiftKey) {
|
|
13265
|
+
if (Math.abs(total.x) > Math.abs(total.y)) total.y = 0; else total.x = 0;
|
|
13266
|
+
}
|
|
13267
|
+
move = exports.DragEvent.getValidMove(target, dragStartData.point, total, checkLimitMove);
|
|
13197
13268
|
if (move.x || move.y) {
|
|
13198
13269
|
if (dragLimitAnimate && !axisDrag && isMoveEnd) LeafHelper.animateMove(this, move, isNumber(dragLimitAnimate) ? dragLimitAnimate : .3); else this.move(move);
|
|
13199
13270
|
}
|
|
13200
13271
|
}
|
|
13201
13272
|
onScale(e) {
|
|
13202
13273
|
const {target: target, mergeConfig: mergeConfig, single: single, dragStartData: dragStartData} = this.editBox;
|
|
13203
|
-
let {around: around, lockRatio: lockRatio, flipable: flipable, editSize: editSize} = mergeConfig;
|
|
13274
|
+
let {around: around, lockRatio: lockRatio, flipable: flipable, editSize: editSize} = mergeConfig, totalMove;
|
|
13204
13275
|
if (e instanceof exports.ZoomEvent) {
|
|
13205
|
-
|
|
13276
|
+
around = target.getBoxPoint(e);
|
|
13277
|
+
totalMove = e.totalScale;
|
|
13206
13278
|
} else {
|
|
13207
|
-
|
|
13208
|
-
if (e.shiftKey || target.lockRatio) lockRatio = true;
|
|
13209
|
-
const data = EditDataHelper.getScaleData(target, dragStartData.bounds, direction, e.getInnerTotal(target), lockRatio, EditDataHelper.getAround(around, e.altKey), flipable, !single || editSize === "scale");
|
|
13210
|
-
if (this.editTool && this.editTool.onScaleWithDrag) {
|
|
13211
|
-
data.drag = e;
|
|
13212
|
-
this.scaleWithDrag(data);
|
|
13213
|
-
} else {
|
|
13214
|
-
this.scaleOf(data.origin, data.scaleX, data.scaleY);
|
|
13215
|
-
}
|
|
13279
|
+
totalMove = e.getInnerTotal(target);
|
|
13216
13280
|
}
|
|
13281
|
+
const {direction: direction} = e.current;
|
|
13282
|
+
if (e.shiftKey || target.lockRatio) lockRatio = true;
|
|
13283
|
+
const data = EditDataHelper.getScaleData(target, dragStartData.bounds, direction, totalMove, lockRatio, EditDataHelper.getAround(around, e.altKey), flipable, !single || editSize === "scale");
|
|
13284
|
+
const targetX = target.x, targetY = target.y;
|
|
13285
|
+
if (e instanceof exports.DragEvent && this.editTool && this.editTool.onScaleWithDrag) {
|
|
13286
|
+
data.drag = e;
|
|
13287
|
+
this.scaleWithDrag(data);
|
|
13288
|
+
} else {
|
|
13289
|
+
this.scaleOf(data.origin, data.scaleX, data.scaleY);
|
|
13290
|
+
}
|
|
13291
|
+
PointHelper.move(dragStartData.totalOffset, target.x - targetX, target.y - targetY);
|
|
13217
13292
|
}
|
|
13218
13293
|
onRotate(e) {
|
|
13219
13294
|
const {target: target, mergeConfig: mergeConfig, dragStartData: dragStartData} = this.editBox;
|
|
13220
|
-
const {around: around, rotateAround: rotateAround, rotateGap: rotateGap} = mergeConfig;
|
|
13295
|
+
const {around: around, rotateAround: rotateAround, rotateGap: rotateGap, diagonalRotateKey: diagonalRotateKey} = mergeConfig;
|
|
13221
13296
|
const {direction: direction} = e.current;
|
|
13222
13297
|
let origin, rotation;
|
|
13223
13298
|
if (e instanceof exports.RotateEvent) {
|
|
13224
13299
|
rotation = e.rotation;
|
|
13225
13300
|
origin = rotateAround ? AroundHelper.getPoint(rotateAround, target.boxBounds) : target.getBoxPoint(e);
|
|
13226
13301
|
} else {
|
|
13227
|
-
const
|
|
13302
|
+
const isDiagonalRotate = diagonalRotateKey ? e.isHoldKeys(diagonalRotateKey) : e.shiftKey;
|
|
13303
|
+
const data = EditDataHelper.getRotateData(target, direction, e, dragStartData, isDiagonalRotate ? null : rotateAround || target.around || target.origin || around || "center");
|
|
13228
13304
|
rotation = dragStartData.rotation + data.rotation - target.rotation;
|
|
13229
13305
|
origin = data.origin;
|
|
13230
13306
|
}
|
|
13231
13307
|
rotation = MathHelper.float(MathHelper.getGapRotation(rotation, rotateGap, target.rotation), 2);
|
|
13232
13308
|
if (!rotation) return;
|
|
13309
|
+
const targetX = target.x, targetY = target.y;
|
|
13233
13310
|
this.rotateOf(origin, rotation);
|
|
13311
|
+
PointHelper.move(dragStartData.totalOffset, target.x - targetX, target.y - targetY);
|
|
13234
13312
|
}
|
|
13235
13313
|
onSkew(e) {
|
|
13236
13314
|
const {target: target, mergeConfig: mergeConfig} = this.editBox;
|
|
@@ -13960,7 +14038,7 @@ var LeaferUI = function(exports) {
|
|
|
13960
14038
|
}
|
|
13961
14039
|
};
|
|
13962
14040
|
exports.LineEditTool = __decorate([ registerEditTool() ], exports.LineEditTool);
|
|
13963
|
-
const {M: M$
|
|
14041
|
+
const {M: M$4, L: L$3, C: C$3, Q: Q$2, Z: Z$2, N: N$1, D: D$1, X: X$1, G: G$1, F: F$1, O: O$2, P: P$1, U: U$1} = PathCommandMap;
|
|
13964
14042
|
const PathScaler = {
|
|
13965
14043
|
scale(data, scaleX, scaleY) {
|
|
13966
14044
|
if (!data) return;
|
|
@@ -13969,7 +14047,7 @@ var LeaferUI = function(exports) {
|
|
|
13969
14047
|
while (i < len) {
|
|
13970
14048
|
command = data[i];
|
|
13971
14049
|
switch (command) {
|
|
13972
|
-
case M$
|
|
14050
|
+
case M$4:
|
|
13973
14051
|
case L$3:
|
|
13974
14052
|
scalePoints(data, scaleX, scaleY, i, 1);
|
|
13975
14053
|
i += 3;
|
|
@@ -14386,28 +14464,24 @@ var LeaferUI = function(exports) {
|
|
|
14386
14464
|
const data = text.__;
|
|
14387
14465
|
if (data.__autoWidth) {
|
|
14388
14466
|
width += 20;
|
|
14389
|
-
|
|
14390
|
-
|
|
14391
|
-
|
|
14392
|
-
|
|
14393
|
-
break;
|
|
14467
|
+
switch (data.textAlign) {
|
|
14468
|
+
case "center":
|
|
14469
|
+
offsetX = data.autoSizeAlign ? -width / 2 : -10;
|
|
14470
|
+
break;
|
|
14394
14471
|
|
|
14395
|
-
|
|
14396
|
-
|
|
14397
|
-
}
|
|
14472
|
+
case "right":
|
|
14473
|
+
offsetX = data.autoSizeAlign ? -width : -20;
|
|
14398
14474
|
}
|
|
14399
14475
|
}
|
|
14400
14476
|
if (data.__autoHeight) {
|
|
14401
14477
|
height += 20;
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14405
|
-
|
|
14406
|
-
break;
|
|
14478
|
+
switch (data.verticalAlign) {
|
|
14479
|
+
case "middle":
|
|
14480
|
+
offsetY = data.autoSizeAlign ? -height / 2 : -10;
|
|
14481
|
+
break;
|
|
14407
14482
|
|
|
14408
|
-
|
|
14409
|
-
|
|
14410
|
-
}
|
|
14483
|
+
case "bottom":
|
|
14484
|
+
offsetY = data.autoSizeAlign ? -height : -20;
|
|
14411
14485
|
}
|
|
14412
14486
|
}
|
|
14413
14487
|
const {x: x, y: y} = this.inBody ? text.app.clientBounds : text.app.tree.clientBounds;
|
|
@@ -14511,6 +14585,13 @@ var LeaferUI = function(exports) {
|
|
|
14511
14585
|
register("design", design);
|
|
14512
14586
|
register("document", document$1);
|
|
14513
14587
|
const MultiTouchHelper = {
|
|
14588
|
+
state: {
|
|
14589
|
+
type: "none",
|
|
14590
|
+
typeCount: 0,
|
|
14591
|
+
startTime: 0,
|
|
14592
|
+
totalData: null,
|
|
14593
|
+
center: {}
|
|
14594
|
+
},
|
|
14514
14595
|
getData(list) {
|
|
14515
14596
|
const a = list[0], b = list[1];
|
|
14516
14597
|
const lastCenter = PointHelper.getCenter(a.from, b.from);
|
|
@@ -14529,8 +14610,51 @@ var LeaferUI = function(exports) {
|
|
|
14529
14610
|
rotation: rotation,
|
|
14530
14611
|
center: center
|
|
14531
14612
|
};
|
|
14613
|
+
},
|
|
14614
|
+
getType(data, config) {
|
|
14615
|
+
const moveScore = Math.hypot(data.move.x, data.move.y) / (config.move || 5);
|
|
14616
|
+
const scaleScore = Math.abs(data.scale - 1) / (config.scale || .03);
|
|
14617
|
+
const rotateScore = Math.abs(data.rotation) / (config.rotation || 2);
|
|
14618
|
+
if (moveScore < 1 && scaleScore < 1 && rotateScore < 1) return "none";
|
|
14619
|
+
if (moveScore >= scaleScore && moveScore >= rotateScore) return "move";
|
|
14620
|
+
if (scaleScore >= rotateScore) return "zoom";
|
|
14621
|
+
return "rotate";
|
|
14622
|
+
},
|
|
14623
|
+
detect(data, config) {
|
|
14624
|
+
const {state: state} = M$3;
|
|
14625
|
+
const type = M$3.getType(data, config);
|
|
14626
|
+
if (!state.totalData) {
|
|
14627
|
+
state.startTime = Date.now();
|
|
14628
|
+
state.center = data.center;
|
|
14629
|
+
}
|
|
14630
|
+
M$3.add(data, state.totalData);
|
|
14631
|
+
state.totalData = data;
|
|
14632
|
+
if (type === state.type) {
|
|
14633
|
+
state.typeCount++;
|
|
14634
|
+
if (state.typeCount >= (config.count || 3) && type !== "none") return type;
|
|
14635
|
+
} else {
|
|
14636
|
+
state.type = type;
|
|
14637
|
+
state.typeCount = 1;
|
|
14638
|
+
}
|
|
14639
|
+
if (Date.now() - state.startTime >= (config.time || 160)) return M$3.getType(state.totalData, config);
|
|
14640
|
+
return "none";
|
|
14641
|
+
},
|
|
14642
|
+
add(data, add) {
|
|
14643
|
+
if (!add) return;
|
|
14644
|
+
PointHelper.move(data.move, add.move);
|
|
14645
|
+
data.scale *= add.scale;
|
|
14646
|
+
data.rotation += add.rotation;
|
|
14647
|
+
data.center = add.center;
|
|
14648
|
+
},
|
|
14649
|
+
reset() {
|
|
14650
|
+
const {state: state} = M$3;
|
|
14651
|
+
state.type = "none";
|
|
14652
|
+
state.typeCount = 0;
|
|
14653
|
+
state.startTime = 0;
|
|
14654
|
+
state.totalData = null;
|
|
14532
14655
|
}
|
|
14533
14656
|
};
|
|
14657
|
+
const M$3 = MultiTouchHelper;
|
|
14534
14658
|
const {abs: abs$2, max: max} = Math, {sign: sign, within: within$2} = MathHelper;
|
|
14535
14659
|
const WheelEventHelper = {
|
|
14536
14660
|
getMove(event, config) {
|
|
@@ -14568,9 +14692,19 @@ var LeaferUI = function(exports) {
|
|
|
14568
14692
|
return scale;
|
|
14569
14693
|
}
|
|
14570
14694
|
};
|
|
14695
|
+
let totalX, totalY, totalScale, totalRotation;
|
|
14571
14696
|
class Transformer {
|
|
14572
14697
|
get transforming() {
|
|
14573
|
-
return
|
|
14698
|
+
return this.moving || this.zooming || this.rotating;
|
|
14699
|
+
}
|
|
14700
|
+
get moving() {
|
|
14701
|
+
return !!this.moveData;
|
|
14702
|
+
}
|
|
14703
|
+
get zooming() {
|
|
14704
|
+
return !!this.zoomData;
|
|
14705
|
+
}
|
|
14706
|
+
get rotating() {
|
|
14707
|
+
return !!this.rotateData;
|
|
14574
14708
|
}
|
|
14575
14709
|
constructor(interaction) {
|
|
14576
14710
|
this.interaction = interaction;
|
|
@@ -14580,13 +14714,18 @@ var LeaferUI = function(exports) {
|
|
|
14580
14714
|
if (!data.moveType) data.moveType = "move";
|
|
14581
14715
|
if (!this.moveData) {
|
|
14582
14716
|
this.setPath(data);
|
|
14717
|
+
totalX = 0, totalY = 0;
|
|
14583
14718
|
this.moveData = Object.assign(Object.assign({}, data), {
|
|
14584
14719
|
moveX: 0,
|
|
14585
|
-
moveY: 0
|
|
14720
|
+
moveY: 0,
|
|
14721
|
+
totalX: totalX,
|
|
14722
|
+
totalY: totalY
|
|
14586
14723
|
});
|
|
14587
14724
|
interaction.emit(exports.MoveEvent.START, this.moveData);
|
|
14588
14725
|
}
|
|
14589
14726
|
data.path = this.moveData.path;
|
|
14727
|
+
data.totalX = totalX = totalX + data.moveX;
|
|
14728
|
+
data.totalY = totalY = totalY + data.moveY;
|
|
14590
14729
|
interaction.emit(exports.MoveEvent.BEFORE_MOVE, data);
|
|
14591
14730
|
interaction.emit(exports.MoveEvent.MOVE, data);
|
|
14592
14731
|
this.transformEndWait();
|
|
@@ -14595,12 +14734,15 @@ var LeaferUI = function(exports) {
|
|
|
14595
14734
|
const {interaction: interaction} = this;
|
|
14596
14735
|
if (!this.zoomData) {
|
|
14597
14736
|
this.setPath(data);
|
|
14737
|
+
totalScale = 1;
|
|
14598
14738
|
this.zoomData = Object.assign(Object.assign({}, data), {
|
|
14599
|
-
scale: 1
|
|
14739
|
+
scale: 1,
|
|
14740
|
+
totalScale: totalScale
|
|
14600
14741
|
});
|
|
14601
14742
|
interaction.emit(exports.ZoomEvent.START, this.zoomData);
|
|
14602
14743
|
}
|
|
14603
14744
|
data.path = this.zoomData.path;
|
|
14745
|
+
data.totalScale = totalScale = totalScale * data.scale;
|
|
14604
14746
|
interaction.emit(exports.ZoomEvent.BEFORE_ZOOM, data);
|
|
14605
14747
|
interaction.emit(exports.ZoomEvent.ZOOM, data);
|
|
14606
14748
|
this.transformEndWait();
|
|
@@ -14609,12 +14751,15 @@ var LeaferUI = function(exports) {
|
|
|
14609
14751
|
const {interaction: interaction} = this;
|
|
14610
14752
|
if (!this.rotateData) {
|
|
14611
14753
|
this.setPath(data);
|
|
14754
|
+
totalRotation = 0;
|
|
14612
14755
|
this.rotateData = Object.assign(Object.assign({}, data), {
|
|
14613
|
-
rotation: 0
|
|
14756
|
+
rotation: 0,
|
|
14757
|
+
totalRotation: totalRotation
|
|
14614
14758
|
});
|
|
14615
14759
|
interaction.emit(exports.RotateEvent.START, this.rotateData);
|
|
14616
14760
|
}
|
|
14617
14761
|
data.path = this.rotateData.path;
|
|
14762
|
+
data.totalRotation = totalRotation = totalRotation + data.rotation;
|
|
14618
14763
|
interaction.emit(exports.RotateEvent.BEFORE_ROTATE, data);
|
|
14619
14764
|
interaction.emit(exports.RotateEvent.ROTATE, data);
|
|
14620
14765
|
this.transformEndWait();
|
|
@@ -14633,9 +14778,16 @@ var LeaferUI = function(exports) {
|
|
|
14633
14778
|
}
|
|
14634
14779
|
transformEnd() {
|
|
14635
14780
|
const {interaction: interaction, moveData: moveData, zoomData: zoomData, rotateData: rotateData} = this;
|
|
14636
|
-
if (moveData) interaction.emit(exports.MoveEvent.END, moveData)
|
|
14637
|
-
|
|
14638
|
-
|
|
14781
|
+
if (moveData) interaction.emit(exports.MoveEvent.END, Object.assign(Object.assign({}, moveData), {
|
|
14782
|
+
totalX: totalX,
|
|
14783
|
+
totalY: totalY
|
|
14784
|
+
}));
|
|
14785
|
+
if (zoomData) interaction.emit(exports.ZoomEvent.END, Object.assign(Object.assign({}, zoomData), {
|
|
14786
|
+
totalScale: totalScale
|
|
14787
|
+
}));
|
|
14788
|
+
if (rotateData) interaction.emit(exports.RotateEvent.END, Object.assign(Object.assign({}, rotateData), {
|
|
14789
|
+
totalRotation: totalRotation
|
|
14790
|
+
}));
|
|
14639
14791
|
this.reset();
|
|
14640
14792
|
}
|
|
14641
14793
|
reset() {
|
|
@@ -14717,14 +14869,39 @@ var LeaferUI = function(exports) {
|
|
|
14717
14869
|
}
|
|
14718
14870
|
};
|
|
14719
14871
|
interaction.multiTouch = function(data, list) {
|
|
14720
|
-
|
|
14721
|
-
|
|
14722
|
-
Object.assign(data, center);
|
|
14723
|
-
data.multiTouch = true;
|
|
14872
|
+
const {disabled: disabled, singleGesture: singleGesture} = this.config.multiTouch;
|
|
14873
|
+
if (disabled) return;
|
|
14724
14874
|
this.pointerWaitCancel();
|
|
14725
|
-
|
|
14726
|
-
this.
|
|
14727
|
-
|
|
14875
|
+
let gestureData = MultiTouchHelper.getData(list);
|
|
14876
|
+
let {moving: moving, zooming: zooming, rotating: rotating} = this.transformer;
|
|
14877
|
+
if (singleGesture) {
|
|
14878
|
+
if (!this.transformer.transforming) {
|
|
14879
|
+
const type = MultiTouchHelper.detect(gestureData, isObject(singleGesture) ? singleGesture : {});
|
|
14880
|
+
switch (type) {
|
|
14881
|
+
case "move":
|
|
14882
|
+
moving = true;
|
|
14883
|
+
break;
|
|
14884
|
+
|
|
14885
|
+
case "zoom":
|
|
14886
|
+
zooming = true;
|
|
14887
|
+
break;
|
|
14888
|
+
|
|
14889
|
+
case "rotate":
|
|
14890
|
+
rotating = true;
|
|
14891
|
+
break;
|
|
14892
|
+
|
|
14893
|
+
default:
|
|
14894
|
+
return;
|
|
14895
|
+
}
|
|
14896
|
+
MultiTouchHelper.reset();
|
|
14897
|
+
}
|
|
14898
|
+
if (!moving) gestureData.center = MultiTouchHelper.state.center;
|
|
14899
|
+
} else moving = zooming = rotating = true;
|
|
14900
|
+
Object.assign(data, gestureData.center);
|
|
14901
|
+
data.multiTouch = true;
|
|
14902
|
+
if (rotating) this.rotate(getRotateEventData(gestureData.rotation, data));
|
|
14903
|
+
if (zooming) this.zoom(getZoomEventData(gestureData.scale, data));
|
|
14904
|
+
if (moving) this.move(getMoveEventData(gestureData.move, data));
|
|
14728
14905
|
};
|
|
14729
14906
|
const dragger = Dragger.prototype;
|
|
14730
14907
|
const {abs: abs$1} = Math;
|
|
@@ -17460,6 +17637,17 @@ var LeaferUI = function(exports) {
|
|
|
17460
17637
|
exports.UI.addAttr("disabledStyle", undefined, stateStyleType);
|
|
17461
17638
|
exports.UI.addAttr("placeholderStyle", undefined, stateStyleType);
|
|
17462
17639
|
exports.UI.addAttr("button", false, dataType);
|
|
17640
|
+
ui$1.set = function(data, transition) {
|
|
17641
|
+
if (data) {
|
|
17642
|
+
if (transition) {
|
|
17643
|
+
if (transition === "temp") {
|
|
17644
|
+
this.lockNormalStyle = true;
|
|
17645
|
+
Object.assign(this, data);
|
|
17646
|
+
this.lockNormalStyle = false;
|
|
17647
|
+
} else this.animate(data, transition);
|
|
17648
|
+
} else Object.assign(this, data);
|
|
17649
|
+
}
|
|
17650
|
+
};
|
|
17463
17651
|
ui$1.focus = function(value = true) {
|
|
17464
17652
|
this.waitLeafer(() => {
|
|
17465
17653
|
let {focusData: focusData} = this.app.interaction;
|
|
@@ -18058,6 +18246,7 @@ var LeaferUI = function(exports) {
|
|
|
18058
18246
|
exports.FileHelper = FileHelper;
|
|
18059
18247
|
exports.Filter = Filter;
|
|
18060
18248
|
exports.Finder = Finder;
|
|
18249
|
+
exports.FourNumberHelper = FourNumberHelper;
|
|
18061
18250
|
exports.FrameData = FrameData;
|
|
18062
18251
|
exports.GroupData = GroupData;
|
|
18063
18252
|
exports.HTMLTextData = HTMLTextData;
|
|
@@ -18236,8 +18425,8 @@ var LeaferUI = function(exports) {
|
|
|
18236
18425
|
exports.stateType = stateType;
|
|
18237
18426
|
exports.strokeType = strokeType;
|
|
18238
18427
|
exports.surfaceType = surfaceType;
|
|
18239
|
-
exports.tempBounds = tempBounds$
|
|
18240
|
-
exports.tempMatrix = tempMatrix$
|
|
18428
|
+
exports.tempBounds = tempBounds$2;
|
|
18429
|
+
exports.tempMatrix = tempMatrix$2;
|
|
18241
18430
|
exports.tempPoint = tempPoint$3;
|
|
18242
18431
|
exports.tryToNumber = tryToNumber;
|
|
18243
18432
|
exports.useCanvas = useCanvas;
|