Skip to content

Commit

Permalink
Fix deprecation #487
Browse files Browse the repository at this point in the history
  • Loading branch information
VadimDez committed Jun 3, 2019
1 parent ae56fd6 commit 6187e93
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/app/pdf-viewer/pdf-viewer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ export class PdfViewerComponent
this._pdf
.getPage(currentViewer.currentPageNumber)
.then((page: PDFPageProxy) => {
const viewport = page.getViewport(this._zoom, this._rotation);
const viewport = (page as any).getViewport({
scale: this._zoom,
rotation: this._rotation
});
let scale = this._zoom;
let stickToPage = true;

Expand All @@ -339,7 +342,7 @@ export class PdfViewerComponent
(this._fitToPage &&
viewport.width > this.element.nativeElement.offsetWidth)
) {
scale = this.getScale(page.getViewport(1).width);
scale = this.getScale((page as any).getViewport({ scale: 1 }).width);
stickToPage = !this._stickToPage;
}

Expand Down

0 comments on commit 6187e93

Please sign in to comment.