From 9abd96ccb1e0cc09d3782ac4a907a5eed2612d60 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Sat, 15 Jan 2022 00:07:25 +0000 Subject: [PATCH] Overhaul marker update handling - Renamed pendingSetUpdates to pendingMarkerUpdates - pendingMarkerUpdates is now a simple array of LiveAtlasMarkerUpdates - Added separate ADD_MARKER_UPDATES mutation for marker updates - Set updates via ADD_MARKER_SET_UPDATES are applied immediately and not stored in state - Removed all marker pop actions and mutations except POP_MARKER_UPDATES, which now returns all marker types - Added centralised markup update handler in markers.ts, replacing much of the logic in the individual marker type components. Allows additional handlers to be registered for specific marker sets and types --- src/components/map/vector/Areas.vue | 102 +++++------- src/components/map/vector/Circles.vue | 102 +++++------- src/components/map/vector/Lines.vue | 102 +++++------- src/components/map/vector/Points.vue | 102 +++++------- src/dynmap.d.ts | 31 ++-- src/providers/DynmapMapProvider.ts | 1 + src/store/action-types.ts | 3 - src/store/actions.ts | 73 +-------- src/store/mutation-types.ts | 4 +- src/store/mutations.ts | 227 +++++++++++--------------- src/store/state.ts | 6 +- src/util/dynmap.ts | 59 ++++--- src/util/markers.ts | 129 +++++++++------ 13 files changed, 392 insertions(+), 549 deletions(-) diff --git a/src/components/map/vector/Areas.vue b/src/components/map/vector/Areas.vue index f60ddf5..2f13687 100644 --- a/src/components/map/vector/Areas.vue +++ b/src/components/map/vector/Areas.vue @@ -15,15 +15,16 @@ -->