protvista-uniprot 4.6.0 → 4.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/protvista-uniprot.ts
CHANGED
|
@@ -585,13 +585,14 @@ class ProtvistaUniprot extends LitElement {
|
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
handleCategoryClick(e: MouseEvent) {
|
|
588
|
-
|
|
588
|
+
let target = e.target as Element;
|
|
589
|
+
|
|
590
|
+
if (target instanceof HTMLSpanElement) {
|
|
591
|
+
target = target.parentElement as Element;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
const toggle = target.getAttribute('data-category-toggle');
|
|
589
595
|
|
|
590
|
-
const toggle =
|
|
591
|
-
target.getAttribute('data-category-toggle') ||
|
|
592
|
-
(target instanceof HTMLSpanElement &&
|
|
593
|
-
target.parentElement?.getAttribute('data-category-toggle'));
|
|
594
|
-
|
|
595
596
|
if (toggle && !target.classList.contains('open')) {
|
|
596
597
|
target.classList.add('open');
|
|
597
598
|
this.openCategories = [...this.openCategories, toggle];
|