Merge pull request #4099 from yurydelendik/bug958050
Fixes FitV scrolling
This commit is contained in:
commit
d6ed4f2631
@ -336,6 +336,11 @@ var PageView = function pageView(container, id, scale,
|
||||
|
||||
var x = 0, y = 0;
|
||||
var width = 0, height = 0, widthScale, heightScale;
|
||||
var changeOrientation = !!(this.rotation % 180);
|
||||
var pageWidth = (changeOrientation ? this.height : this.width) /
|
||||
this.scale / CSS_UNITS;
|
||||
var pageHeight = (changeOrientation ? this.width : this.height) /
|
||||
this.scale / CSS_UNITS;
|
||||
var scale = 0;
|
||||
switch (dest[1].name) {
|
||||
case 'XYZ':
|
||||
@ -347,7 +352,7 @@ var PageView = function pageView(container, id, scale,
|
||||
// since aligning the bottom of the intended page with the
|
||||
// top of the window is rarely helpful).
|
||||
x = x !== null ? x : 0;
|
||||
y = y !== null ? y : (this.height / this.scale) / CSS_UNITS;
|
||||
y = y !== null ? y : pageHeight;
|
||||
break;
|
||||
case 'Fit':
|
||||
case 'FitB':
|
||||
@ -361,6 +366,8 @@ var PageView = function pageView(container, id, scale,
|
||||
case 'FitV':
|
||||
case 'FitBV':
|
||||
x = dest[2];
|
||||
width = pageWidth;
|
||||
height = pageHeight;
|
||||
scale = 'page-height';
|
||||
break;
|
||||
case 'FitR':
|
||||
|
Loading…
Reference in New Issue
Block a user