leafer-draw 2.1.7 → 2.1.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/web.js +22 -18
- package/dist/web.min.js +1 -1
- package/dist/web.min.js.map +1 -1
- package/dist/web.module.js +22 -18
- package/dist/web.module.min.js +1 -1
- package/dist/web.module.min.js.map +1 -1
- package/package.json +3 -3
package/dist/web.js
CHANGED
|
@@ -904,12 +904,12 @@ var LeaferUI = function(exports) {
|
|
|
904
904
|
PointHelper.scaleOf(this, origin, scaleX, scaleY);
|
|
905
905
|
return this;
|
|
906
906
|
}
|
|
907
|
-
rotate(rotation, origin) {
|
|
908
|
-
PointHelper.rotate(this, rotation, origin);
|
|
907
|
+
rotate(rotation, origin, radiusX, radiusY) {
|
|
908
|
+
PointHelper.rotate(this, rotation, origin, radiusX, radiusY);
|
|
909
909
|
return this;
|
|
910
910
|
}
|
|
911
|
-
rotateOf(origin, rotation) {
|
|
912
|
-
PointHelper.rotate(this, rotation, origin);
|
|
911
|
+
rotateOf(origin, rotation, radiusX, radiusY) {
|
|
912
|
+
PointHelper.rotate(this, rotation, origin, radiusX, radiusY);
|
|
913
913
|
return this;
|
|
914
914
|
}
|
|
915
915
|
getRotation(origin, to, toOrigin) {
|
|
@@ -932,11 +932,11 @@ var LeaferUI = function(exports) {
|
|
|
932
932
|
getDistancePoint(to, distance, changeTo, fromTo) {
|
|
933
933
|
return new Point(PointHelper.getDistancePoint(this, to, distance, changeTo, fromTo));
|
|
934
934
|
}
|
|
935
|
-
getAngle(to) {
|
|
936
|
-
return PointHelper.getAngle(this, to);
|
|
935
|
+
getAngle(to, radiusX, radiusY) {
|
|
936
|
+
return PointHelper.getAngle(this, to, radiusX, radiusY);
|
|
937
937
|
}
|
|
938
|
-
getAtan2(to) {
|
|
939
|
-
return PointHelper.getAtan2(this, to);
|
|
938
|
+
getAtan2(to, radiusX, radiusY) {
|
|
939
|
+
return PointHelper.getAtan2(this, to, radiusX, radiusY);
|
|
940
940
|
}
|
|
941
941
|
isSame(point, quick) {
|
|
942
942
|
return PointHelper.isSame(this, point, quick);
|
|
@@ -4310,7 +4310,9 @@ var LeaferUI = function(exports) {
|
|
|
4310
4310
|
set(value) {
|
|
4311
4311
|
if (this.__setAttr(key, value)) {
|
|
4312
4312
|
this.waitParent(() => {
|
|
4313
|
-
this
|
|
4313
|
+
const {parent: parent} = this;
|
|
4314
|
+
parent.__layout.childrenSortChange();
|
|
4315
|
+
if (parent.__.flow) parent.__layout.boxChange();
|
|
4314
4316
|
});
|
|
4315
4317
|
}
|
|
4316
4318
|
}
|
|
@@ -4691,7 +4693,7 @@ var LeaferUI = function(exports) {
|
|
|
4691
4693
|
p = p.parent;
|
|
4692
4694
|
}
|
|
4693
4695
|
},
|
|
4694
|
-
animateMove(t, move, speed = .3) {
|
|
4696
|
+
animateMove(t, move, speed = .3, onAnimate) {
|
|
4695
4697
|
if (!move.x && !move.y) return;
|
|
4696
4698
|
if (Math.abs(move.x) < 1 && Math.abs(move.y) < 1) {
|
|
4697
4699
|
t.move(move);
|
|
@@ -4699,8 +4701,9 @@ var LeaferUI = function(exports) {
|
|
|
4699
4701
|
const x = move.x * speed, y = move.y * speed;
|
|
4700
4702
|
move.x -= x, move.y -= y;
|
|
4701
4703
|
t.move(x, y);
|
|
4702
|
-
Platform.requestRender(() => L.animateMove(t, move, speed));
|
|
4704
|
+
Platform.requestRender(() => L.animateMove(t, move, speed, onAnimate));
|
|
4703
4705
|
}
|
|
4706
|
+
onAnimate && onAnimate();
|
|
4704
4707
|
}
|
|
4705
4708
|
};
|
|
4706
4709
|
const L = LeafHelper;
|
|
@@ -5774,6 +5777,7 @@ var LeaferUI = function(exports) {
|
|
|
5774
5777
|
if (this.isBranch) {
|
|
5775
5778
|
this.__extraUpdate();
|
|
5776
5779
|
if (this.__.flow) {
|
|
5780
|
+
if (this.__layout.childrenSortChanged) this.__updateSortChildren();
|
|
5777
5781
|
if (this.__layout.boxChanged) this.__updateFlowLayout();
|
|
5778
5782
|
updateAllMatrix$2(this);
|
|
5779
5783
|
updateBounds$1(this, this);
|
|
@@ -5842,11 +5846,7 @@ var LeaferUI = function(exports) {
|
|
|
5842
5846
|
const {excludeRenderBounds: excludeRenderBounds$1} = LeafBoundsHelper, {hasSize: hasSize} = BoundsHelper;
|
|
5843
5847
|
const BranchRender = {
|
|
5844
5848
|
__updateChange() {
|
|
5845
|
-
|
|
5846
|
-
if (layout.childrenSortChanged) {
|
|
5847
|
-
this.__updateSortChildren();
|
|
5848
|
-
layout.childrenSortChanged = false;
|
|
5849
|
-
}
|
|
5849
|
+
if (this.__layout.childrenSortChanged) this.__updateSortChildren();
|
|
5850
5850
|
this.__.__checkSingle();
|
|
5851
5851
|
},
|
|
5852
5852
|
__render(canvas, options) {
|
|
@@ -6336,6 +6336,7 @@ var LeaferUI = function(exports) {
|
|
|
6336
6336
|
children.sort(sort);
|
|
6337
6337
|
this.__layout.affectChildrenSort = affectSort;
|
|
6338
6338
|
}
|
|
6339
|
+
this.__layout.childrenSortChanged = false;
|
|
6339
6340
|
}
|
|
6340
6341
|
add(child, index) {
|
|
6341
6342
|
if (child === this || child.destroyed) return debug$5.warn("add self or destroyed");
|
|
@@ -6567,7 +6568,7 @@ var LeaferUI = function(exports) {
|
|
|
6567
6568
|
this.levelMap = null;
|
|
6568
6569
|
}
|
|
6569
6570
|
}
|
|
6570
|
-
const version = "2.1.
|
|
6571
|
+
const version = "2.1.8";
|
|
6571
6572
|
const debug$4 = Debug.get("LeaferCanvas");
|
|
6572
6573
|
class LeaferCanvas extends LeaferCanvasBase {
|
|
6573
6574
|
set zIndex(zIndex) {
|
|
@@ -8743,7 +8744,10 @@ var LeaferUI = function(exports) {
|
|
|
8743
8744
|
ellipse(path, rx, ry, rx, ry, 0, outerStartAngle, outerEndAngle, outerAnticlockwise);
|
|
8744
8745
|
} else {
|
|
8745
8746
|
if (hasAngle) {
|
|
8746
|
-
if (!closedAngle)
|
|
8747
|
+
if (!closedAngle) {
|
|
8748
|
+
if (!closed) open = true;
|
|
8749
|
+
if (!open) moveTo$3(path, rx, ry);
|
|
8750
|
+
}
|
|
8747
8751
|
ellipse(path, rx, ry, rx, ry, 0, startAngle, endAngle);
|
|
8748
8752
|
} else {
|
|
8749
8753
|
ellipse(path, rx, ry, rx, ry);
|