feat(fitView): add minZoom and maxZoom params closes #1301
This commit is contained in:
@@ -47,8 +47,8 @@ const useZoomPanHelper = (): ZoomPanHelperFunctions => {
|
|||||||
bounds,
|
bounds,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
minZoom,
|
options.minZoom ?? minZoom,
|
||||||
maxZoom,
|
options.maxZoom ?? maxZoom,
|
||||||
options.padding ?? DEFAULT_PADDING
|
options.padding ?? DEFAULT_PADDING
|
||||||
);
|
);
|
||||||
const transform = zoomIdentity.translate(x, y).scale(zoom);
|
const transform = zoomIdentity.translate(x, y).scale(zoom);
|
||||||
|
|||||||
@@ -248,6 +248,8 @@ export interface WrapNodeProps<T = any> {
|
|||||||
export type FitViewParams = {
|
export type FitViewParams = {
|
||||||
padding?: number;
|
padding?: number;
|
||||||
includeHiddenNodes?: boolean;
|
includeHiddenNodes?: boolean;
|
||||||
|
minZoom?: number;
|
||||||
|
maxZoom?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type FlowExportObject<T = any> = {
|
export type FlowExportObject<T = any> = {
|
||||||
|
|||||||
Reference in New Issue
Block a user