diff --git a/web/viewer.css b/web/viewer.css index 7f9a83288..211a0a1a4 100644 --- a/web/viewer.css +++ b/web/viewer.css @@ -64,15 +64,7 @@ select { cursor: none; } -:-webkit-full-screen .page:last-child { - margin-bottom: 40px; -} - -:-moz-full-screen .page:last-child { - margin-bottom: 40px; -} - -#viewerContainer:full-screen { +#viewerContainer:fullscreen { top: 0px; border-top: 5px solid transparent; background-color: #404040; @@ -83,6 +75,19 @@ select { cursor: none; } + +:-webkit-full-screen .page { + margin-bottom: 100%; +} + +:-moz-full-screen .page { + margin-bottom: 100%; +} + +:fullscreen .page { + margin-bottom: 100%; +} + #viewerContainer.presentationControls { cursor: default; } @@ -213,7 +218,6 @@ html[dir='rtl'] #sidebarContent { #viewerContainer { overflow: auto; box-shadow: inset 1px 0 0 hsla(0,0%,100%,.05); - padding-top: 30px; position: absolute; top: 32px; right: 0; diff --git a/web/viewer.js b/web/viewer.js index 393c1a4b1..72ae805f6 100644 --- a/web/viewer.js +++ b/web/viewer.js @@ -24,6 +24,7 @@ var kUnknownScale = 0; var kCacheSize = 20; var kCssUnits = 96.0 / 72.0; var kScrollbarPadding = 40; +var kVerticalPadding = 5; var kMinScale = 0.25; var kMaxScale = 4.0; var kImageDirectory = './images/'; @@ -716,7 +717,7 @@ var PDFView = { var pageWidthScale = (container.clientWidth - kScrollbarPadding) / currentPage.width * currentPage.scale / kCssUnits; - var pageHeightScale = (container.clientHeight - kScrollbarPadding) / + var pageHeightScale = (container.clientHeight - kVerticalPadding) / currentPage.height * currentPage.scale / kCssUnits; switch (value) { case 'page-actual':