Browse Source

Use full screen width in presentation mode

fkaelberer 11 years ago
parent
commit
db84851e27
  1. 4
      web/presentation_mode.js
  2. 4
      web/viewer.css
  3. 6
      web/viewer.js

4
web/presentation_mode.js

@ -149,11 +149,9 @@ var PresentationMode = { @@ -149,11 +149,9 @@ var PresentationMode = {
// Presentation Mode, by waiting until fullscreen mode is disabled.
// Note: This is only necessary in non-Mozilla browsers.
setTimeout(function exitPresentationModeTimeout() {
this.active = false;
PDFView.setScale(this.args.previousScale);
PDFView.page = page;
// Keep Presentation Mode active until the page is scrolled into view,
// to prevent issues in non-Mozilla browsers.
this.active = false;
this.args = null;
}.bind(this), 0);

4
web/viewer.css

@ -90,18 +90,22 @@ select { @@ -90,18 +90,22 @@ select {
:-webkit-full-screen .page {
margin-bottom: 100%;
border: 0;
}
:-moz-full-screen .page {
margin-bottom: 100%;
border: 0;
}
:-ms-fullscreen .page {
margin-bottom: 100% !important;
border: 0;
}
:fullscreen .page {
margin-bottom: 100%;
border: 0;
}
:-webkit-full-screen a:not(.internalLink) {

6
web/viewer.js

@ -283,9 +283,11 @@ var PDFView = { @@ -283,9 +283,11 @@ var PDFView = {
if (!currentPage) {
return;
}
var pageWidthScale = (this.container.clientWidth - SCROLLBAR_PADDING) /
var hPadding = PresentationMode.active ? 0 : SCROLLBAR_PADDING;
var vPadding = PresentationMode.active ? 0 : VERTICAL_PADDING;
var pageWidthScale = (this.container.clientWidth - hPadding) /
currentPage.width * currentPage.scale;
var pageHeightScale = (this.container.clientHeight - VERTICAL_PADDING) /
var pageHeightScale = (this.container.clientHeight - vPadding) /
currentPage.height * currentPage.scale;
switch (value) {
case 'page-actual':

Loading…
Cancel
Save