Fix labels handling in events map layer

This commit is contained in:
D. Berge
2025-08-06 11:14:20 +02:00
parent 81e06930f0
commit c67a60a7e6
2 changed files with 8 additions and 15 deletions

View File

@@ -757,7 +757,7 @@ export default {
return title;
},
...mapGetters(['user', 'loading', 'serverEvent', 'lineName', 'serverEvent']),
...mapGetters(['user', 'loading', 'serverEvent', 'lineName', 'serverEvent', 'labels']),
...mapState({projectSchema: state => state.project.projectSchema})
},
@@ -773,6 +773,13 @@ export default {
deep: true
},
labels () {
// Refresh the events layer on labels change
if (this.layerSelection.includes("log")) {
this.render();
}
},
sequenceDataElements () {
//console.log("seq data changed");
this.sequenceDataTStamp = Date.now();
@@ -1242,14 +1249,6 @@ export default {
async mounted () {
while (!Object.keys(this.$store.state.label.labels??{}).length) {
console.log("Waiting for labels");
await this.$root.sleep(1000);
console.log("LABELS", this.$store.state.label.labels);
}
if (!this.checkWebGLSupport()) {
for (const countdown = 5; countdown > 0; countdown--) {
if (countdown) {

View File

@@ -79,12 +79,6 @@ export default {
},
computed: {
labels () {
return this.$store.state.label.labels;
}
},
methods: {
normalisedColourScale(v, scale = this.COLOUR_SCALE_1, min = 0, max = 1) {