Skip to content

Commit 6849396

Browse files
authored
I un-inverted the math like a dumbass
1 parent 828568e commit 6849396

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/addons/addons/editor-animations/userscript.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default async function({ addon }) {
123123
}
124124

125125
function getAnim(time) {
126-
time /= animationSpeed;
126+
time *= animationSpeed;
127127
return `${time}s ${cubicAnimation}`;
128128
};
129129

@@ -189,7 +189,7 @@ export default async function({ addon }) {
189189

190190
const animation = element.animate(
191191
[{ height: "0px", opacity: 0 }, { height: `${ogHeight}px`, opacity: 1 }],
192-
{ duration: animTime / animationSpeed, easing: cubicAnimation }
192+
{ duration: animTime * animationSpeed, easing: cubicAnimation }
193193
);
194194
animation.onfinish = () => {
195195
element.style.overflow = "hidden";
@@ -207,7 +207,7 @@ export default async function({ addon }) {
207207

208208
element.animate(
209209
[{ transform: "scale(0)", opacity: 0 }, { transform: "scale(1)", opacity: 1 }],
210-
{ duration: animTime / animationSpeed, easing: cubicAnimation }
210+
{ duration: animTime * animationSpeed, easing: cubicAnimation }
211211
);
212212
}
213213

@@ -244,11 +244,11 @@ export default async function({ addon }) {
244244

245245
animClone.animate(
246246
[{ opacity: 1 }, { opacity: 0 }],
247-
{ duration: animTime / animationSpeed, easing: cubicAnimation }
247+
{ duration: animTime * animationSpeed, easing: cubicAnimation }
248248
);
249249
const animation = animClone.firstChild.animate(
250250
[{ transform: "scale(1)", opacity: 1 }, { transform: "scale(0)", opacity: 0 }],
251-
{ duration: animTime / animationSpeed, easing: cubicAnimation }
251+
{ duration: animTime * animationSpeed, easing: cubicAnimation }
252252
);
253253
animation.onfinish = () => {
254254
animClone.remove();

0 commit comments

Comments
 (0)