Fixing zoom and rotate issues
This commit is contained in:
parent
82dd32e807
commit
2f4423cffb
@ -19,7 +19,7 @@
|
||||
return this.page.view;
|
||||
},
|
||||
getViewport: function(scale, rotate) {
|
||||
if (arguments < 2)
|
||||
if (arguments.length < 2)
|
||||
rotate = this.rotate;
|
||||
return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
|
||||
},
|
||||
|
@ -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…
x
Reference in New Issue
Block a user