From 6ac80d3fb41eb813f8cde223ade00d5387a4984c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Mon, 11 Apr 2022 15:50:30 +0300 Subject: [PATCH] RED-3800: Fixed scroll to annotation --- .../components/annotations-list/annotations-list.component.ts | 2 +- .../components/file-workload/file-workload.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts index 50a23def5..edd66edb7 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts @@ -98,7 +98,7 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O } else if (first.y < second.y) { return 1; } else { - return first.x < second.y ? -1 : 1; + return first.x < second.x ? -1 : 1; } } diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 04aa855e9..de7a3d0ac 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -234,7 +234,7 @@ export class FileWorkloadComponent { return; } const elements: HTMLElement[] = this._annotationsElement.nativeElement.querySelectorAll( - `[annotation-id="${this._firstSelectedAnnotation?.id}"].active`, + `[annotation-id="${this._firstSelectedAnnotation?.id}"]`, ); FileWorkloadComponent._scrollToFirstElement(elements); }