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);
},
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';
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);