disable wiggle onclick during animation

This commit is contained in:
ntr
2019-12-20 17:16:48 +10:00
parent 5c3a318882
commit 44089724ae
2 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -13,8 +13,8 @@ const { ConstructAnimation } = require('./animations');
const addState = connect(
function receiveState(state) {
const { animSource, animTarget, resolution, account } = state;
return { animSource, animTarget, resolution, account };
const { animating, animSource, animTarget, resolution, account } = state;
return { animating, animSource, animTarget, resolution, account };
}
);
@@ -43,6 +43,7 @@ class ConstructAvatar extends Component {
}
onClick() {
if (this.props.animating) return false;
return this.animations.push(wiggle(this.props.construct.id, this.idle));
}