mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #4797 from yurydelendik/issue4634
Update text layer correctly when zooming with USE_ONLY_CSS_ZOOM
This commit is contained in:
commit
0d8e3cc8ca
1 changed files with 4 additions and 3 deletions
|
@ -158,12 +158,13 @@ var PageView = function pageView(container, id, scale,
|
|||
// the text layer are rotated.
|
||||
// TODO: This could probably be simplified by drawing the text layer in
|
||||
// one orientation then rotating overall.
|
||||
var textLayerViewport = this.textLayer.viewport;
|
||||
var textRelativeRotation = this.viewport.rotation -
|
||||
this.textLayer.viewport.rotation;
|
||||
textLayerViewport.rotation;
|
||||
var textAbsRotation = Math.abs(textRelativeRotation);
|
||||
var scale = (width / canvas.width);
|
||||
var scale = width / textLayerViewport.width;
|
||||
if (textAbsRotation === 90 || textAbsRotation === 270) {
|
||||
scale = width / canvas.height;
|
||||
scale = width / textLayerViewport.height;
|
||||
}
|
||||
var textLayerDiv = this.textLayer.textLayerDiv;
|
||||
var transX, transY;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue