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

SetCenterOptions

Source on GitHub 

The SetCenterOptions type is used to configure the setCenter function you get from useSvelteFlow. Next to the shared ViewportHelperFunctionOptions like duration, you can set the zoom level the viewport should have once it is centered.

Fields

NameTypeDefault
durationnumber
ease(t: number) => number
interpolate"smooth" | "linear"
zoomnumber