feat(fitView): add minZoom and maxZoom params closes #1301

This commit is contained in:
moklick
2021-06-23 14:28:48 +02:00
parent af5a2ab791
commit 310bee0dc8
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -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);
+2
View File
@@ -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> = {