Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish committed Nov 7, 2024
1 parent 3e17461 commit 080f589
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/modelviewer.dev/examples/annotations/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,14 @@ <h4 id="intro"><span class="font-medium">Animated Hotspots. </span></h4>

window.addEventListener("resize", onResize);

function setVisible(visible) {
modelViewer1.addEventListener('ar-status', (event) => {
lines.forEach((element) => {
if (visible) {
if (event.detail.status !== 'session-started') {
element.classList.remove('hide');
} else {
element.classList.add('hide');
}
});
}

modelViewer1.addEventListener('ar-status', (event) => {
setVisible(event.detail.status !== 'session-started');
onResize();
});

Expand Down

0 comments on commit 080f589

Please sign in to comment.