Skip to content

Commit

Permalink
feat(annotator): added link to the search with a filter on the annota…
Browse files Browse the repository at this point in the history
…tion id.
  • Loading branch information
geoffroy-noel-ddh committed Dec 11, 2024
1 parent caf8aad commit 9ce9c56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/annotator.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<p class="panel-heading">
Image
<a v-if="image" :href="getImageUrl()" target="_blank"><i class="fas fa-external-link-alt"></i></a>
<a :href="`search.html${getQueryString()}&q=${object['title']}`" v-if="!!object"> & annotations</a>
<span class="side-links">
<label>
<input type="checkbox" v-model="selection.hideBoxes">
Expand Down
5 changes: 5 additions & 0 deletions app/assets/annotator.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,11 @@ createApp({

return ret
},
getAnnotationsCount() {
// unused although handy function for user feedback.
// But it's called/drawn too often by Vue since it's not reactive.
return (this?.anno?.getAnnotations() || []).length
},
getTextTargetFromSign(sign) {
// let word = sign.closest('.tei-w')
let word = sign.closest('[data-tei-id]')
Expand Down

0 comments on commit 9ce9c56

Please sign in to comment.