Skip to content

Commit

Permalink
story/VOGRE-19 (#23)
Browse files Browse the repository at this point in the history
* [VOGRE-19] Fix appellation list

* [VOGRE-19] Fix select for relation list

* [VOGRE-19] Update appellation list
  • Loading branch information
rajvi-patel-22 authored Dec 12, 2024
1 parent 9442b51 commit 3c167a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions annotations/static/annotations/js/annotators/appellationlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,15 +217,7 @@ AppellationList = {
// Replace an array prop wholesale doesn't seem to trigger a
// DOM update in the v-for binding, but a push() does; so we'll
// just push the appellations that aren't already in the array.
var current_ids = this.current_appellations.map(function (elem) {
return elem.id;
});
var self = this;
this.appellations.forEach(function (elem) {
if (current_ids.indexOf(elem.id) < 0) {
self.current_appellations.push(elem);
}
});
this.current_appellations = this.appellations;
},
selected_template: function () {
store.commit("setTemplate", this.selected_template);
Expand Down
4 changes: 2 additions & 2 deletions annotations/static/annotations/js/annotators/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -1545,8 +1545,8 @@ Appellator = new Vue({
this.selected_relation = relation;
this.selected = null;
this.relations.forEach(function (r) {
r.selected = (r.id == relation.id);
});
this.$set(r, 'selected', (r.id == relation.id));
}, this);
var appellation_ids = relation.appellations.map(function (appellation) {
return appellation.id;
});
Expand Down

0 comments on commit 3c167a2

Please sign in to comment.