FIX [review] process review and make minor visual changes

This commit is contained in:
2023-05-31 09:47:48 +02:00
parent ff03299f80
commit ed556d9ee8
3 changed files with 15 additions and 16 deletions

View File

@@ -123,7 +123,7 @@
v-for="e in pickedEvaluations"
v-bind:key="e.key"
v-bind:evaluation="e"
v-bind:docId="this.docId">
v-bind:docAnchorId="this.docAnchorId">
</add-evaluation>
<!-- box to add new evaluation -->
@@ -390,7 +390,7 @@ export default {
i18n,
data() {
return {
docId: null,
docAnchorId: null,
isExpanded: false,
editor: ClassicEditor,
showAddObjective: false,
@@ -432,10 +432,10 @@ export default {
},
beforeMount() {
const urlParams = new URLSearchParams(window.location.search);
this.docId = urlParams.get('doc_id');
this.docAnchorId = urlParams.get('doc_id');
},
mounted() {
this.scrollToElement(this.docId);
this.scrollToElement(this.docAnchorId);
},
computed: {
...mapState([
@@ -591,8 +591,8 @@ export default {
}
})
},
scrollToElement(docId) {
const documentEl = document.getElementById(`document_${docId}`);
scrollToElement(docAnchorId) {
const documentEl = document.getElementById(`document_${docAnchorId}`);
if (documentEl) {
documentEl.scrollIntoView({behavior: 'smooth'});
}