Skip to content

Commit

Permalink
More ui fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
clovis committed Mar 19, 2024
1 parent 885ef2f commit c66fb3d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions www/app/src/components/Collocation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ export default {
...this.comparedMetadataValues,
start: start.toString(),
};
this.otherDone = false;
this.comparativeSearchStarted = true;
this.compareSearching = true
this.otherCollocates = [];
this.$http
.post(`${this.$dbUrl}/reports/collocation.py`, {
current_collocates: fullResults,
Expand All @@ -489,7 +491,8 @@ export default {
this.getOtherCollocates(response.data.collocates, start);
}
else {
this.otherDone = true
this.compareSearching = false;
this.otherCollocates = this.extractSurfaceFromCollocate(response.data.collocates.slice(0, 100));
this.comparativeCollocations(response.data.collocates)
}
}
Expand All @@ -509,10 +512,8 @@ export default {
this.comparativeSearchStarted = true;
this.comparedMetadataValues = this.dateRangeHandler(this.metadataInputStyle, this.dateRange, this.dateType, this.comparedMetadataValues)
this.otherBiblio = this.buildBiblioCriteria(this.$philoConfig, this.comparedMetadataValues, this.comparedMetadataValues)
this.compareSearching = true;
this.overRepresented = [];
this.underRepresented = [];
this.otherCollocates = [];
this.$http.post(`${this.$dbUrl}/scripts/comparative_collocations.py`, {
all_collocates: this.collocateCounts,
other_collocates: otherCollocates,
Expand All @@ -522,11 +523,9 @@ export default {
'Content-Type': 'application/x-www-form-urlencoded'
}
}).then((response) => {
this.otherCollocates = this.extractSurfaceFromCollocate(otherCollocates.slice(0, 100));
this.overRepresented = this.extractSurfaceFromCollocate(response.data.top);
this.underRepresented = this.extractSurfaceFromCollocate(response.data.bottom);
this.relativeFrequencies = { top: this.overRepresented, bottom: this.underRepresented };
this.compareSearching = false;
}).catch((error) => {
this.debug(this, error);
Expand Down

0 comments on commit c66fb3d

Please sign in to comment.