Skip to content
Snippets Groups Projects

Resolve MIN-116 "Bugfix/ login slow on response"

Merged Miłosz Grocholewski requested to merge bugfix/MIN-116-login-slow-on-response into development
2 files
+ 6
6
Compare changes
  • Side-by-side
  • Inline
Files
2
/* eslint-disable no-magic-numbers */
import { OPTIONS, ZOOM_RESCALING_FACTOR } from '@/constants/map';
import { DEFAULT_EXTENT_PADDING, OPTIONS, ZOOM_RESCALING_FACTOR } from '@/constants/map';
import { mapDataInitialPositionSelector, mapDataSizeSelector } from '@/redux/map/map.selectors';
import { MapInstance, Point } from '@/types/map';
import { usePointToProjection } from '@/utils/map/usePointToProjection';
@@ -34,13 +34,13 @@ export const useOlMapView = ({ mapInstance }: UseOlMapViewInput): MapConfig['vie
heightPadding = mapSize.width / mapInstanceWidthToHeightRatio - mapSize.height;
}
const topLeftPoint: Point = {
x: mapSize.width + widthPadding / 2,
y: mapSize.height + heightPadding / 2,
x: mapSize.width + widthPadding / 2 + DEFAULT_EXTENT_PADDING,
y: mapSize.height + heightPadding / 2 + DEFAULT_EXTENT_PADDING,
};
const bottomRightPoint: Point = {
x: -widthPadding / 2,
y: -heightPadding / 2,
x: -widthPadding / 2 - DEFAULT_EXTENT_PADDING,
y: -heightPadding / 2 - DEFAULT_EXTENT_PADDING,
};
return boundingExtent([topLeftPoint, bottomRightPoint].map(pointToProjection));
Loading