Skip to content
Snippets Groups Projects

feat: add graphics full tab business logic (MIN-165)

Merged Adrian Orłów requested to merge MIN-165-graphics-full-tab-business-logic into development
7 files
+ 130
13
Compare changes
  • Side-by-side
  • Inline
Files
7
import { MapModel } from '@/types/models';
import { numberToInt } from '@/utils/number/numberToInt';
import { numberToSafeInt } from '@/utils/number/numberToInt';
import { useCallback, useContext, useEffect } from 'react';
import { ExportContext } from '../../ExportCompound.context';
import { DEFAULT_IMAGE_HEIGHT, DEFAULT_IMAGE_WIDTH } from '../ImageSize.constants';
@@ -30,8 +30,8 @@ export const useImageSize = (): UseImageSizeResults => {
const widthMinMax = Math.min(maxWidth, newWidth);
const heightMinMax = Math.min(maxHeight, newHeight);
const widthInt = numberToInt(widthMinMax);
const heightInt = numberToInt(heightMinMax);
const widthInt = numberToSafeInt(widthMinMax);
const heightInt = numberToSafeInt(heightMinMax);
return {
width: widthInt,
Loading