Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
insertedSprites.concat(receivedSprites).forEach(sprite => {
sprite.applyStyles({ 'pointer-events': '' });
// this animates them to their natural opacity, which is determined by our
// stylesheet.
opacity(sprite);
});
removedSprites.forEach(sprite => {
opacity(sprite, { to: 0 });
});
},
receivedSprites.forEach(sprite => {
opacity(sprite, { from: 0, to: 1, duration: duration * 0.2 });
});
}
insertedSprites.forEach(s => opacity(s, { from: 0 }));
receivedSprites.forEach(s => opacity(s));
removedSprites.forEach(sprite => {
sprite.endTranslatedBy(0, 0);
continuePrior(sprite);
opacity(sprite, { to: 0 });
});
},
receivedSprites.forEach(sprite => {
opacity(sprite, { from: 0, to: 1, duration: duration * 0.2 });
});
}
removedSprites.forEach(sprite => {
sprite.endTranslatedBy(0, 0);
continuePrior(sprite);
opacity(sprite, { to: 0 });
});
}
insertedSprites.concat(keptSprites).map(s =>
opacity(s, {
to: 1,
duration: duration / 2,
}),
);
insertedSprites.forEach(sprite => {
opacity(sprite, { from: 0, to: 1 });
});