Fixing view
This commit is contained in:
parent
846fc1755c
commit
c9e8649599
18
pdf.js
18
pdf.js
@ -3485,18 +3485,12 @@ var Page = (function pagePage() {
|
|||||||
height: this.height
|
height: this.height
|
||||||
};
|
};
|
||||||
if (isArray(obj) && obj.length == 4) {
|
if (isArray(obj) && obj.length == 4) {
|
||||||
var rotate = this.rotate;
|
var tl = this.rotatePoint(obj[0], obj[1]);
|
||||||
if (rotate == 0 || rotate == 180) {
|
var br = this.rotatePoint(obj[2], obj[3]);
|
||||||
view.x = obj[0];
|
view.x = Math.min(tl.x, br.x);
|
||||||
view.y = obj[1];
|
view.y = Math.min(tl.y, br.y);
|
||||||
view.width = obj[2] - view.x;
|
view.width = Math.abs(tl.x - br.x);
|
||||||
view.height = obj[3] - view.y;
|
view.height = Math.abs(tl.y - br.y);
|
||||||
} else {
|
|
||||||
view.x = obj[1];
|
|
||||||
view.y = obj[0];
|
|
||||||
view.width = obj[3] - view.x;
|
|
||||||
view.height = obj[2] - view.y;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return shadow(this, 'cropBox', view);
|
return shadow(this, 'cropBox', view);
|
||||||
|
Loading…
Reference in New Issue
Block a user