[Pkg-javascript-commits] [pdf.js] 04/141: Use full screen width in presentation mode

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 22:40:24 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit db84851e27ff062d3d34046a4c144911665d9e3a
Author: fkaelberer <o_0_o at gmx.de>
Date:   Fri Mar 28 08:58:18 2014 +0100

    Use full screen width in presentation mode
---
 web/presentation_mode.js | 4 +---
 web/viewer.css           | 4 ++++
 web/viewer.js            | 6 ++++--
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/web/presentation_mode.js b/web/presentation_mode.js
index d7c5d29..46a4fc2 100644
--- a/web/presentation_mode.js
+++ b/web/presentation_mode.js
@@ -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);
 
diff --git a/web/viewer.css b/web/viewer.css
index aca8375..340a354 100644
--- a/web/viewer.css
+++ b/web/viewer.css
@@ -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) {
diff --git a/web/viewer.js b/web/viewer.js
index 3e127c4..d6c5250 100644
--- a/web/viewer.js
+++ b/web/viewer.js
@@ -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':

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list