fix construct img reloads
This commit is contained in:
@@ -70,10 +70,6 @@ class Sleep extends Component {
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
anime.set('#sleep', {
|
||||
translateY: 75,
|
||||
});
|
||||
|
||||
this.animations.push(anime({
|
||||
targets: ['#sleep'],
|
||||
opacity: [
|
||||
|
||||
@@ -113,6 +113,10 @@ class ConstructAvatar extends Component {
|
||||
}
|
||||
|
||||
shouldComponentUpdate({ animSource, animTarget, construct }) {
|
||||
if (construct !== this.props.construct) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (animSource === this.props.animSource && animTarget === this.props.animTarget) {
|
||||
// console.warn(construct.name, 'thinks its same props')
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user