mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 17:48:07 +02:00
Removing the rotatePoint, width, height from the API
This commit is contained in:
parent
737ed84174
commit
47c43b5779
5 changed files with 160 additions and 149 deletions
14
src/api.js
14
src/api.js
|
@ -6,11 +6,8 @@
|
|||
this.page = page;
|
||||
}
|
||||
PdfPageWrapper.prototype = {
|
||||
get width() {
|
||||
return this.page.width;
|
||||
},
|
||||
get height() {
|
||||
return this.page.height;
|
||||
get rotate() {
|
||||
return this.page.rotate;
|
||||
},
|
||||
get stats() {
|
||||
return this.page.stats;
|
||||
|
@ -21,8 +18,10 @@
|
|||
get view() {
|
||||
return this.page.view;
|
||||
},
|
||||
rotatePoint: function(x, y) {
|
||||
return this.page.rotatePoint(x, y);
|
||||
getViewport: function(scale, rotate) {
|
||||
if (arguments < 2)
|
||||
rotate = this.rotate;
|
||||
return new PDFJS.PageViewport(this.view, scale, rotate, 0, 0);
|
||||
},
|
||||
getAnnotations: function() {
|
||||
var promise = new PDFJS.Promise();
|
||||
|
@ -33,6 +32,7 @@
|
|||
render: function(renderContext) {
|
||||
var promise = new PDFJS.Promise();
|
||||
this.page.startRendering(renderContext.canvasContext,
|
||||
renderContext.viewport,
|
||||
function complete(error) {
|
||||
if (error)
|
||||
promise.reject(error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue