Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
*animate() {
let { value: finalValue, unit } = this._splitUnit(this.sprite.finalComputedStyle[this.propertyName]);
if (this.prior) {
this.tween = new Tween(
0,
finalValue - this.prior.tween.finalValue,
this.duration,
this.opts.easing
).plus(this.prior.tween);
} else {
this.tween = new Tween(
this._splitUnit(this.sprite.initialComputedStyle[this.propertyName]).value,
finalValue,
this.duration,
this.opts.easing
);
}
while (!this.tween.done) {
this.sprite.applyStyles({
[this.propertyName]: `${this.tween.currentValue}${unit}`
*animate() {
let { value: finalValue, unit } = this._splitUnit(this.sprite.finalComputedStyle[this.propertyName]);
if (this.prior) {
this.tween = new Tween(
0,
finalValue - this.prior.tween.finalValue,
this.duration,
this.opts.easing
).plus(this.prior.tween);
} else {
this.tween = new Tween(
this._splitUnit(this.sprite.initialComputedStyle[this.propertyName]).value,
finalValue,
this.duration,
this.opts.easing
);
}
while (!this.tween.done) {
this.sprite.applyStyles({
[this.propertyName]: `${this.tween.currentValue}${unit}`
});
yield rAF();
}
}
*animate() {
if (this.prior) {
this.tween = new Tween(
0,
this.sprite.getFinalDimension(this.dimension) - this.prior.tween.finalValue,
this.duration,
this.opts.easing
).plus(this.prior.tween);
} else {
this.tween = new Tween(
this.sprite.getInitialDimension(this.dimension),
this.sprite.getFinalDimension(this.dimension),
this.duration,
this.opts.easing
);
}
while (!this.tween.done) {
this.sprite.element[this.dimension].baseVal.value = this.tween.currentValue;
yield rAF();
*animate() {
if (this.prior) {
this.tween = new Tween(
0,
this.sprite.getFinalDimension(this.dimension) - this.prior.tween.finalValue,
this.duration,
this.opts.easing
).plus(this.prior.tween);
} else {
this.tween = new Tween(
this.sprite.getInitialDimension(this.dimension),
this.sprite.getFinalDimension(this.dimension),
this.duration,
this.opts.easing
);
}
while (!this.tween.done) {
this.sprite.element[this.dimension].baseVal.value = this.tween.currentValue;
yield rAF();
}
}
}