changed activePage functionality

This commit is contained in:
Timo Bejan 2020-10-23 16:06:19 +03:00
parent 835541ca62
commit 684d9dfb39

View File

@ -36,7 +36,6 @@ export class FilePreviewScreenComponent implements OnInit {
public selectedAnnotation: Annotations.Annotation;
public filters: AnnotationFilters;
public expandedFilters: AnnotationFilters = { hint: false };
public activeViewerPage: number;
constructor(
public readonly appStateService: AppStateService,
@ -129,9 +128,9 @@ export class FilePreviewScreenComponent implements OnInit {
}
public handleAnnotationsAdded(annotations: Annotations.Annotation[]) {
this._changeDetectorRef.detectChanges();
AnnotationUtils.addAnnotations(this.annotations, annotations);
this.applyFilters();
this._changeDetectorRef.detectChanges();
}
public get displayedPages(): number[] {
@ -167,12 +166,9 @@ export class FilePreviewScreenComponent implements OnInit {
});
}
public viewerPageChanged(pageNumber: number) {
if (Number.isInteger(pageNumber)) {
this.activeViewerPage = this._viewerSyncService.activeViewerPage;
this._scrollViews();
}
this._changeDetectorRef.detectChanges();
get activeViewerPage(){
return this._viewerSyncService.activeViewerPage;
}
@debounce()
@ -304,4 +300,8 @@ export class FilePreviewScreenComponent implements OnInit {
}
}
}
viewerPageChanged($event: number) {
this._changeDetectorRef.detectChanges();
}
}