Skip to content

Commit b3a0c14

Browse files
committed
fix bezier cover property
1 parent ad98a3b commit b3a0c14

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-tween-one",
3-
"version": "2.6.7",
3+
"version": "2.6.8",
44
"description": "tween-one anim component for react",
55
"keywords": [
66
"react",

src/plugin/BezierPlugin.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,14 @@ Bezier.prototype = {
509509
this.init();
510510
},
511511
setRatio(r, t, computedStyle) {
512-
t.style.transform = getTransform(this.set(r));
512+
const transform = getTransform(this.set(r));
513+
// 只覆盖 3 个属性;
514+
t.style.transform = {
515+
...t.style.transform,
516+
translateX: transform.translateX,
517+
translateY: transform.translateY,
518+
rotate: transform.rotate,
519+
};
513520
if (computedStyle) {
514521
computedStyle.transformSVG = createMatrix(t.style.transform).toString();
515522
}

0 commit comments

Comments
 (0)