From a49083f31679c47e1685e0cedbc9a40cc8f48fd8 Mon Sep 17 00:00:00 2001
From: Kristóf Marussy <kristof@marussy.com>
Date: Sat, 26 Aug 2023 21:44:58 +0200
Subject: refactor(frontent): improve graph drawing

---
 subprojects/frontend/src/graph/ZoomCanvas.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'subprojects/frontend/src/graph/ZoomCanvas.tsx')

diff --git a/subprojects/frontend/src/graph/ZoomCanvas.tsx b/subprojects/frontend/src/graph/ZoomCanvas.tsx
index b8faae27..2bb7f139 100644
--- a/subprojects/frontend/src/graph/ZoomCanvas.tsx
+++ b/subprojects/frontend/src/graph/ZoomCanvas.tsx
@@ -148,7 +148,8 @@ export default function ZoomCanvas({
           const [x, y] = d3.pointer(event, canvas);
           return [x - width / 2, y - height / 2];
         })
-        .centroid([0, 0]);
+        .centroid([0, 0])
+        .scaleExtent([1 / 32, 8]);
       zoomBehavior.on(
         'zoom',
         (event: d3.D3ZoomEvent<HTMLDivElement, unknown>) => {
@@ -214,6 +215,6 @@ export default function ZoomCanvas({
 
 ZoomCanvas.defaultProps = {
   children: undefined,
-  fitPadding: 16,
+  fitPadding: 8,
   transitionTime: 250,
 };
-- 
cgit v1.2.3-54-g00ecf

