Skip to content

Commit

Permalink
feat(fitView): add minZoom and maxZoom params closes #1301
Browse files Browse the repository at this point in the history
  • Loading branch information
moklick committed Jun 23, 2021
1 parent af5a2ab commit 310bee0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useZoomPanHelper.ts
Expand Up @@ -47,8 +47,8 @@ const useZoomPanHelper = (): ZoomPanHelperFunctions => {
bounds,
width,
height,
minZoom,
maxZoom,
options.minZoom ?? minZoom,
options.maxZoom ?? maxZoom,
options.padding ?? DEFAULT_PADDING
);
const transform = zoomIdentity.translate(x, y).scale(zoom);
Expand Down
2 changes: 2 additions & 0 deletions src/types/index.ts
Expand Up @@ -248,6 +248,8 @@ export interface WrapNodeProps<T = any> {
export type FitViewParams = {
padding?: number;
includeHiddenNodes?: boolean;
minZoom?: number;
maxZoom?: number;
};

export type FlowExportObject<T = any> = {
Expand Down

0 comments on commit 310bee0

Please sign in to comment.