From cb45e4f654c1e6b4ebaffbf382eec755b79407b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ja=C5=9Bpi=C5=84ski?= Date: Tue, 14 Sep 2021 09:39:45 +0200 Subject: [PATCH] Added further description in readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 50d4d9349..76e400b6d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -This library was modified by me to provide a behaviour described in this [issue](https://github.com/wbkd/react-flow/issues/1419). I achieved it by adding a `fitViewToDimensions` function in `src\hooks\useZoomPanHelper.ts`. +This library was modified by me to provide a behaviour described in this [issue](https://github.com/wbkd/react-flow/issues/1419). I achieved it by adding a `fitViewToDimensions` function in `src\hooks\useZoomPanHelper.ts`. It takes nodes and container dimensions as arguments instead of getting them from store. This way you can pass them yourself, an they will always be up to date. [![react-flow](https://user-images.githubusercontent.com/2857535/95224198-b2540000-07fa-11eb-832d-361d72d60345.jpg)](https://reactflow.dev)