Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webodf/WebODF
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: leenaars/WebODF
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 3 files changed
  • 1 contributor

Commits on Jul 23, 2014

  1. Copy the full SHA
    015dd00 View commit details
Showing with 50 additions and 4 deletions.
  1. +1 −0 programs/viewer/index.html
  2. +12 −0 programs/viewer/viewer.css
  3. +37 −4 programs/viewer/viewer.js
1 change: 1 addition & 0 deletions programs/viewer/index.html
Original file line number Diff line number Diff line change
@@ -124,6 +124,7 @@
✖
</div>
<div id = "dialogOverlay"></div>
<div id = "blanked"></div>
</div>
</body>
</html>
12 changes: 12 additions & 0 deletions programs/viewer/viewer.css
Original file line number Diff line number Diff line change
@@ -755,6 +755,18 @@ html[dir='rtl'] .dropdownToolbarButton {
display: none;
}

#blanked {
display: none;
position: absolute;
left: 0px;
top: 0px;
width:100%;
height:100%;
z-index: 3;
background-color: black;
opacity: 1;
}

@media only screen and (max-device-width: 800px) and (max-device-height: 800px) {
#canvasContainer {
top: 0;
41 changes: 37 additions & 4 deletions programs/viewer/viewer.js
Original file line number Diff line number Diff line change
@@ -490,6 +490,21 @@ function Viewer(viewerPlugin) {
}
}

function blankOut(value) {
if (blanked.style.display == 'block') {
blanked.style.display = 'none';
blanked.style.cursor = 'initial';
toggleToolsbars()
} else {
if (presentationMode || isFullScreen) {
blanked.style.display = 'block';
blanked.style.backgroundColor = value;
blanked.style.cursor = 'none';
hideToolbars()
}
}
}

function init() {

initializeAboutInformation();
@@ -584,19 +599,37 @@ function Viewer(viewerPlugin) {
shiftKey = evt.shiftKey;

switch (key) {
case 8: // backspace
case 33: // pageUp
case 38: // up
case 37: // left
case 37: // left arrow
case 38: // up arrow
case 80: // key 'p'
self.showPreviousPage();
break;
case 13: // enter
case 34: // pageDown
case 40: // down
case 39: // right
case 39: // right arrow
case 40: // down arrow
case 78: // key 'n'
self.showNextPage();
break;
case 32: // space
shiftKey ? self.showPreviousPage() : self.showNextPage();
break;
case 66: // key 'b' blanks screen (to black) or returns to the document
case 190: // and so does the key '.' (dot)
blankOut('#000');
break;
case 87: // key 'w' blanks page (to white) or returns to the document
case 188: // and so does the key ',' (comma)
blankOut('#FFF');
break;
case 36: // key 'Home' goes to first page
self.showPage(0);
break;
case 35: // key 'End' goes to last page
self.showPage(pages.length);
break;
}
});
}