aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-06-27 16:25:20 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2021-06-27 16:25:20 -0700
commit271740034791dc7137325d5b5352217c3bc987f3 (patch)
treed29fd7391fce597d59be5bd699b6d4b61b33bdaf /modern/src/store
parent26916278758cd5e4abb16aa31e31099e066ea8d5 (diff)
downloadtrackermap-web-271740034791dc7137325d5b5352217c3bc987f3.tar.gz
trackermap-web-271740034791dc7137325d5b5352217c3bc987f3.tar.bz2
trackermap-web-271740034791dc7137325d5b5352217c3bc987f3.zip
Initial geofence draw implementation
Diffstat (limited to 'modern/src/store')
-rw-r--r--modern/src/store/geofences.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modern/src/store/geofences.js b/modern/src/store/geofences.js
index c5e58147..504b7d02 100644
--- a/modern/src/store/geofences.js
+++ b/modern/src/store/geofences.js
@@ -6,6 +6,10 @@ const { reducer, actions } = createSlice({
items: {},
},
reducers: {
+ refresh(state, action) {
+ state.items = {};
+ action.payload.forEach(item => state.items[item['id']] = item);
+ },
update(state, action) {
action.payload.forEach(item => state.items[item['id']] = item);
},