Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

prevent update vector style when event animate

Ed Plato9b66ed16ac7f
diff --git a/web/js/map/ui.js b/web/js/map/ui.js
index 3c0cad925..9b6afb0a0 100644
--- a/web/js/map/ui.js
+++ b/web/js/map/ui.js
@@ -760,7 +760,8 @@ export default function mapui(models, config, store, ui) {
*/
const updateDate = self.updateDate = function() {
const state = store.getState();
- const { embed, compare } = state;
+ const { embed, events, compare } = state;
+ const { isAnimatingToEvent } = events;
let activeLayers = getAllActiveLayers(state);
let layerGroups;
let layerGroup;
@@ -805,7 +806,7 @@ export default function mapui(models, config, store, ui) {
.getLayers()
.setAt(index, createLayer(def, { previousLayer: layerValue ? layerValue.wv : null }));
}
- if (config.vectorStyles && def.vectorStyle && def.vectorStyle.id) {
+ if (!isAnimatingToEvent && config.vectorStyles && def.vectorStyle && def.vectorStyle.id) {
const { vectorStyles } = config;
let vectorStyleId;