@gemx-dev/heatmap-react 3.5.47 → 3.5.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"ContentToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/ContentToolbar.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAmBlC,CAAC"}
1
+ {"version":3,"file":"ContentToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/ContentToolbar.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAkBlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useHeatmapScale.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useHeatmapScale.ts"],"names":[],"mappings":"AAMA,UAAU,kBAAkB;IAC1B,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,UAAU,sBAAsB;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,kBAAkB,KAAG,sBA4B3D,CAAC"}
1
+ {"version":3,"file":"useHeatmapScale.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useHeatmapScale.ts"],"names":[],"mappings":"AAMA,UAAU,kBAAkB;IAC1B,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,UAAU,sBAAsB;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,kBAAkB,KAAG,sBAiC3D,CAAC"}
@@ -1,9 +1,13 @@
1
1
  interface IUseScaleCalculationProps {
2
2
  containerWidth: number;
3
+ containerHeight: number;
3
4
  contentWidth: number;
5
+ contentHeight: number;
4
6
  }
5
7
  interface IUseScaleCalculationResult {
6
8
  scale: number;
9
+ isScaledToFit: boolean;
10
+ minZoomRatio: number;
7
11
  }
8
12
  export declare const useScaleCalculation: (props: IUseScaleCalculationProps) => IUseScaleCalculationResult;
9
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useScaleCalculation.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useScaleCalculation.ts"],"names":[],"mappings":"AAIA,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,0BAA0B;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,mBAAmB,GAC9B,OAAO,yBAAyB,KAC/B,0BAeF,CAAC"}
1
+ {"version":3,"file":"useScaleCalculation.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useScaleCalculation.ts"],"names":[],"mappings":"AAIA,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,0BAA0B;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,GAC9B,OAAO,yBAAyB,KAC/B,0BA2DF,CAAC"}
package/dist/esm/index.js CHANGED
@@ -161,8 +161,14 @@ const useHeatmapVizStore = create()((set, get) => {
161
161
  return {
162
162
  isRenderViz: false,
163
163
  setIsRenderViz: (isRenderViz) => set({ isRenderViz }),
164
+ zoomRatio: 100,
165
+ minZoomRatio: 10,
166
+ setMinZoomRatio: (minZoomRatio) => set({ minZoomRatio }),
167
+ setZoomRatio: (zoomRatio) => set({ zoomRatio }),
164
168
  scale: 1,
165
169
  setScale: (scale) => set({ scale }),
170
+ isScaledToFit: false,
171
+ setIsScaledToFit: (isScaledToFit) => set({ isScaledToFit }),
166
172
  };
167
173
  });
168
174
 
@@ -1964,16 +1970,52 @@ const useObserveIframeHeight = (props) => {
1964
1970
 
1965
1971
  const useScaleCalculation = (props) => {
1966
1972
  const scale = useHeatmapVizStore((state) => state.scale);
1973
+ const zoomRatio = useHeatmapVizStore((state) => state.zoomRatio);
1967
1974
  const setScale = useHeatmapVizStore((state) => state.setScale);
1968
- const { containerWidth, contentWidth } = props;
1969
- useEffect(() => {
1970
- if (containerWidth > 0 && contentWidth > 0) {
1975
+ const isScaledToFit = useHeatmapVizStore((state) => state.isScaledToFit);
1976
+ const setIsScaledToFit = useHeatmapVizStore((state) => state.setIsScaledToFit);
1977
+ const minZoomRatio = useHeatmapVizStore((state) => state.minZoomRatio);
1978
+ const setMinZoomRatio = useHeatmapVizStore((state) => state.setMinZoomRatio);
1979
+ const { containerWidth, containerHeight, contentWidth, contentHeight } = props;
1980
+ const calculateScaleResult = useCallback(() => {
1981
+ if (containerWidth > 0 && contentWidth > 0 && containerHeight > 0 && contentHeight > 0) {
1982
+ // 1. Calculate widthScale (base scale from width)
1971
1983
  const availableWidth = containerWidth - HEATMAP_CONFIG['padding'] * 2;
1972
- const calculatedScale = Math.min(availableWidth / contentWidth, 1);
1973
- setScale(calculatedScale);
1974
- }
1975
- }, [containerWidth, contentWidth]);
1976
- return { scale };
1984
+ const widthScale = Math.min(availableWidth / contentWidth, 1);
1985
+ // 2. Calculate available height
1986
+ const toolbarHeight = HEATMAP_CONFIG['heightToolbar'] ;
1987
+ const paddingTotal = HEATMAP_CONFIG['padding'] * 2;
1988
+ const availableHeight = containerHeight - toolbarHeight - paddingTotal; // 10px buffer to avoid scroll bar
1989
+ // 3. Calculate minZoomRatio (zoom ratio minimum to fit iframe in container)
1990
+ const roundedMinZoomRatio = (availableHeight / (contentHeight * widthScale)) * 100;
1991
+ // Limit minZoomRatio to a reasonable range (10-100)
1992
+ const finalMinZoomRatio = Math.max(10, Math.min(roundedMinZoomRatio, 100));
1993
+ // 4. Apply zoom ratio (cannot be less than minZoomRatio)
1994
+ const clampedZoomRatio = Math.max(zoomRatio, finalMinZoomRatio);
1995
+ const zoomMultiplier = clampedZoomRatio / 100;
1996
+ // 5. Calculate finalScale
1997
+ const finalScale = widthScale * zoomMultiplier;
1998
+ // 6. Check if it is currently fitted
1999
+ const isCurrentlyFitted = zoomRatio <= finalMinZoomRatio;
2000
+ // 7. Update store
2001
+ setScale(finalScale);
2002
+ setIsScaledToFit(isCurrentlyFitted);
2003
+ setMinZoomRatio(finalMinZoomRatio);
2004
+ }
2005
+ }, [
2006
+ containerWidth,
2007
+ containerHeight,
2008
+ contentWidth,
2009
+ contentHeight,
2010
+ zoomRatio,
2011
+ setScale,
2012
+ setIsScaledToFit,
2013
+ setMinZoomRatio,
2014
+ ]);
2015
+ useEffect(() => {
2016
+ calculateScaleResult();
2017
+ }, [calculateScaleResult]);
2018
+ return { scale, isScaledToFit, minZoomRatio };
1977
2019
  };
1978
2020
 
1979
2021
  const useScrollSync = ({ iframeRef }) => {
@@ -2006,7 +2048,12 @@ const useHeatmapScale = (props) => {
2006
2048
  // 3. Observe iframe height (now reacts to width changes)
2007
2049
  useObserveIframeHeight({ iframeRef, setIframeHeight });
2008
2050
  // 4. Calculate scale
2009
- const { scale } = useScaleCalculation({ containerWidth, contentWidth });
2051
+ const { scale } = useScaleCalculation({
2052
+ containerWidth,
2053
+ containerHeight,
2054
+ contentWidth,
2055
+ contentHeight: iframeHeight,
2056
+ });
2010
2057
  // 5. Setup scroll sync
2011
2058
  const { handleScroll } = useScrollSync({ iframeRef });
2012
2059
  const scaledHeight = iframeHeight * scale;
@@ -2279,7 +2326,6 @@ const ContentMetricBar = () => {
2279
2326
  const ContentToolbar = () => {
2280
2327
  const controls = useHeatmapControlStore((state) => state.controls);
2281
2328
  return (jsx("div", { id: "gx-hm-content-toolbar", style: {
2282
- zIndex: 2,
2283
2329
  position: 'absolute',
2284
2330
  bottom: 0,
2285
2331
  left: '8px',
@@ -2846,7 +2892,7 @@ const WrapperVisual = ({ children, visualRef, wrapperRef, scaledHeight, iframeHe
2846
2892
  ? `${scaledHeight + HEATMAP_CONFIG['heightToolbar'] + HEATMAP_CONFIG['padding'] * 2}px`
2847
2893
  : 'auto';
2848
2894
  return (jsx("div", { ref: visualRef, className: "gx-hm-visual", onScroll: onScroll, style: {
2849
- overflow: 'hidden auto',
2895
+ overflow: 'hidden scroll',
2850
2896
  display: 'flex',
2851
2897
  position: 'relative',
2852
2898
  justifyContent: 'center',
@@ -161,8 +161,14 @@ const useHeatmapVizStore = create()((set, get) => {
161
161
  return {
162
162
  isRenderViz: false,
163
163
  setIsRenderViz: (isRenderViz) => set({ isRenderViz }),
164
+ zoomRatio: 100,
165
+ minZoomRatio: 10,
166
+ setMinZoomRatio: (minZoomRatio) => set({ minZoomRatio }),
167
+ setZoomRatio: (zoomRatio) => set({ zoomRatio }),
164
168
  scale: 1,
165
169
  setScale: (scale) => set({ scale }),
170
+ isScaledToFit: false,
171
+ setIsScaledToFit: (isScaledToFit) => set({ isScaledToFit }),
166
172
  };
167
173
  });
168
174
 
@@ -1964,16 +1970,52 @@ const useObserveIframeHeight = (props) => {
1964
1970
 
1965
1971
  const useScaleCalculation = (props) => {
1966
1972
  const scale = useHeatmapVizStore((state) => state.scale);
1973
+ const zoomRatio = useHeatmapVizStore((state) => state.zoomRatio);
1967
1974
  const setScale = useHeatmapVizStore((state) => state.setScale);
1968
- const { containerWidth, contentWidth } = props;
1969
- useEffect(() => {
1970
- if (containerWidth > 0 && contentWidth > 0) {
1975
+ const isScaledToFit = useHeatmapVizStore((state) => state.isScaledToFit);
1976
+ const setIsScaledToFit = useHeatmapVizStore((state) => state.setIsScaledToFit);
1977
+ const minZoomRatio = useHeatmapVizStore((state) => state.minZoomRatio);
1978
+ const setMinZoomRatio = useHeatmapVizStore((state) => state.setMinZoomRatio);
1979
+ const { containerWidth, containerHeight, contentWidth, contentHeight } = props;
1980
+ const calculateScaleResult = useCallback(() => {
1981
+ if (containerWidth > 0 && contentWidth > 0 && containerHeight > 0 && contentHeight > 0) {
1982
+ // 1. Calculate widthScale (base scale from width)
1971
1983
  const availableWidth = containerWidth - HEATMAP_CONFIG['padding'] * 2;
1972
- const calculatedScale = Math.min(availableWidth / contentWidth, 1);
1973
- setScale(calculatedScale);
1974
- }
1975
- }, [containerWidth, contentWidth]);
1976
- return { scale };
1984
+ const widthScale = Math.min(availableWidth / contentWidth, 1);
1985
+ // 2. Calculate available height
1986
+ const toolbarHeight = HEATMAP_CONFIG['heightToolbar'] ;
1987
+ const paddingTotal = HEATMAP_CONFIG['padding'] * 2;
1988
+ const availableHeight = containerHeight - toolbarHeight - paddingTotal; // 10px buffer to avoid scroll bar
1989
+ // 3. Calculate minZoomRatio (zoom ratio minimum to fit iframe in container)
1990
+ const roundedMinZoomRatio = (availableHeight / (contentHeight * widthScale)) * 100;
1991
+ // Limit minZoomRatio to a reasonable range (10-100)
1992
+ const finalMinZoomRatio = Math.max(10, Math.min(roundedMinZoomRatio, 100));
1993
+ // 4. Apply zoom ratio (cannot be less than minZoomRatio)
1994
+ const clampedZoomRatio = Math.max(zoomRatio, finalMinZoomRatio);
1995
+ const zoomMultiplier = clampedZoomRatio / 100;
1996
+ // 5. Calculate finalScale
1997
+ const finalScale = widthScale * zoomMultiplier;
1998
+ // 6. Check if it is currently fitted
1999
+ const isCurrentlyFitted = zoomRatio <= finalMinZoomRatio;
2000
+ // 7. Update store
2001
+ setScale(finalScale);
2002
+ setIsScaledToFit(isCurrentlyFitted);
2003
+ setMinZoomRatio(finalMinZoomRatio);
2004
+ }
2005
+ }, [
2006
+ containerWidth,
2007
+ containerHeight,
2008
+ contentWidth,
2009
+ contentHeight,
2010
+ zoomRatio,
2011
+ setScale,
2012
+ setIsScaledToFit,
2013
+ setMinZoomRatio,
2014
+ ]);
2015
+ useEffect(() => {
2016
+ calculateScaleResult();
2017
+ }, [calculateScaleResult]);
2018
+ return { scale, isScaledToFit, minZoomRatio };
1977
2019
  };
1978
2020
 
1979
2021
  const useScrollSync = ({ iframeRef }) => {
@@ -2006,7 +2048,12 @@ const useHeatmapScale = (props) => {
2006
2048
  // 3. Observe iframe height (now reacts to width changes)
2007
2049
  useObserveIframeHeight({ iframeRef, setIframeHeight });
2008
2050
  // 4. Calculate scale
2009
- const { scale } = useScaleCalculation({ containerWidth, contentWidth });
2051
+ const { scale } = useScaleCalculation({
2052
+ containerWidth,
2053
+ containerHeight,
2054
+ contentWidth,
2055
+ contentHeight: iframeHeight,
2056
+ });
2010
2057
  // 5. Setup scroll sync
2011
2058
  const { handleScroll } = useScrollSync({ iframeRef });
2012
2059
  const scaledHeight = iframeHeight * scale;
@@ -2279,7 +2326,6 @@ const ContentMetricBar = () => {
2279
2326
  const ContentToolbar = () => {
2280
2327
  const controls = useHeatmapControlStore((state) => state.controls);
2281
2328
  return (jsx("div", { id: "gx-hm-content-toolbar", style: {
2282
- zIndex: 2,
2283
2329
  position: 'absolute',
2284
2330
  bottom: 0,
2285
2331
  left: '8px',
@@ -2846,7 +2892,7 @@ const WrapperVisual = ({ children, visualRef, wrapperRef, scaledHeight, iframeHe
2846
2892
  ? `${scaledHeight + HEATMAP_CONFIG['heightToolbar'] + HEATMAP_CONFIG['padding'] * 2}px`
2847
2893
  : 'auto';
2848
2894
  return (jsx("div", { ref: visualRef, className: "gx-hm-visual", onScroll: onScroll, style: {
2849
- overflow: 'hidden auto',
2895
+ overflow: 'hidden scroll',
2850
2896
  display: 'flex',
2851
2897
  position: 'relative',
2852
2898
  justifyContent: 'center',
@@ -1,8 +1,14 @@
1
1
  export interface IHeatmapVizStore {
2
2
  isRenderViz: boolean;
3
3
  setIsRenderViz: (isRenderViz: boolean) => void;
4
+ zoomRatio: number;
5
+ minZoomRatio: number;
6
+ setMinZoomRatio: (minZoomRatio: number) => void;
7
+ setZoomRatio: (zoomRatio: number) => void;
4
8
  scale: number;
5
9
  setScale: (scale: number) => void;
10
+ isScaledToFit: boolean;
11
+ setIsScaledToFit: (isScaledToFit: boolean) => void;
6
12
  }
7
13
  export declare const useHeatmapVizStore: import("zustand").UseBoundStore<import("zustand").StoreApi<IHeatmapVizStore>>;
8
14
  //# sourceMappingURL=viz.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viz.d.ts","sourceRoot":"","sources":["../../src/stores/viz.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC;AAED,eAAO,MAAM,kBAAkB,+EAO7B,CAAC"}
1
+ {"version":3,"file":"viz.d.ts","sourceRoot":"","sources":["../../src/stores/viz.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,CAAC;CACpD;AAED,eAAO,MAAM,kBAAkB,+EAa7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ContentToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/ContentToolbar.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAmBlC,CAAC"}
1
+ {"version":3,"file":"ContentToolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Layout/ContentToolbar.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAkBlC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useHeatmapScale.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useHeatmapScale.ts"],"names":[],"mappings":"AAMA,UAAU,kBAAkB;IAC1B,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,UAAU,sBAAsB;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,kBAAkB,KAAG,sBA4B3D,CAAC"}
1
+ {"version":3,"file":"useHeatmapScale.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useHeatmapScale.ts"],"names":[],"mappings":"AAMA,UAAU,kBAAkB;IAC1B,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;IAErB,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AAED,UAAU,sBAAsB;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,kBAAkB,KAAG,sBAiC3D,CAAC"}
@@ -1,9 +1,13 @@
1
1
  interface IUseScaleCalculationProps {
2
2
  containerWidth: number;
3
+ containerHeight: number;
3
4
  contentWidth: number;
5
+ contentHeight: number;
4
6
  }
5
7
  interface IUseScaleCalculationResult {
6
8
  scale: number;
9
+ isScaledToFit: boolean;
10
+ minZoomRatio: number;
7
11
  }
8
12
  export declare const useScaleCalculation: (props: IUseScaleCalculationProps) => IUseScaleCalculationResult;
9
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"useScaleCalculation.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useScaleCalculation.ts"],"names":[],"mappings":"AAIA,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,0BAA0B;IAClC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,mBAAmB,GAC9B,OAAO,yBAAyB,KAC/B,0BAeF,CAAC"}
1
+ {"version":3,"file":"useScaleCalculation.d.ts","sourceRoot":"","sources":["../../../src/hooks/viz-scale/useScaleCalculation.ts"],"names":[],"mappings":"AAIA,UAAU,yBAAyB;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,0BAA0B;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,GAC9B,OAAO,yBAAyB,KAC/B,0BA2DF,CAAC"}