fix initial direction to match default previous slide behavior

pull/6183/head
Theo-Steiner 5 years ago committed by Theodor Steiner
parent c7f11b6c3b
commit c3c251c466

@ -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);

Loading…
Cancel
Save