Commit ca23766a authored by schneider210's avatar schneider210
Browse files

bugfix: compute sequenceindex in root instance and pass it down as prop to infobar and metadata

parent 14c198fe
Pipeline #132356 passed with stages
in 3 minutes and 37 seconds
......@@ -108,8 +108,7 @@ export default {
}
this.$root.$emit('update-item', node.label);
this.$root.$emit('update-item-index', this.getItemIndex(node.label));
this.$root.$emit('update-nav-sequence', this.getSequenceIndex(label));
this.$root.$emit('update-sequence-index', label);
this.$root.$emit('update-sequence-index', this.getSequenceIndex(label));
},
},
);
......@@ -148,10 +147,10 @@ export default {
}
});
},
getSequenceIndex(nodelabel) {
getSequenceIndex(label) {
let index = 0;
this.manifests.forEach((manifest, idx) => {
if (manifest.label === nodelabel) {
if (manifest.label === label) {
index = idx;
}
});
......
......@@ -42,12 +42,8 @@ export default {
this.fasChevronRight = fasChevronRight;
},
mounted() {
this.$root.$on('update-sequence-index', (nodelabel) => {
this.manifests.forEach((manifest, index) => {
if (manifest.label === nodelabel) {
this.sequenceindex = index;
}
});
this.$root.$on('update-sequence-index', (index) => {
this.sequenceindex = index;
});
},
};
......
......@@ -64,12 +64,8 @@ export default {
},
},
mounted() {
this.$root.$on('update-sequence-index', (nodelabel) => {
this.manifests.forEach((manifest, index) => {
if (manifest.label === nodelabel) {
this.sequenceindex = index;
}
});
this.$root.$on('update-sequence-index', (index) => {
this.sequenceindex = index;
});
},
};
......
......@@ -85,7 +85,7 @@ export default {
this.itemindex = index;
});
this.$root.$on('update-nav-sequence', (nodelabel) => {
this.$root.$on('update-sequence-index', (nodelabel) => {
this.manifests.forEach((manifest, index) => {
if (manifest.label === nodelabel) {
this.sequenceindex = index;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment