Pull request #131: Fix scroll to page on view mode change & initial load
Merge in RED/ui from RED-1122 to master * commit '335bd03d8343a55dda117ab9b65852ac3295d016': Fix scroll to page on view mode change & initial load
This commit is contained in:
commit
f77c368903
@ -556,12 +556,15 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
|
||||
|
||||
viewerReady($event: WebViewerInstance) {
|
||||
this._instance = $event;
|
||||
this.viewReady = true;
|
||||
this._cleanupAndRedrawManualAnnotations();
|
||||
this.viewReady = true;
|
||||
// Go to initial page from query params
|
||||
const pageNumber = this._activatedRoute.snapshot.queryParams.page;
|
||||
if (pageNumber) {
|
||||
this.selectPage(parseInt(pageNumber, 10));
|
||||
setTimeout(() => {
|
||||
this.selectPage(parseInt(pageNumber, 10));
|
||||
this._scrollViews();
|
||||
}, 500);
|
||||
}
|
||||
}
|
||||
|
||||
@ -718,6 +721,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
|
||||
switchView($event: MatButtonToggleChange) {
|
||||
this.viewMode = $event.value;
|
||||
this.updateViewMode();
|
||||
this._scrollViews();
|
||||
}
|
||||
|
||||
downloadOriginalFile() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user