Skip to content

Commit

Permalink
Changed default value for nodes to nodes from store
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Jaśpiński committed Sep 14, 2021
1 parent b959723 commit e21e1bc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dist/ReactFlow.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ReactFlow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/nocss/ReactFlow-nocss.esm.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/nocss/ReactFlow-nocss.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/hooks/useZoomPanHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const useZoomPanHelper = (): ZoomPanHelperFunctions => {

d3Zoom.transform(d3Selection, transform);
},
fitViewToDimensions: (options: FitViewToDimensionsParams = { height: 0, width: 0, nodes: [], padding: DEFAULT_PADDING, includeHiddenNodes: false }) => {
fitViewToDimensions: (options: FitViewToDimensionsParams = { height: 0, width: 0, nodes: store.getState().nodes, padding: DEFAULT_PADDING, includeHiddenNodes: false }) => {
const { minZoom, maxZoom } = store.getState();

if (!options.nodes.length) {
Expand Down

0 comments on commit e21e1bc

Please sign in to comment.