@leafer/core 1.12.0 → 1.12.1
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/lib/core.cjs +47 -4
- package/lib/core.esm.js +47 -4
- package/lib/core.esm.min.js +1 -1
- package/lib/core.esm.min.js.map +1 -1
- package/lib/core.min.cjs +1 -1
- package/lib/core.min.cjs.map +1 -1
- package/package.json +17 -17
- package/src/index.ts +1 -1
- package/types/index.d.ts +1 -1
package/lib/core.cjs
CHANGED
|
@@ -4944,10 +4944,53 @@ const BranchHelper = {
|
|
|
4944
4944
|
if (exclude && exclude === branch) continue;
|
|
4945
4945
|
updateBounds$2(branch);
|
|
4946
4946
|
}
|
|
4947
|
+
},
|
|
4948
|
+
move(branch, x, y) {
|
|
4949
|
+
let w;
|
|
4950
|
+
const {children: children} = branch;
|
|
4951
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
4952
|
+
branch = children[i];
|
|
4953
|
+
w = branch.__world;
|
|
4954
|
+
w.e += x;
|
|
4955
|
+
w.f += y;
|
|
4956
|
+
w.x += x;
|
|
4957
|
+
w.y += y;
|
|
4958
|
+
if (branch.isBranch) move$1(branch, x, y);
|
|
4959
|
+
}
|
|
4960
|
+
},
|
|
4961
|
+
scale(branch, x, y, scaleX, scaleY, a, b) {
|
|
4962
|
+
let w;
|
|
4963
|
+
const {children: children} = branch;
|
|
4964
|
+
const changeScaleX = scaleX - 1;
|
|
4965
|
+
const changeScaleY = scaleY - 1;
|
|
4966
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
4967
|
+
branch = children[i];
|
|
4968
|
+
w = branch.__world;
|
|
4969
|
+
w.a *= scaleX;
|
|
4970
|
+
w.d *= scaleY;
|
|
4971
|
+
if (w.b || w.c) {
|
|
4972
|
+
w.b *= scaleX;
|
|
4973
|
+
w.c *= scaleY;
|
|
4974
|
+
}
|
|
4975
|
+
if (w.e === w.x && w.f === w.y) {
|
|
4976
|
+
w.x = w.e += (w.e - a) * changeScaleX + x;
|
|
4977
|
+
w.y = w.f += (w.f - b) * changeScaleY + y;
|
|
4978
|
+
} else {
|
|
4979
|
+
w.e += (w.e - a) * changeScaleX + x;
|
|
4980
|
+
w.f += (w.f - b) * changeScaleY + y;
|
|
4981
|
+
w.x += (w.x - a) * changeScaleX + x;
|
|
4982
|
+
w.y += (w.y - b) * changeScaleY + y;
|
|
4983
|
+
}
|
|
4984
|
+
w.width *= scaleX;
|
|
4985
|
+
w.height *= scaleY;
|
|
4986
|
+
w.scaleX *= scaleX;
|
|
4987
|
+
w.scaleY *= scaleY;
|
|
4988
|
+
if (branch.isBranch) scale(branch, x, y, scaleX, scaleY, a, b);
|
|
4989
|
+
}
|
|
4947
4990
|
}
|
|
4948
4991
|
};
|
|
4949
4992
|
|
|
4950
|
-
const {pushAllChildBranch: pushAllChildBranch, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack} = BranchHelper;
|
|
4993
|
+
const {pushAllChildBranch: pushAllChildBranch, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack, move: move$1, scale: scale} = BranchHelper;
|
|
4951
4994
|
|
|
4952
4995
|
const WaitHelper = {
|
|
4953
4996
|
run(wait) {
|
|
@@ -6511,10 +6554,10 @@ exports.Leaf = class Leaf {
|
|
|
6511
6554
|
hit(_world, _hitRadius) {
|
|
6512
6555
|
return true;
|
|
6513
6556
|
}
|
|
6514
|
-
__hitWorld(_point) {
|
|
6557
|
+
__hitWorld(_point, _forceHitFill) {
|
|
6515
6558
|
return true;
|
|
6516
6559
|
}
|
|
6517
|
-
__hit(_local) {
|
|
6560
|
+
__hit(_local, _forceHitFill) {
|
|
6518
6561
|
return true;
|
|
6519
6562
|
}
|
|
6520
6563
|
__hitFill(_inner) {
|
|
@@ -6873,7 +6916,7 @@ class LeafLevelList {
|
|
|
6873
6916
|
}
|
|
6874
6917
|
}
|
|
6875
6918
|
|
|
6876
|
-
const version = "1.12.
|
|
6919
|
+
const version = "1.12.1";
|
|
6877
6920
|
|
|
6878
6921
|
exports.AlignHelper = AlignHelper;
|
|
6879
6922
|
|
package/lib/core.esm.js
CHANGED
|
@@ -4942,10 +4942,53 @@ const BranchHelper = {
|
|
|
4942
4942
|
if (exclude && exclude === branch) continue;
|
|
4943
4943
|
updateBounds$2(branch);
|
|
4944
4944
|
}
|
|
4945
|
+
},
|
|
4946
|
+
move(branch, x, y) {
|
|
4947
|
+
let w;
|
|
4948
|
+
const {children: children} = branch;
|
|
4949
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
4950
|
+
branch = children[i];
|
|
4951
|
+
w = branch.__world;
|
|
4952
|
+
w.e += x;
|
|
4953
|
+
w.f += y;
|
|
4954
|
+
w.x += x;
|
|
4955
|
+
w.y += y;
|
|
4956
|
+
if (branch.isBranch) move$1(branch, x, y);
|
|
4957
|
+
}
|
|
4958
|
+
},
|
|
4959
|
+
scale(branch, x, y, scaleX, scaleY, a, b) {
|
|
4960
|
+
let w;
|
|
4961
|
+
const {children: children} = branch;
|
|
4962
|
+
const changeScaleX = scaleX - 1;
|
|
4963
|
+
const changeScaleY = scaleY - 1;
|
|
4964
|
+
for (let i = 0, len = children.length; i < len; i++) {
|
|
4965
|
+
branch = children[i];
|
|
4966
|
+
w = branch.__world;
|
|
4967
|
+
w.a *= scaleX;
|
|
4968
|
+
w.d *= scaleY;
|
|
4969
|
+
if (w.b || w.c) {
|
|
4970
|
+
w.b *= scaleX;
|
|
4971
|
+
w.c *= scaleY;
|
|
4972
|
+
}
|
|
4973
|
+
if (w.e === w.x && w.f === w.y) {
|
|
4974
|
+
w.x = w.e += (w.e - a) * changeScaleX + x;
|
|
4975
|
+
w.y = w.f += (w.f - b) * changeScaleY + y;
|
|
4976
|
+
} else {
|
|
4977
|
+
w.e += (w.e - a) * changeScaleX + x;
|
|
4978
|
+
w.f += (w.f - b) * changeScaleY + y;
|
|
4979
|
+
w.x += (w.x - a) * changeScaleX + x;
|
|
4980
|
+
w.y += (w.y - b) * changeScaleY + y;
|
|
4981
|
+
}
|
|
4982
|
+
w.width *= scaleX;
|
|
4983
|
+
w.height *= scaleY;
|
|
4984
|
+
w.scaleX *= scaleX;
|
|
4985
|
+
w.scaleY *= scaleY;
|
|
4986
|
+
if (branch.isBranch) scale(branch, x, y, scaleX, scaleY, a, b);
|
|
4987
|
+
}
|
|
4945
4988
|
}
|
|
4946
4989
|
};
|
|
4947
4990
|
|
|
4948
|
-
const {pushAllChildBranch: pushAllChildBranch, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack} = BranchHelper;
|
|
4991
|
+
const {pushAllChildBranch: pushAllChildBranch, pushAllBranchStack: pushAllBranchStack, updateBoundsByBranchStack: updateBoundsByBranchStack, move: move$1, scale: scale} = BranchHelper;
|
|
4949
4992
|
|
|
4950
4993
|
const WaitHelper = {
|
|
4951
4994
|
run(wait) {
|
|
@@ -6509,10 +6552,10 @@ let Leaf = class Leaf {
|
|
|
6509
6552
|
hit(_world, _hitRadius) {
|
|
6510
6553
|
return true;
|
|
6511
6554
|
}
|
|
6512
|
-
__hitWorld(_point) {
|
|
6555
|
+
__hitWorld(_point, _forceHitFill) {
|
|
6513
6556
|
return true;
|
|
6514
6557
|
}
|
|
6515
|
-
__hit(_local) {
|
|
6558
|
+
__hit(_local, _forceHitFill) {
|
|
6516
6559
|
return true;
|
|
6517
6560
|
}
|
|
6518
6561
|
__hitFill(_inner) {
|
|
@@ -6871,6 +6914,6 @@ class LeafLevelList {
|
|
|
6871
6914
|
}
|
|
6872
6915
|
}
|
|
6873
6916
|
|
|
6874
|
-
const version = "1.12.
|
|
6917
|
+
const version = "1.12.1";
|
|
6875
6918
|
|
|
6876
6919
|
export { AlignHelper, Answer, AroundHelper, AutoBounds, BezierHelper, Bounds, BoundsEvent, BoundsHelper, Branch, BranchHelper, BranchRender, CanvasManager, ChildEvent, Creator, DataHelper, Debug, Direction4, Direction9, EllipseHelper, Event, EventCreator, Eventer, FileHelper, FourNumberHelper, ImageEvent, ImageManager, IncrementId, LayoutEvent, Leaf, LeafBounds, LeafBoundsHelper, LeafData, LeafDataProxy, LeafEventer, LeafHelper, LeafLayout, LeafLevelList, LeafList, LeafMatrix, LeafRender, LeaferCanvasBase, LeaferEvent, LeaferImage, MathHelper, Matrix, MatrixHelper, NeedConvertToCanvasCommandMap, OneRadian, PI2, PI_2, PathBounds, PathCommandDataHelper, PathCommandMap, PathCommandNodeHelper, PathConvert, PathCorner, PathCreator, PathDrawer, PathHelper, PathNumberCommandLengthMap, PathNumberCommandMap, Platform, Plugin, Point, PointHelper, PropertyEvent, RectHelper, RenderEvent, ResizeEvent, Resource, Run, StringNumberMap, TaskItem, TaskProcessor, TwoPointBoundsHelper, UICreator, WaitHelper, WatchEvent, affectRenderBoundsType, affectStrokeBoundsType, attr, autoLayoutType, boundsType, canvasPatch, canvasSizeAttrs, createDescriptor, cursorType, dataProcessor, dataType, decorateLeafAttr, defineDataProcessor, defineKey, defineLeafAttr, dimType, doBoundsType, doStrokeType, emptyData, eraserType, extraPropertyEventMap, getBoundsData, getDescriptor, getMatrixData, getPointData, hitType, isArray, isData, isEmptyData, isFinite, isNull, isNumber, isObject, isString, isUndefined, layoutProcessor, leaferTransformAttrMap, maskType, naturalBoundsType, opacityType, path, pathInputType, pathType, pen, positionType, registerUI, registerUIEvent, rewrite, rewriteAble, rotationType, scaleType, scrollType, sortType, strokeType, surfaceType, tempBounds, tempMatrix, tempPoint$2 as tempPoint, tryToNumber, useModule, version, visibleType };
|