Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
irmastnt committed Jan 30, 2025
1 parent 5641a3a commit 5d31955
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,14 @@ export class AnnotationTabComponent implements OnInit, OnDestroy {
private _scrollToRegion(iri: string) {
const elements = document.querySelectorAll(`#${CSS.escape(iri)}`);

Array.from(elements).forEach(element => {
if (!(element as HTMLElement).classList.contains('region')) {
(element as HTMLElement).scrollIntoView({
for (let i = 0; i < elements.length; i++) {
const element = elements[i] as HTMLElement;
if (!element.classList.contains('region')) {
element.scrollIntoView({
behavior: 'smooth',
});
return;
break;
}
});
}
}
}

0 comments on commit 5d31955

Please sign in to comment.