Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
motions() {
let motions = [];
if (!this.disableMove) {
motions.push(move);
}
if (!this.disableCompensateForScale) {
motions.push(compensateForScale);
}
if (!this.disableAdjustFontSize) {
motions.push(adjustCSS.property('font-size'));
}
if (!this.disableAdjustLetterSpacing) {
motions.push(adjustCSS.property('letter-spacing'));
}
if (!this.disableAdjustColor) {
motions.push(adjustColor.property('color'));
}
return motions;
},
transition: function * ({ sentSprites }) {
sentSprites.forEach(
parallel(
move,
compensateForScale,
adjustCSS.property('font-size'),
adjustCSS.property('letter-spacing'),
adjustColor.property('color')
)
);
}
}).reopenClass({
sentSprites.forEach(sprite => {
sprite.applyStyles({ 'z-index': 1 });
move(sprite);
if (sprite.element.tagName === 'svg') {
scale(sprite);
} else {
adjustCSS.property('font-size')(sprite);
adjustCSS.property('letter-spacing')(sprite);
adjustCSS.property('line-height')(sprite);
}
});
},
sentSprites.forEach(sprite => {
sprite.applyStyles({ 'z-index': 1 });
move(sprite);
if (sprite.element.tagName === 'svg') {
scale(sprite);
} else {
adjustCSS.property('font-size')(sprite);
adjustCSS.property('letter-spacing')(sprite);
adjustCSS.property('line-height')(sprite);
}
});
},
transition: function * ({ sentSprites }) {
sentSprites.forEach(
parallel(
move,
compensateForScale,
adjustCSS.property('font-size'),
adjustCSS.property('letter-spacing'),
adjustColor.property('color')
)
);
}
}).reopenClass({
motions() {
let motions = [];
if (!this.disableMove) {
motions.push(move);
}
if (!this.disableCompensateForScale) {
motions.push(compensateForScale);
}
if (!this.disableAdjustFontSize) {
motions.push(adjustCSS.property('font-size'));
}
if (!this.disableAdjustLetterSpacing) {
motions.push(adjustCSS.property('letter-spacing'));
}
if (!this.disableAdjustColor) {
motions.push(adjustColor.property('color'));
}
return motions;
},
sentSprites.forEach(sprite => {
sprite.applyStyles({ 'z-index': 1 });
move(sprite);
if (sprite.element.tagName === 'svg') {
scale(sprite);
} else {
adjustCSS.property('font-size')(sprite);
adjustCSS.property('letter-spacing')(sprite);
adjustCSS.property('line-height')(sprite);
}
});
},