mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Move the media left-top corner to the (0,0) canvas position
This commit is contained in:
parent
baab676b00
commit
3f286803d0
1 changed files with 2 additions and 0 deletions
|
@ -255,6 +255,8 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
|||
}
|
||||
// Scale so that canvas units are the same as PDF user space units
|
||||
this.ctx.scale(cw / mediaBox.width, ch / mediaBox.height);
|
||||
// Move the media left-top corner to the (0,0) canvas position
|
||||
this.ctx.translate(-mediaBox.x, -mediaBox.y);
|
||||
this.textDivs = [];
|
||||
this.textLayerQueue = [];
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue