diff --git a/dist/ReactFlow.esm.js b/dist/ReactFlow.esm.js index a72f69706..76731ec54 100644 --- a/dist/ReactFlow.esm.js +++ b/dist/ReactFlow.esm.js @@ -10023,7 +10023,7 @@ var useZoomPanHelper = function useZoomPanHelper() { return; } - var bounds = getRectOfNodes(options.includeHiddenNodes ? options.nodes : options.nodes.filter(function (node) { + var bounds = getRectOfNodes(options.includeHiddenNodes ? nodes : nodes.filter(function (node) { return !node.isHidden; })); diff --git a/dist/ReactFlow.js b/dist/ReactFlow.js index e16d9d2a3..63ccbd440 100644 --- a/dist/ReactFlow.js +++ b/dist/ReactFlow.js @@ -10052,7 +10052,7 @@ var useZoomPanHelper = function useZoomPanHelper() { return; } - var bounds = getRectOfNodes(options.includeHiddenNodes ? options.nodes : options.nodes.filter(function (node) { + var bounds = getRectOfNodes(options.includeHiddenNodes ? nodes : nodes.filter(function (node) { return !node.isHidden; })); diff --git a/dist/nocss/ReactFlow-nocss.esm.js b/dist/nocss/ReactFlow-nocss.esm.js index a3c99340b..7279a7747 100644 --- a/dist/nocss/ReactFlow-nocss.esm.js +++ b/dist/nocss/ReactFlow-nocss.esm.js @@ -10023,7 +10023,7 @@ var useZoomPanHelper = function useZoomPanHelper() { return; } - var bounds = getRectOfNodes(options.includeHiddenNodes ? options.nodes : options.nodes.filter(function (node) { + var bounds = getRectOfNodes(options.includeHiddenNodes ? nodes : nodes.filter(function (node) { return !node.isHidden; })); diff --git a/dist/nocss/ReactFlow-nocss.js b/dist/nocss/ReactFlow-nocss.js index 10e938a19..b82011691 100644 --- a/dist/nocss/ReactFlow-nocss.js +++ b/dist/nocss/ReactFlow-nocss.js @@ -10052,7 +10052,7 @@ var useZoomPanHelper = function useZoomPanHelper() { return; } - var bounds = getRectOfNodes(options.includeHiddenNodes ? options.nodes : options.nodes.filter(function (node) { + var bounds = getRectOfNodes(options.includeHiddenNodes ? nodes : nodes.filter(function (node) { return !node.isHidden; })); diff --git a/src/hooks/useZoomPanHelper.ts b/src/hooks/useZoomPanHelper.ts index a228053a8..d9e4a46f8 100644 --- a/src/hooks/useZoomPanHelper.ts +++ b/src/hooks/useZoomPanHelper.ts @@ -64,7 +64,7 @@ const useZoomPanHelper = (): ZoomPanHelperFunctions => { return; } - const bounds = getRectOfNodes(options.includeHiddenNodes ? options.nodes : options.nodes.filter((node) => !node.isHidden)); + const bounds = getRectOfNodes(options.includeHiddenNodes ? nodes : nodes.filter((node) => !node.isHidden)); const [x, y, zoom] = getTransformForBounds( bounds, options.width,