Skip to content

Commit

Permalink
fix: add missing click behavior
Browse files Browse the repository at this point in the history
close long description when clicking on entity in the text
  • Loading branch information
babslgam committed Dec 11, 2024
1 parent d3b4963 commit f01c261
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions wpn-utils/wpn-detail-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class WPNDetailView extends HTMLElement {
detailElement.classList.add('d-none');
})
}
} else {
this.classList.add("d-none");
}
}

Expand Down
3 changes: 2 additions & 1 deletion wpn-utils/wpn-entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class WPNEntity extends HTMLElement {
return attributeValue === 'false' ? false : true;
}

clickHandler = (e: MouseEvent) =>{
clickHandler = (e: MouseEvent) =>{
window.location.hash = "";
const targetId = this.hasAttribute("data-prev") ? this.getAttribute("data-prev") : this.getAttribute("id");
const annotationClassName = Array.from(this.classList).find(className => className.startsWith("annot_"));
if (annotationClassName) {
Expand Down

0 comments on commit f01c261

Please sign in to comment.