Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
transition: function * ({ receivedSprites, sentSprites, removedSprites }) {
printSprites(arguments[0]);
// received and sent sprites are flying above all the others
receivedSprites.concat(sentSprites).forEach(sprite => {
sprite.applyStyles({
'z-index': 1
});
});
receivedSprites.forEach(parallel(move, scale));
sentSprites.forEach(parallel(move, scale));
removedSprites.forEach(sprite => {
sprite.endTranslatedBy(0, 0);
continuePrior(sprite);
opacity(sprite, { to: 0 });
});
}
removedSprites.forEach(sprite => {
sprite.endAtSprite(beacons.one);
parallel(move(sprite, scale(sprite)));
});
},
moveThem: function*({ keptSprites }) {
keptSprites.forEach(
parallel(
moveSVG.property('cx'),
moveSVG.property('cy'),
moveSVG.property('r'),
),
);
},
insertedSprites.forEach(sprite => {
let connectionName = sprite.element.getAttribute('data-connection-name')
sprite.startAtSprite(beacons[connectionName]);
parallel(move(sprite, { easing: easeIn, duration: 500}));
});
},
transition: function*({ sentSprites }) {
let motions = this.motions();
sentSprites.forEach(parallel(...motions));
},
}).reopenClass({
transition: function * ({ sentSprites }) {
sentSprites.forEach(
parallel(
move,
compensateForScale,
adjustCSS.property('font-size'),
adjustCSS.property('letter-spacing'),
adjustColor.property('color')
)
);
}
}).reopenClass({
keptSprites.forEach(sprite => {
parallel(move(sprite), scale(sprite));
});
insertedSprites.forEach(sprite => {
sprite.startAtSprite(beacons.add);
parallel(move(sprite, scale(sprite)));
});
keptSprites.forEach((sprite: Sprite) => {
parallel(
fadeIn(sprite),
move(sprite, { easing: easeIn }),
);
});
removedSprites.forEach((sprite: Sprite) => fadeOut(sprite));