-
Notifications
You must be signed in to change notification settings - Fork 43
easing bugs #18
Copy link
Copy link
Open
Description
- easing 'spring' not support in steps, it will trigger a warning~
like this
const steps = [{
style: {
opacity: 0,
},
duration: 400,
easing: 'ease-in-out'
}, {
style: {
opacity: 1,
transform: 'translate(0, 0)',
},
duration: 1000,
easing: 'ease-out'
}, {
style: {
transform: 'translate(100px, 100px)',
},
duration: 1200,
easing: 'spring'
}];
render() {
return (
<div className="simple">
<button onClick={this.handleClick.bind(this)}>click me!</button>
<Animate steps={steps} >
<div style={{
width: 100,
height: 100,
backgroundColor: 'red'
}}
>
</div>
</Animate>
</div>
);
}- if use steps, children is a function,animation will not be properly implemented'
like this
const steps = [{
style: {
opacity: 0,
},
duration: 400,
easing: 'ease-in-out'
}, {
style: {
opacity: 1,
transform: 'translate(0, 0)',
},
duration: 1000,
easing: 'ease-out'
}, {
style: {
transform: 'translate(100px, 100px)',
},
duration: 1200,
easing: 'ease-in'
}];
render() {
return (
<div className="simple">
<button onClick={this.handleClick.bind(this)}>click me!</button>
<Animate steps={steps} onAnimationEnd={()=>{console.log('aaa');}}>
{
(json) => {
console.log(json);
return (
<div style={{
width: 100,
height: 100,
backgroundColor: 'red'
}}
>
</div>
);
}
}
</Animate>
</div>
);
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels