leafer-ui 2.1.3 → 2.1.5
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/web.cjs +1 -1
- package/dist/web.esm.js +1 -1
- package/dist/web.esm.min.js +1 -1
- package/dist/web.esm.min.js.map +1 -1
- package/dist/web.js +39 -211
- package/dist/web.min.cjs +1 -1
- package/dist/web.min.cjs.map +1 -1
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +39 -212
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +11 -11
package/dist/web.module.js
CHANGED
|
@@ -260,7 +260,7 @@ const IncrementId = {
|
|
|
260
260
|
RUNTIME: "runtime",
|
|
261
261
|
LEAF: "leaf",
|
|
262
262
|
TASK: "task",
|
|
263
|
-
|
|
263
|
+
CANVAS: "canvas",
|
|
264
264
|
IMAGE: "image",
|
|
265
265
|
types: {},
|
|
266
266
|
create(typeName) {
|
|
@@ -914,7 +914,7 @@ const PointHelper = {
|
|
|
914
914
|
return quick ? t.x === point.x && t.y === point.y : float$2(t.x) === float$2(point.x) && float$2(t.y) === float$2(point.y);
|
|
915
915
|
},
|
|
916
916
|
reset(t) {
|
|
917
|
-
|
|
917
|
+
t.x = t.y = 0;
|
|
918
918
|
}
|
|
919
919
|
};
|
|
920
920
|
|
|
@@ -1123,6 +1123,7 @@ class Matrix {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
reset() {
|
|
1125
1125
|
MatrixHelper.reset(this);
|
|
1126
|
+
return this;
|
|
1126
1127
|
}
|
|
1127
1128
|
}
|
|
1128
1129
|
|
|
@@ -2346,7 +2347,7 @@ class LeaferCanvasBase extends Canvas$1 {
|
|
|
2346
2347
|
this.worldTransform = {};
|
|
2347
2348
|
if (!config) config = minSize;
|
|
2348
2349
|
this.manager = manager;
|
|
2349
|
-
this.innerId = IncrementId.create(IncrementId.
|
|
2350
|
+
this.innerId = IncrementId.create(IncrementId.CANVAS);
|
|
2350
2351
|
const {width: width, height: height, pixelRatio: pixelRatio} = config;
|
|
2351
2352
|
this.autoLayout = !width || !height;
|
|
2352
2353
|
this.size.pixelRatio = pixelRatio || Platform.devicePixelRatio;
|
|
@@ -2496,6 +2497,7 @@ class LeaferCanvasBase extends Canvas$1 {
|
|
|
2496
2497
|
}
|
|
2497
2498
|
useGrayscaleAlpha(bounds) {
|
|
2498
2499
|
this.setTempPixelBounds(bounds, true, true);
|
|
2500
|
+
if (!tempPixelBounds.width || !tempPixelBounds.height) return;
|
|
2499
2501
|
let alpha, pixel;
|
|
2500
2502
|
const {context: context} = this, imageData = context.getImageData(tempPixelBounds.x, tempPixelBounds.y, tempPixelBounds.width, tempPixelBounds.height), {data: data} = imageData;
|
|
2501
2503
|
for (let i = 0, len = data.length; i < len; i += 4) {
|
|
@@ -3048,7 +3050,8 @@ const PathConvert = {
|
|
|
3048
3050
|
current.length = PathCommandLengthMap[char];
|
|
3049
3051
|
current.index = 0;
|
|
3050
3052
|
pushData(data, current.name);
|
|
3051
|
-
if (char === "m") current.name = PathCommandMap["l"]; else if (char === "M") current.name = PathCommandMap["L"];
|
|
3053
|
+
if (char === "m") current.name = PathCommandMap["l"]; else if (char === "M") current.name = PathCommandMap["L"];
|
|
3054
|
+
if (!needConvert && convertCommand[char]) needConvert = true;
|
|
3052
3055
|
} else {
|
|
3053
3056
|
if (char === "-" || char === "+") {
|
|
3054
3057
|
if (lastChar === "e" || lastChar === "E") {
|
|
@@ -3124,8 +3127,8 @@ const PathConvert = {
|
|
|
3124
3127
|
|
|
3125
3128
|
case S:
|
|
3126
3129
|
smooth = lastCommand === C$3 || lastCommand === S;
|
|
3127
|
-
x1 = smooth ? x * 2 - controlX :
|
|
3128
|
-
y1 = smooth ? y * 2 - controlY :
|
|
3130
|
+
x1 = smooth ? x * 2 - controlX : x;
|
|
3131
|
+
y1 = smooth ? y * 2 - controlY : y;
|
|
3129
3132
|
controlX = old[i + 1];
|
|
3130
3133
|
controlY = old[i + 2];
|
|
3131
3134
|
x = old[i + 3];
|
|
@@ -3159,8 +3162,8 @@ const PathConvert = {
|
|
|
3159
3162
|
|
|
3160
3163
|
case T:
|
|
3161
3164
|
smooth = lastCommand === Q$3 || lastCommand === T;
|
|
3162
|
-
controlX = smooth ? x * 2 - controlX :
|
|
3163
|
-
controlY = smooth ? y * 2 - controlY :
|
|
3165
|
+
controlX = smooth ? x * 2 - controlX : x;
|
|
3166
|
+
controlY = smooth ? y * 2 - controlY : y;
|
|
3164
3167
|
curveMode ? quadraticCurveTo$1(data, x, y, controlX, controlY, old[i + 1], old[i + 2]) : data.push(Q$3, controlX, controlY, old[i + 1], old[i + 2]);
|
|
3165
3168
|
x = old[i + 1];
|
|
3166
3169
|
y = old[i + 2];
|
|
@@ -4865,10 +4868,10 @@ const LeafHelper = {
|
|
|
4865
4868
|
y: y
|
|
4866
4869
|
}, transition) : (t.x = x, t.y = y);
|
|
4867
4870
|
},
|
|
4868
|
-
zoomOfWorld(t, origin, scaleX, scaleY, resize, transition) {
|
|
4869
|
-
L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition);
|
|
4871
|
+
zoomOfWorld(t, origin, scaleX, scaleY, resize, transition, boundsType) {
|
|
4872
|
+
L.zoomOfLocal(t, getTempLocal(t, origin), scaleX, scaleY, resize, transition, boundsType);
|
|
4870
4873
|
},
|
|
4871
|
-
zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition) {
|
|
4874
|
+
zoomOfLocal(t, origin, scaleX, scaleY = scaleX, resize, transition, boundsType) {
|
|
4872
4875
|
const o = t.__localMatrix;
|
|
4873
4876
|
if (!isNumber(scaleY)) {
|
|
4874
4877
|
if (scaleY) transition = scaleY;
|
|
@@ -4877,7 +4880,7 @@ const LeafHelper = {
|
|
|
4877
4880
|
copy$5(matrix$1, o);
|
|
4878
4881
|
scaleOfOuter$2(matrix$1, origin, scaleX, scaleY);
|
|
4879
4882
|
if (L.hasHighPosition(t)) {
|
|
4880
|
-
L.setTransform(t, matrix$1, resize, transition);
|
|
4883
|
+
L.setTransform(t, matrix$1, resize, transition, boundsType);
|
|
4881
4884
|
} else {
|
|
4882
4885
|
const x = t.x + matrix$1.e - o.e, y = t.y + matrix$1.f - o.f;
|
|
4883
4886
|
if (transition && !resize) t.animate({
|
|
@@ -4885,7 +4888,7 @@ const LeafHelper = {
|
|
|
4885
4888
|
y: y,
|
|
4886
4889
|
scaleX: t.scaleX * scaleX,
|
|
4887
4890
|
scaleY: t.scaleY * scaleY
|
|
4888
|
-
}, transition); else t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true);
|
|
4891
|
+
}, transition); else t.x = x, t.y = y, t.scaleResize(scaleX, scaleY, resize !== true, boundsType);
|
|
4889
4892
|
}
|
|
4890
4893
|
},
|
|
4891
4894
|
rotateOfWorld(t, origin, angle, transition) {
|
|
@@ -4909,18 +4912,18 @@ const LeafHelper = {
|
|
|
4909
4912
|
skewOfOuter(matrix$1, origin, skewX, skewY);
|
|
4910
4913
|
L.setTransform(t, matrix$1, resize, transition);
|
|
4911
4914
|
},
|
|
4912
|
-
transformWorld(t, transform, resize, transition) {
|
|
4915
|
+
transformWorld(t, transform, resize, transition, boundsType) {
|
|
4913
4916
|
copy$5(matrix$1, t.worldTransform);
|
|
4914
4917
|
multiplyParent$3(matrix$1, transform);
|
|
4915
4918
|
if (t.parent) divideParent(matrix$1, t.parent.scrollWorldTransform);
|
|
4916
|
-
L.setTransform(t, matrix$1, resize, transition);
|
|
4919
|
+
L.setTransform(t, matrix$1, resize, transition, boundsType);
|
|
4917
4920
|
},
|
|
4918
|
-
transform(t, transform, resize, transition) {
|
|
4921
|
+
transform(t, transform, resize, transition, boundsType) {
|
|
4919
4922
|
copy$5(matrix$1, t.localTransform);
|
|
4920
4923
|
multiplyParent$3(matrix$1, transform);
|
|
4921
|
-
L.setTransform(t, matrix$1, resize, transition);
|
|
4924
|
+
L.setTransform(t, matrix$1, resize, transition, boundsType);
|
|
4922
4925
|
},
|
|
4923
|
-
setTransform(t, transform, resize, transition) {
|
|
4926
|
+
setTransform(t, transform, resize, transition, boundsType) {
|
|
4924
4927
|
const data = t.__, originPoint = data.origin && L.getInnerOrigin(t, data.origin);
|
|
4925
4928
|
const layout = getLayout(transform, originPoint, data.around && L.getInnerOrigin(t, data.around));
|
|
4926
4929
|
if (L.hasOffset(t)) {
|
|
@@ -4936,7 +4939,7 @@ const LeafHelper = {
|
|
|
4936
4939
|
PointHelper.move(layout, originPoint.x - changedPoint.x, originPoint.y - changedPoint.y);
|
|
4937
4940
|
}
|
|
4938
4941
|
t.set(layout);
|
|
4939
|
-
t.scaleResize(scaleX, scaleY, false);
|
|
4942
|
+
t.scaleResize(scaleX, scaleY, false, boundsType);
|
|
4940
4943
|
} else t.set(layout, transition);
|
|
4941
4944
|
},
|
|
4942
4945
|
getFlipTransform(t, axis) {
|
|
@@ -5518,6 +5521,7 @@ class LeafLayout {
|
|
|
5518
5521
|
this.renderChanged = true;
|
|
5519
5522
|
this.renderSpread || (this.renderSpread = 1);
|
|
5520
5523
|
this.boundsChanged = true;
|
|
5524
|
+
this.hitCanvasChanged = true;
|
|
5521
5525
|
}
|
|
5522
5526
|
scaleChange() {
|
|
5523
5527
|
this.scaleChanged = true;
|
|
@@ -6458,10 +6462,6 @@ let Leaf = class Leaf {
|
|
|
6458
6462
|
}
|
|
6459
6463
|
}
|
|
6460
6464
|
}
|
|
6461
|
-
set(_data, _isTemp) {}
|
|
6462
|
-
get(_name) {
|
|
6463
|
-
return undefined;
|
|
6464
|
-
}
|
|
6465
6465
|
setAttr(name, value) {
|
|
6466
6466
|
this[name] = value;
|
|
6467
6467
|
}
|
|
@@ -6478,37 +6478,10 @@ let Leaf = class Leaf {
|
|
|
6478
6478
|
toString(options) {
|
|
6479
6479
|
return JSON.stringify(this.toJSON(options));
|
|
6480
6480
|
}
|
|
6481
|
-
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
__SVG(_data) {}
|
|
6485
|
-
toHTML() {
|
|
6486
|
-
return undefined;
|
|
6487
|
-
}
|
|
6488
|
-
__setAttr(_attrName, _newValue) {
|
|
6489
|
-
return true;
|
|
6490
|
-
}
|
|
6491
|
-
__getAttr(_attrName) {
|
|
6492
|
-
return undefined;
|
|
6493
|
-
}
|
|
6494
|
-
setProxyAttr(_attrName, _newValue) {}
|
|
6495
|
-
getProxyAttr(_attrName) {
|
|
6496
|
-
return undefined;
|
|
6497
|
-
}
|
|
6498
|
-
find(_condition, _options) {
|
|
6499
|
-
return undefined;
|
|
6500
|
-
}
|
|
6501
|
-
findTag(_tag) {
|
|
6502
|
-
return undefined;
|
|
6503
|
-
}
|
|
6504
|
-
findOne(_condition, _options) {
|
|
6505
|
-
return undefined;
|
|
6506
|
-
}
|
|
6507
|
-
findId(_id) {
|
|
6508
|
-
return undefined;
|
|
6481
|
+
scaleResize(scaleX, scaleY = scaleX, _noResize, _boundsType) {
|
|
6482
|
+
this.scaleX *= scaleX;
|
|
6483
|
+
this.scaleY *= scaleY;
|
|
6509
6484
|
}
|
|
6510
|
-
focus(_value) {}
|
|
6511
|
-
updateState() {}
|
|
6512
6485
|
updateLayout() {
|
|
6513
6486
|
this.__layout.update();
|
|
6514
6487
|
}
|
|
@@ -6524,27 +6497,6 @@ let Leaf = class Leaf {
|
|
|
6524
6497
|
__extraUpdate() {
|
|
6525
6498
|
if (this.leaferIsReady) this.leafer.layouter.addExtra(this);
|
|
6526
6499
|
}
|
|
6527
|
-
__updateWorldMatrix() {}
|
|
6528
|
-
__updateLocalMatrix() {}
|
|
6529
|
-
__updateWorldBounds() {}
|
|
6530
|
-
__updateLocalBounds() {}
|
|
6531
|
-
__updateLocalBoxBounds() {}
|
|
6532
|
-
__updateLocalStrokeBounds() {}
|
|
6533
|
-
__updateLocalRenderBounds() {}
|
|
6534
|
-
__updateBoxBounds(_secondLayout, _bounds) {}
|
|
6535
|
-
__updateContentBounds() {}
|
|
6536
|
-
__updateStrokeBounds(_bounds) {}
|
|
6537
|
-
__updateRenderBounds(_bounds) {}
|
|
6538
|
-
__updateAutoLayout() {}
|
|
6539
|
-
__updateFlowLayout() {}
|
|
6540
|
-
__updateNaturalSize() {}
|
|
6541
|
-
__updateStrokeSpread() {
|
|
6542
|
-
return 0;
|
|
6543
|
-
}
|
|
6544
|
-
__updateRenderSpread() {
|
|
6545
|
-
return 0;
|
|
6546
|
-
}
|
|
6547
|
-
__onUpdateSize() {}
|
|
6548
6500
|
__updateEraser(value) {
|
|
6549
6501
|
this.__hasEraser = value ? true : this.children.some(item => item.__.eraser);
|
|
6550
6502
|
}
|
|
@@ -6558,7 +6510,6 @@ let Leaf = class Leaf {
|
|
|
6558
6510
|
__updateMask(_value) {
|
|
6559
6511
|
this.__hasMask = this.children.some(item => item.__.mask && item.__.visible && item.__.opacity);
|
|
6560
6512
|
}
|
|
6561
|
-
__renderMask(_canvas, _options) {}
|
|
6562
6513
|
__getNowWorld(options) {
|
|
6563
6514
|
if (options.matrix) {
|
|
6564
6515
|
if (!this.__cameraWorld) this.__cameraWorld = {};
|
|
@@ -6675,11 +6626,11 @@ let Leaf = class Leaf {
|
|
|
6675
6626
|
const layer = this.leafer ? this.leafer.zoomLayer : this;
|
|
6676
6627
|
return layer.getWorldPoint(page, relative, distance, change);
|
|
6677
6628
|
}
|
|
6678
|
-
setTransform(matrix, resize, transition) {
|
|
6679
|
-
setTransform(this, matrix, resize, transition);
|
|
6629
|
+
setTransform(matrix, resize, transition, boundsType) {
|
|
6630
|
+
setTransform(this, matrix, resize, transition, boundsType);
|
|
6680
6631
|
}
|
|
6681
|
-
transform(matrix, resize, transition) {
|
|
6682
|
-
transform(this, matrix, resize, transition);
|
|
6632
|
+
transform(matrix, resize, transition, boundsType) {
|
|
6633
|
+
transform(this, matrix, resize, transition, boundsType);
|
|
6683
6634
|
}
|
|
6684
6635
|
move(x, y, transition) {
|
|
6685
6636
|
moveLocal(this, x, y, transition);
|
|
@@ -6687,8 +6638,8 @@ let Leaf = class Leaf {
|
|
|
6687
6638
|
moveInner(x, y, transition) {
|
|
6688
6639
|
moveWorld(this, x, y, true, transition);
|
|
6689
6640
|
}
|
|
6690
|
-
scaleOf(origin, scaleX, scaleY, resize, transition) {
|
|
6691
|
-
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition);
|
|
6641
|
+
scaleOf(origin, scaleX, scaleY, resize, transition, boundsType) {
|
|
6642
|
+
zoomOfLocal(this, getLocalOrigin(this, origin), scaleX, scaleY, resize, transition, boundsType);
|
|
6692
6643
|
}
|
|
6693
6644
|
rotateOf(origin, rotation, transition) {
|
|
6694
6645
|
rotateOfLocal(this, getLocalOrigin(this, origin), rotation, transition);
|
|
@@ -6696,14 +6647,14 @@ let Leaf = class Leaf {
|
|
|
6696
6647
|
skewOf(origin, skewX, skewY, resize, transition) {
|
|
6697
6648
|
skewOfLocal(this, getLocalOrigin(this, origin), skewX, skewY, resize, transition);
|
|
6698
6649
|
}
|
|
6699
|
-
transformWorld(worldTransform, resize, transition) {
|
|
6700
|
-
transformWorld(this, worldTransform, resize, transition);
|
|
6650
|
+
transformWorld(worldTransform, resize, transition, boundsType) {
|
|
6651
|
+
transformWorld(this, worldTransform, resize, transition, boundsType);
|
|
6701
6652
|
}
|
|
6702
6653
|
moveWorld(x, y, transition) {
|
|
6703
6654
|
moveWorld(this, x, y, false, transition);
|
|
6704
6655
|
}
|
|
6705
|
-
scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition) {
|
|
6706
|
-
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition);
|
|
6656
|
+
scaleOfWorld(worldOrigin, scaleX, scaleY, resize, transition, boundsType) {
|
|
6657
|
+
zoomOfWorld(this, worldOrigin, scaleX, scaleY, resize, transition, boundsType);
|
|
6707
6658
|
}
|
|
6708
6659
|
rotateOfWorld(worldOrigin, rotation) {
|
|
6709
6660
|
rotateOfWorld(this, worldOrigin, rotation);
|
|
@@ -6714,76 +6665,12 @@ let Leaf = class Leaf {
|
|
|
6714
6665
|
flip(axis, transition) {
|
|
6715
6666
|
transform(this, getFlipTransform(this, axis), false, transition);
|
|
6716
6667
|
}
|
|
6717
|
-
scaleResize(scaleX, scaleY = scaleX, _noResize) {
|
|
6718
|
-
this.scaleX *= scaleX;
|
|
6719
|
-
this.scaleY *= scaleY;
|
|
6720
|
-
}
|
|
6721
|
-
__scaleResize(_scaleX, _scaleY) {}
|
|
6722
|
-
resizeWidth(_width) {}
|
|
6723
|
-
resizeHeight(_height) {}
|
|
6724
|
-
hit(_world, _hitRadius) {
|
|
6725
|
-
return true;
|
|
6726
|
-
}
|
|
6727
|
-
__hitWorld(_point, _forceHitFill) {
|
|
6728
|
-
return true;
|
|
6729
|
-
}
|
|
6730
|
-
__hit(_local, _forceHitFill) {
|
|
6731
|
-
return true;
|
|
6732
|
-
}
|
|
6733
|
-
__hitFill(_inner) {
|
|
6734
|
-
return true;
|
|
6735
|
-
}
|
|
6736
|
-
__hitStroke(_inner, _strokeWidth) {
|
|
6737
|
-
return true;
|
|
6738
|
-
}
|
|
6739
|
-
__hitPixel(_inner) {
|
|
6740
|
-
return true;
|
|
6741
|
-
}
|
|
6742
|
-
__drawHitPath(_canvas) {}
|
|
6743
|
-
__updateHitCanvas() {}
|
|
6744
|
-
__render(_canvas, _options) {}
|
|
6745
|
-
__drawFast(_canvas, _options) {}
|
|
6746
|
-
__draw(_canvas, _options, _originCanvas) {}
|
|
6747
|
-
__clip(_canvas, _options) {}
|
|
6748
|
-
__renderShape(_canvas, _options) {}
|
|
6749
|
-
__drawShape(_canvas, _options) {}
|
|
6750
|
-
__updateWorldOpacity() {}
|
|
6751
|
-
__updateChange() {}
|
|
6752
|
-
__drawPath(_canvas) {}
|
|
6753
|
-
__drawRenderPath(_canvas) {}
|
|
6754
|
-
__updatePath() {}
|
|
6755
|
-
__updateRenderPath(_updateCache) {}
|
|
6756
|
-
getMotionPathData() {
|
|
6757
|
-
return Plugin.need("path");
|
|
6758
|
-
}
|
|
6759
|
-
getMotionPoint(_motionDistance) {
|
|
6760
|
-
return Plugin.need("path");
|
|
6761
|
-
}
|
|
6762
|
-
getMotionTotal() {
|
|
6763
|
-
return 0;
|
|
6764
|
-
}
|
|
6765
|
-
__updateMotionPath() {}
|
|
6766
|
-
__runAnimation(_type, _complete) {}
|
|
6767
|
-
__updateSortChildren() {}
|
|
6768
|
-
add(_child, _index) {}
|
|
6769
6668
|
remove(_child, destroy) {
|
|
6770
6669
|
if (this.parent) this.parent.remove(this, destroy);
|
|
6771
6670
|
}
|
|
6772
6671
|
dropTo(parent, index, resize) {
|
|
6773
6672
|
drop(this, parent, index, resize);
|
|
6774
6673
|
}
|
|
6775
|
-
on(_type, _listener, _options) {}
|
|
6776
|
-
off(_type, _listener, _options) {}
|
|
6777
|
-
on_(_type, _listener, _bind, _options) {
|
|
6778
|
-
return undefined;
|
|
6779
|
-
}
|
|
6780
|
-
off_(_id) {}
|
|
6781
|
-
once(_type, _listener, _captureOrBind, _capture) {}
|
|
6782
|
-
emit(_type, _event, _capture) {}
|
|
6783
|
-
emitEvent(_event, _capture) {}
|
|
6784
|
-
hasEvent(_type, _capture) {
|
|
6785
|
-
return false;
|
|
6786
|
-
}
|
|
6787
6674
|
static changeAttr(attrName, defaultValue, fn) {
|
|
6788
6675
|
fn ? this.addAttr(attrName, defaultValue, fn) : defineDataProcessor(this.prototype, attrName, defaultValue);
|
|
6789
6676
|
}
|
|
@@ -7089,7 +6976,7 @@ class LeafLevelList {
|
|
|
7089
6976
|
}
|
|
7090
6977
|
}
|
|
7091
6978
|
|
|
7092
|
-
const version = "2.1.
|
|
6979
|
+
const version = "2.1.5";
|
|
7093
6980
|
|
|
7094
6981
|
const debug$5 = Debug.get("LeaferCanvas");
|
|
7095
6982
|
|
|
@@ -8770,17 +8657,12 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8770
8657
|
if (!path) this.__drawPathByBox(pen);
|
|
8771
8658
|
return pen;
|
|
8772
8659
|
}
|
|
8773
|
-
reset(_data) {}
|
|
8774
8660
|
set(data, _transition) {
|
|
8775
8661
|
if (data) Object.assign(this, data);
|
|
8776
8662
|
}
|
|
8777
8663
|
get(name) {
|
|
8778
8664
|
return isString(name) ? this.__.__getInput(name) : this.__.__getInputData(name);
|
|
8779
8665
|
}
|
|
8780
|
-
createProxyData() {
|
|
8781
|
-
return undefined;
|
|
8782
|
-
}
|
|
8783
|
-
clearProxyData() {}
|
|
8784
8666
|
find(_condition, _options) {
|
|
8785
8667
|
return Plugin.need("find");
|
|
8786
8668
|
}
|
|
@@ -8818,6 +8700,7 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8818
8700
|
data.lazy && !this.__inLazyBounds && !Export.running ? data.__needComputePaint = true : data.__computePaint();
|
|
8819
8701
|
}
|
|
8820
8702
|
}
|
|
8703
|
+
__updatePath() {}
|
|
8821
8704
|
__updateRenderPath(updateCache) {
|
|
8822
8705
|
const data = this.__;
|
|
8823
8706
|
if (data.path) {
|
|
@@ -8853,7 +8736,6 @@ let UI = UI_1 = class UI extends Leaf {
|
|
|
8853
8736
|
this.set(keyframe);
|
|
8854
8737
|
return Plugin.need("animate");
|
|
8855
8738
|
}
|
|
8856
|
-
killAnimate(_type, _nextStyle) {}
|
|
8857
8739
|
export(_filename, _options) {
|
|
8858
8740
|
return Plugin.need("export");
|
|
8859
8741
|
}
|
|
@@ -9029,8 +8911,6 @@ __decorate([ dataType(100) ], UI.prototype, "placeholderDelay", void 0);
|
|
|
9029
8911
|
|
|
9030
8912
|
__decorate([ dataType({}) ], UI.prototype, "data", void 0);
|
|
9031
8913
|
|
|
9032
|
-
__decorate([ rewrite(Leaf.prototype.reset) ], UI.prototype, "reset", null);
|
|
9033
|
-
|
|
9034
8914
|
UI = UI_1 = __decorate([ useModule(UIBounds), useModule(UIRender), rewriteAble() ], UI);
|
|
9035
8915
|
|
|
9036
8916
|
let Group = class Group extends UI {
|
|
@@ -9067,9 +8947,6 @@ let Group = class Group extends UI {
|
|
|
9067
8947
|
}
|
|
9068
8948
|
return data;
|
|
9069
8949
|
}
|
|
9070
|
-
pick(_hitPoint, _options) {
|
|
9071
|
-
return undefined;
|
|
9072
|
-
}
|
|
9073
8950
|
addAt(child, index) {
|
|
9074
8951
|
this.add(child, index);
|
|
9075
8952
|
}
|
|
@@ -9079,11 +8956,6 @@ let Group = class Group extends UI {
|
|
|
9079
8956
|
addBefore(child, before) {
|
|
9080
8957
|
this.add(child, this.children.indexOf(before));
|
|
9081
8958
|
}
|
|
9082
|
-
add(_child, _index) {}
|
|
9083
|
-
addMany(..._children) {}
|
|
9084
|
-
remove(_child, _destroy) {}
|
|
9085
|
-
removeAll(_destroy) {}
|
|
9086
|
-
clear() {}
|
|
9087
8959
|
};
|
|
9088
8960
|
|
|
9089
8961
|
__decorate([ dataProcessor(GroupData) ], Group.prototype, "__", void 0);
|
|
@@ -10057,51 +9929,6 @@ let Pen = class Pen extends Group {
|
|
|
10057
9929
|
this.add(path);
|
|
10058
9930
|
return this;
|
|
10059
9931
|
}
|
|
10060
|
-
beginPath() {
|
|
10061
|
-
return this;
|
|
10062
|
-
}
|
|
10063
|
-
moveTo(_x, _y) {
|
|
10064
|
-
return this;
|
|
10065
|
-
}
|
|
10066
|
-
lineTo(_x, _y) {
|
|
10067
|
-
return this;
|
|
10068
|
-
}
|
|
10069
|
-
bezierCurveTo(_x1, _y1, _x2, _y2, _x, _y) {
|
|
10070
|
-
return this;
|
|
10071
|
-
}
|
|
10072
|
-
quadraticCurveTo(_x1, _y1, _x, _y) {
|
|
10073
|
-
return this;
|
|
10074
|
-
}
|
|
10075
|
-
closePath() {
|
|
10076
|
-
return this;
|
|
10077
|
-
}
|
|
10078
|
-
rect(_x, _y, _width, _height) {
|
|
10079
|
-
return this;
|
|
10080
|
-
}
|
|
10081
|
-
roundRect(_x, _y, _width, _height, _cornerRadius) {
|
|
10082
|
-
return this;
|
|
10083
|
-
}
|
|
10084
|
-
ellipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) {
|
|
10085
|
-
return this;
|
|
10086
|
-
}
|
|
10087
|
-
arc(_x, _y, _radius, _startAngle, _endAngle, _anticlockwise) {
|
|
10088
|
-
return this;
|
|
10089
|
-
}
|
|
10090
|
-
arcTo(_x1, _y1, _x2, _y2, _radius) {
|
|
10091
|
-
return this;
|
|
10092
|
-
}
|
|
10093
|
-
drawEllipse(_x, _y, _radiusX, _radiusY, _rotation, _startAngle, _endAngle, _anticlockwise) {
|
|
10094
|
-
return this;
|
|
10095
|
-
}
|
|
10096
|
-
drawArc(_x, _y, _radius, _startAngle, _endAngle, _anticlockwise) {
|
|
10097
|
-
return this;
|
|
10098
|
-
}
|
|
10099
|
-
drawPoints(_points, _curve, _close) {
|
|
10100
|
-
return this;
|
|
10101
|
-
}
|
|
10102
|
-
clearPath() {
|
|
10103
|
-
return this;
|
|
10104
|
-
}
|
|
10105
9932
|
paint() {
|
|
10106
9933
|
const {pathElement: pathElement} = this;
|
|
10107
9934
|
if (!pathElement.__layout.boxChanged) pathElement.forceUpdate("path");
|
|
@@ -12416,7 +12243,7 @@ function checkSizeAndCreateData(ui, attrName, paint, image, leafPaint, boxBounds
|
|
|
12416
12243
|
needUpdate = false;
|
|
12417
12244
|
}
|
|
12418
12245
|
}
|
|
12419
|
-
if (paint.mode === "brush") PaintImage.brush(leafPaint, ui);
|
|
12246
|
+
if (paint.mode === "brush") PaintImage.brush(leafPaint, ui, attrName);
|
|
12420
12247
|
if (!leafPaint.data) {
|
|
12421
12248
|
PaintImage.createData(leafPaint, image, paint, boxBounds);
|
|
12422
12249
|
const {transform: transform} = leafPaint.data, {opacity: opacity} = paint;
|