Merge pull request #5258 from xyflow/fix/fit-view
Fix/fit view in SvelteFlow
This commit is contained in:
5
.changeset/great-geese-explode.md
Normal file
5
.changeset/great-geese-explode.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@xyflow/svelte': patch
|
||||
---
|
||||
|
||||
Fix fitView not working when accessed through the SvelteFlowProvider
|
||||
@@ -385,7 +385,9 @@ export function useSvelteFlow<NodeType extends Node = Node, EdgeType extends Edg
|
||||
|
||||
return Promise.resolve(true);
|
||||
},
|
||||
fitView: store.fitView,
|
||||
fitView: (options?: FitViewOptions) => {
|
||||
return store.fitView(options);
|
||||
},
|
||||
fitBounds: async (bounds: Rect, options?: FitBoundsOptions) => {
|
||||
if (!store.panZoom) {
|
||||
return Promise.resolve(false);
|
||||
|
||||
Reference in New Issue
Block a user