feat(fitView): add minZoom and maxZoom params closes #1301
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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> = {
|
||||
|
||||
Reference in New Issue
Block a user