Skip to content

Commit df91fd5

Browse files
committed
other fix
1 parent 8e1515c commit df91fd5

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

packages/svelte/src/internal/client/transitions.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -444,23 +444,13 @@ function create_transition(dom, init, direction, effect) {
444444
payload.css !== undefined &&
445445
/** @type {Animation} */ (animation).effect != null
446446
) {
447-
const transform = getComputedStyle(dom).transform;
448447
const duration = payload.duration ?? 300;
449448
const css_fn = payload.css;
450449
const easing_fn = payload.easing || linear;
451-
const current_time = animation.currentTime;
452-
453-
const keyframes = create_keyframes(
454-
easing_fn,
455-
css_fn,
456-
current_time,
457-
direction,
458-
true
459-
);
460-
animation.duration = current_time;
450+
const keyframes = create_keyframes(easing_fn, css_fn, duration, direction, true);
461451
// @ts-ignore
462452
animation.effect.setKeyframes(keyframes);
463-
animation.currentTime = 0;
453+
animation.currentTime = duration;
464454
}
465455
/** @type {Animation | TickAnimation} */ (animation).reverse();
466456
} else {

0 commit comments

Comments
 (0)