Skip to content

Commit

Permalink
differentiate between add and remove terms for buttons. closes #99
Browse files Browse the repository at this point in the history
  • Loading branch information
oganm committed Jun 18, 2024
1 parent 54d4372 commit 8860991
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/DatasetPreview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ export default {
getTitle(term) {
let n = this.getNumberOfExpressionExperiments(term);
if (term.termUri !== null) { // if the term is not free text
if (n > 0) {
if (n > 0 && this.isSelectable(term)) {
return `${term.className.charAt(0).toUpperCase() + term.className.slice(1)}: ${term.termUri} via ${term.objectClass}; click to add terms to filter (associated with ${n} datasets)`;
} else if (n > 0 && this.isUnselectable(term)){
return `${term.className.charAt(0).toUpperCase() + term.className.slice(1)}: ${term.termUri} via ${term.objectClass}; click to remove terms from filter (associated with ${n} datasets)`;
} else {
return `${term.className.charAt(0).toUpperCase() + term.className.slice(1)}: ${term.termUri} via ${term.objectClass}`;
}
Expand Down

0 comments on commit 8860991

Please sign in to comment.