From c3c251c466d5dc3944224132169ca8c07bdd4466 Mon Sep 17 00:00:00 2001 From: Theo-Steiner Date: Tue, 20 Apr 2021 09:54:32 +0900 Subject: [PATCH] fix initial direction to match default previous slide behavior --- src/runtime/transition/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/transition/index.ts b/src/runtime/transition/index.ts index c0d91a5a0a..7cb38fbaaa 100644 --- a/src/runtime/transition/index.ts +++ b/src/runtime/transition/index.ts @@ -105,9 +105,9 @@ export function slide(node: Element, { delay = 0, duration = 400, easing = cubicOut, - axis = 'x' + axis = 'y' }: SlideParams = {}): TransitionConfig { - const direction: { x: 1 | 0, y: 1 | 0 } = { x: axis === 'x' ? 1 : 0, y: axis === 'y' ? 1 : 0 }; + const direction = { x: axis === 'x' ? 1 : 0, y: axis === 'y' ? 1 : 0 }; const style = getComputedStyle(node); const opacity = +style.opacity; const height = parseFloat(style.height);