Skip to content

Commit

Permalink
Changes for illustration wc
Browse files Browse the repository at this point in the history
  • Loading branch information
edlu77 committed Nov 17, 2023
1 parent f922bd0 commit a9c96ab
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion apps/medical-illustration/webcomponent-example.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script>
window.addEventListener('DOMContentLoaded', () => {
const illustrationsUrl = '../assets/TEMP/2d-ftu-illustrations.jsonld';
const illustrationsUrl =
'https://hubmapconsortium.github.io/hra-ui/apps/medical-illustration/assets/TEMP/2d-ftu-illustrations.jsonld';
let focusId = '';

function updateHighlight(node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script>
window.addEventListener('DOMContentLoaded', () => {
const illustrationsUrl = '../assets/TEMP/2d-ftu-illustrations.jsonld';
const illustrationsUrl =
'https://hubmapconsortium.github.io/hra-ui/apps/medical-illustration/assets/TEMP/2d-ftu-illustrations.jsonld';
let focusId = '';

function updateHighlight(node) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
<title>Medical Illustration Web Component</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<script src="hra-illustration.js"></script>
<script>
window.addEventListener('DOMContentLoaded', () => {
const illustrationsUrl = '../assets/TEMP/2d-ftu-illustrations.jsonld';
const illustrationsUrl =
'https://hubmapconsortium.github.io/hra-ui/apps/medical-illustration/assets/TEMP/2d-ftu-illustrations.jsonld';
let focusId = '';

function updateHighlight(node) {
if (node.detail) {
focusId = node.detail.id;
focusId = node.detail.ontologyId;
illustration.highlightId = focusId;
illustration2.highlightId = focusId;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ export class InteractiveSvgComponent<T extends NodeMapEntry> implements OnChange
}

let id = entry.id;
const element = crosswalkEl.querySelector(`#${id}`);
const encodedId = this.encodeId(entry.id);
const element = crosswalkEl.querySelector(`#${id}, #${encodedId}`);
if (!element) {
return;
} else if (element.nodeName !== 'g') {
Expand Down

0 comments on commit a9c96ab

Please sign in to comment.