Fixing zoom and rotate issues
This commit is contained in:
parent
82dd32e807
commit
2f4423cffb
@ -19,7 +19,7 @@
|
|||||||
return this.page.view;
|
return this.page.view;
|
||||||
},
|
},
|
||||||
getViewport: function(scale, rotate) {
|
getViewport: function(scale, rotate) {
|
||||||
if (arguments < 2)
|
if (arguments.length < 2)
|
||||||
rotate = this.rotate;
|
rotate = this.rotate;
|
||||||
return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
|
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);
|
var viewport = this.pdfPage.getViewport(this.scale);
|
||||||
|
|
||||||
this.viewport = viewport;
|
this.viewport = viewport;
|
||||||
this.width = viewport.width;
|
|
||||||
this.height = viewport.height;
|
|
||||||
div.style.width = viewport.width + 'px';
|
div.style.width = viewport.width + 'px';
|
||||||
div.style.height = viewport.height + 'px';
|
div.style.height = viewport.height + 'px';
|
||||||
|
|
||||||
@ -763,6 +761,20 @@ var PageView = function pageView(container, pdfPage, id, scale,
|
|||||||
div.appendChild(this.loadingIconDiv);
|
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 setupAnnotations(pdfPage, viewport) {
|
||||||
function bindLink(link, dest) {
|
function bindLink(link, dest) {
|
||||||
link.href = PDFView.getDestinationHash(dest);
|
link.href = PDFView.getDestinationHash(dest);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user