mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Fixing zoom and rotate issues
This commit is contained in:
parent
82dd32e807
commit
2f4423cffb
2 changed files with 15 additions and 3 deletions
|
@ -747,8 +747,6 @@ var PageView = function pageView(container, pdfPage, id, scale,
|
|||
var viewport = this.pdfPage.getViewport(this.scale);
|
||||
|
||||
this.viewport = viewport;
|
||||
this.width = viewport.width;
|
||||
this.height = viewport.height;
|
||||
div.style.width = viewport.width + 'px';
|
||||
div.style.height = viewport.height + 'px';
|
||||
|
||||
|
@ -763,6 +761,20 @@ var PageView = function pageView(container, pdfPage, id, scale,
|
|||
div.appendChild(this.loadingIconDiv);
|
||||
};
|
||||
|
||||
Object.defineProperty(this, 'width', {
|
||||
get: function PageView_getWidth() {
|
||||
return this.viewport.width;
|
||||
},
|
||||
enumerable: true
|
||||
});
|
||||
|
||||
Object.defineProperty(this, 'height', {
|
||||
get: function PageView_getHeight() {
|
||||
return this.viewport.height;
|
||||
},
|
||||
enumerable: true
|
||||
});
|
||||
|
||||
function setupAnnotations(pdfPage, viewport) {
|
||||
function bindLink(link, dest) {
|
||||
link.href = PDFView.getDestinationHash(dest);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue