RED-3800: Fixed scroll to annotation

This commit is contained in:
Adina Țeudan 2022-04-11 15:50:30 +03:00
parent c86af4e491
commit 6ac80d3fb4
2 changed files with 2 additions and 2 deletions

View File

@ -98,7 +98,7 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O
} else if (first.y < second.y) { } else if (first.y < second.y) {
return 1; return 1;
} else { } else {
return first.x < second.y ? -1 : 1; return first.x < second.x ? -1 : 1;
} }
} }

View File

@ -234,7 +234,7 @@ export class FileWorkloadComponent {
return; return;
} }
const elements: HTMLElement[] = this._annotationsElement.nativeElement.querySelectorAll( const elements: HTMLElement[] = this._annotationsElement.nativeElement.querySelectorAll(
`[annotation-id="${this._firstSelectedAnnotation?.id}"].active`, `[annotation-id="${this._firstSelectedAnnotation?.id}"]`,
); );
FileWorkloadComponent._scrollToFirstElement(elements); FileWorkloadComponent._scrollToFirstElement(elements);
} }