Simple translateY will not work for the life of me.
am8525 opened this issue · comments
AJ commented
Really not sure what I'm doing wrong here. Just trying to get a basic translation going so I can start working with the library.
Any ideas?
render(){
const {classes} = this.props;
return (
<div className={classes.landscape}>
<div className={classes.centerpiece}>
<Anime translateY={100} loop={true} autoplay={true}>
<Dot/>
</Anime>
</div>
</div>
);
}
AJ commented
I've figured it out. A little bit of DOM manipulation did the trick:
componentDidMount(){
const target = ReactDOM.findDOMNode(this);
anime({
targets: target.children[0].children,
translateY: 100,
loop: true
});
}
Note that it's the child of the child because the dot is within a nested div.