aboutsummaryrefslogtreecommitdiff
path: root/modern/src/map/SelectedDeviceMap.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/map/SelectedDeviceMap.js')
-rw-r--r--modern/src/map/SelectedDeviceMap.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/modern/src/map/SelectedDeviceMap.js b/modern/src/map/SelectedDeviceMap.js
index 63847176..c46ea40e 100644
--- a/modern/src/map/SelectedDeviceMap.js
+++ b/modern/src/map/SelectedDeviceMap.js
@@ -1,6 +1,7 @@
import { useEffect } from 'react';
import { useSelector } from 'react-redux';
+import dimensions from '../theme/dimensions';
import { map } from './Map';
const SelectedDeviceMap = () => {
@@ -16,7 +17,10 @@ const SelectedDeviceMap = () => {
useEffect(() => {
if (mapCenter) {
- map.easeTo({ center: mapCenter.position });
+ map.easeTo({
+ center: mapCenter.position,
+ offset: [0, -dimensions.popupMapOffset / 2],
+ });
}
}, [mapCenter]);