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 d7b24a809..94f66155c 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 @@ -229,7 +229,7 @@ > -
+
Number(key)); + this.computeQuickNavButtonsState(); this._changeDetectorRef.markForCheck(); } @@ -606,6 +601,13 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy { } } + public computeQuickNavButtonsState() { + const element: HTMLElement = this._quickNavigationElement.nativeElement.querySelector(`#pages`); + const { scrollTop, scrollHeight, clientHeight } = element; + this.quickScrollFirstEnabled = scrollTop !== 0; + this.quickScrollLastEnabled = scrollHeight !== scrollTop + clientHeight; + } + private _cleanupAndRedrawManualAnnotations() { this._fileDownloadService.loadActiveFileManualAnnotations().subscribe((manualRedactions) => { this.fileData.manualRedactions = manualRedactions;