diff options
author | Anton Tananaev <anton@traccar.org> | 2022-10-28 17:08:59 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-10-28 17:08:59 -0700 |
commit | 6a4eba7b63c84c20188b8a6b16f6107698bfde91 (patch) | |
tree | e486dbb32afadee5c2e2c7151d963871820eeb4f /modern/src/map | |
parent | 17b990eabe36138a4a879deef8d03b16ee27e1ba (diff) | |
download | trackermap-web-6a4eba7b63c84c20188b8a6b16f6107698bfde91.tar.gz trackermap-web-6a4eba7b63c84c20188b8a6b16f6107698bfde91.tar.bz2 trackermap-web-6a4eba7b63c84c20188b8a6b16f6107698bfde91.zip |
Move positions to session
Diffstat (limited to 'modern/src/map')
-rw-r--r-- | modern/src/map/main/MapDefaultCamera.js | 2 | ||||
-rw-r--r-- | modern/src/map/main/MapLiveRoutes.js | 2 | ||||
-rw-r--r-- | modern/src/map/main/MapSelectedDevice.js | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/map/main/MapDefaultCamera.js b/modern/src/map/main/MapDefaultCamera.js index f6b6ed9c..90b3061b 100644 --- a/modern/src/map/main/MapDefaultCamera.js +++ b/modern/src/map/main/MapDefaultCamera.js @@ -6,7 +6,7 @@ import { map } from '../core/MapView'; const MapDefaultCamera = () => { const selectedDeviceId = useSelector((state) => state.devices.selectedId); - const positions = useSelector((state) => state.positions.items); + const positions = useSelector((state) => state.session.positions); const defaultLatitude = usePreference('latitude'); const defaultLongitude = usePreference('longitude'); diff --git a/modern/src/map/main/MapLiveRoutes.js b/modern/src/map/main/MapLiveRoutes.js index d0f67a73..55a04606 100644 --- a/modern/src/map/main/MapLiveRoutes.js +++ b/modern/src/map/main/MapLiveRoutes.js @@ -15,7 +15,7 @@ const MapLiveRoutes = () => { const selectedDeviceId = useSelector((state) => state.devices.selectedId); const currentDeviceId = usePrevious(selectedDeviceId); - const position = useSelector((state) => state.positions.items[selectedDeviceId]); + const position = useSelector((state) => state.session.positions[selectedDeviceId]); const [route, setRoute] = useState([]); diff --git a/modern/src/map/main/MapSelectedDevice.js b/modern/src/map/main/MapSelectedDevice.js index 3f444409..caf40cf8 100644 --- a/modern/src/map/main/MapSelectedDevice.js +++ b/modern/src/map/main/MapSelectedDevice.js @@ -13,7 +13,7 @@ const MapSelectedDevice = () => { const selectZoom = useAttributePreference('web.selectZoom', 10); const mapFollow = useAttributePreference('mapFollow', false); - const position = useSelector((state) => state.positions.items[selectedDeviceId]); + const position = useSelector((state) => state.session.positions[selectedDeviceId]); useEffect(() => { if ((selectedDeviceId !== previousDeviceId || mapFollow) && position) { |