From edf71cc216035c5f39b1e3de3897c59b36689ced Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Wed, 21 Oct 2020 17:30:41 +0300 Subject: [PATCH] fixed scroll top --- .../file-preview-screen.component.html | 8 +++++--- .../file-preview-screen/file-preview-screen.component.ts | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html index 5359e029d..95bae11fc 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html @@ -64,8 +64,10 @@
- arrow_drop_down - arrow_right + arrow_drop_down + + arrow_right +
-
+
{{page}}
diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts index 7093bc6ac..3566c48a7 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts @@ -205,7 +205,7 @@ export class FilePreviewScreenComponent implements OnInit { if (this.selectedAnnotation?.getPageNumber() === this.activeViewerPage) { return; } - const elements: any[] = this._annotationsElement.nativeElement.querySelectorAll(`div[annotation-page="${this.activeViewerPage}"]`); + const elements: any[] = this._annotationsElement.nativeElement.querySelectorAll(`div[anotation-page-header="${this.activeViewerPage}"]`); this._scrollToFirstElement(elements); } @@ -214,8 +214,8 @@ export class FilePreviewScreenComponent implements OnInit { scrollIntoView(elements[0], { behavior: 'smooth', scrollMode: 'if-needed', - block: 'center', - inline: 'center' + block: 'start', + inline: 'start' }); } }