cherrypick compare view

This commit is contained in:
Timo 2021-06-03 22:43:00 +03:00
parent 32723d2fc0
commit 8c44b3bfbb
2 changed files with 6 additions and 2 deletions

View File

@ -20,7 +20,7 @@
min="1"
[max]="totalPages"
type="number"
(change)="navigateToPage(pageInput.value)"
(change)="navigateToPageByInput(pageInput.value)"
class="page-number-input"
/>
</div>

View File

@ -114,7 +114,7 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
const annotationsFromViewer = annotations.map(ann => this._getAnnotationById(ann.id));
this.instance.annotManager.selectAnnotations(annotationsFromViewer);
this.navigateToPage(annotations[0].pageNumber);
// this.navigateToPage(annotations[0].pageNumber*this.paginationOffset);
this.instance.annotManager.jumpToAnnotation(annotationsFromViewer[0]);
}
@ -831,4 +831,8 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges {
get paginationOffset() {
return this.isCompareMode ? 2 : 1;
}
navigateToPageByInput(pageNumber) {
this.navigateToPage(pageNumber * this.paginationOffset);
}
}