-
-
Notifications
You must be signed in to change notification settings - Fork 893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Independent delta not working in .then #265
Comments
@strukteon Could you create a Codepen for us to test? But I think the problem here is the 0. If I remember correctly, if the key is a zero or negative values, you need to define it as a string instead of a number. So "0" : "100" |
Weirdly enough, the value 0 works when not specifying any easing parameters. Also, some properties (like scale) can be used with a separate easing function. Here's the codepen: https://codepen.io/strukteon-the-vuer/pen/jOYeBex |
Hi @strukteon, Good catch, I confirm it's a bug! You can workaround using a "global" easing define at the root of const scale = new mojs.Shape({
top: 200,
left: 500,
scale: {
0: 3,
easing: "elastic.out"
},
x: {
0: 200
},
radius: 40,
duration: 1500
}).then({
easing: "elastic.out", // x later will use this easing
scale: {
3: 1,
easing: "cubic.in" // scale will properly use this easing
},
x: {
200: 0
// specifying an easing here won't work at all
}
});
|
@xavierfoucrier Alright, thanks! 😃 |
It seems like independent deltas don't work in
.then()
functions.I am trying to create a jump animation using this code:
When adding any of the independent delta properties specified in https://mojs.github.io/api/modules/html/#independent-deltas, the
.then()
is ignored altogether.Am I using it improperly or is there any fix for this?
The text was updated successfully, but these errors were encountered: