Skip to Content
Svelte Flow 2 is out! Read the announcement →
ReferenceTypes

ViewportHelperFunctionOptions

Source on GitHub 

The ViewportHelperFunctionOptions type defines the options that can be passed to viewport functions such as setViewport or zoomIn. They configure the transition behaviour to smoothly animate viewport changes.

type ViewportHelperFunctionOptions = { duration?: number; ease?: (t: number) => number; interpolate?: 'smooth' | 'linear'; };
NameTypeDefault
durationnumber
ease(t: number) => number
interpolate"smooth" | "linear"