misc fix
This commit is contained in:
parent
4fc5f46311
commit
fe956936d1
@ -101,6 +101,7 @@ function animations(props) {
|
||||
setAvatarAnimation({
|
||||
source: true,
|
||||
target: avatarAnimation.target,
|
||||
id: resolution.id,
|
||||
animTargetId: construct.id,
|
||||
type: 'sourceCast',
|
||||
params: { x, y },
|
||||
|
||||
@ -57,15 +57,14 @@ class ConstructAvatar extends Component {
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const animations = nextProps.avatarAnimation;
|
||||
if (animations.id === -1) this.animId = 0; // The current set of resolutions ended reset to 0
|
||||
if (animations.id !== this.animId && animations.animTargetId === this.props.id) {
|
||||
if (nextProps.avatarAnimation.id === -1) this.animId = 0; // The current set of resolutions ended reset to 0
|
||||
if (nextProps.avatarAnimation.id !== this.animId && nextProps.avatarAnimation.animTargetId === this.props.id) {
|
||||
this.animId = nextProps.avatarAnimation.id;
|
||||
const selectAnim = () => {
|
||||
switch (animations.type) {
|
||||
switch (nextProps.avatarAnimation.type) {
|
||||
case 'banish': return banish(this.props.id);
|
||||
case 'invert': return invert(this.props.id);
|
||||
case 'sourceCast': return sourceCast(this.props.id, animations.params);
|
||||
case 'sourceCast': return sourceCast(this.props.id, nextProps.avatarAnimation.params);
|
||||
default: return null;
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user