diff --git a/apps/builder/src/features/graph/components/Graph.tsx b/apps/builder/src/features/graph/components/Graph.tsx index ab4b9b52b..4ce383550 100644 --- a/apps/builder/src/features/graph/components/Graph.tsx +++ b/apps/builder/src/features/graph/components/Graph.tsx @@ -171,7 +171,12 @@ export const Graph = ({ }) => { const { x: mouseX, y } = mousePosition ?? getCenterOfGraph() const mouseY = y - headerHeight - let newScale = scale ?? graphPosition.scale + (delta ?? 0) + let newScale = graphPosition.scale + (delta ?? 0) + if (scale) { + const scaleDiff = scale - graphPosition.scale + newScale += Math.min(zoomButtonsScaleBlock, Math.abs(scaleDiff)) * Math.sign(scaleDiff) + } + if ( (newScale >= maxScale && graphPosition.scale === maxScale) || (newScale <= minScale && graphPosition.scale === minScale)