Make duration prop optional

This commit is contained in:
Matthias Metelka 2022-09-06 23:04:17 +02:00
parent 6883bfec69
commit 26a8c72b4c

View file

@ -6,7 +6,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import { cubicIn, cubicOut } from "svelte/easing"; import { cubicIn, cubicOut } from "svelte/easing";
import { tweened } from "svelte/motion"; import { tweened } from "svelte/motion";
export let duration: number; export let duration = 200;
function dynamicDuration(height: number, factor: number): number { function dynamicDuration(height: number, factor: number): number {
return 100 + Math.pow(height, 1 / 4) * factor; return 100 + Math.pow(height, 1 / 4) * factor;