Merge branch 'master' of git://github.com/mozilla/pdf.js.git into textsearch-1

This commit is contained in:
notmasteryet 2011-12-19 18:06:31 -06:00
commit b8672d7efb
8 changed files with 164 additions and 44 deletions

View file

@ -970,18 +970,38 @@ window.addEventListener('keydown', function keydown(evt) {
return; // ignoring if the 'controls' element is focused
curElement = curElement.parentNode;
}
var handled = false;
switch (evt.keyCode) {
case 61: // FF/Mac '='
case 107: // FF '+' and '='
case 187: // Chrome '+'
PDFView.zoomIn();
handled = true;
break;
case 109: // FF '-'
case 189: // Chrome '-'
PDFView.zoomOut();
handled = true;
break;
case 48: // '0'
PDFView.setScale(kDefaultScale, true);
handled = true;
break;
case 37: // left arrow
case 75: // 'k'
case 80: // 'p'
PDFView.page--;
handled = true;
break;
case 39: // right arrow
case 74: // 'j'
case 78: // 'n'
PDFView.page++;
handled = true;
break;
}
if (handled) {
evt.preventDefault();
}
});