mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 02:05:37 +02:00
Add spread modes to web viewer
This builds on the scrolling mode work to add three buttons for joining page spreads together: one for the default view, with no page spreads, and two for spreads starting on odd-numbered or even-numbered pages.
This commit is contained in:
parent
91cbc185da
commit
3d83c646c6
16 changed files with 168 additions and 25 deletions
|
@ -1386,6 +1386,7 @@ let PDFViewerApplication = {
|
|||
eventBus.on('rotatecw', webViewerRotateCw);
|
||||
eventBus.on('rotateccw', webViewerRotateCcw);
|
||||
eventBus.on('switchscrollmode', webViewerSwitchScrollMode);
|
||||
eventBus.on('switchspreadmode', webViewerSwitchSpreadMode);
|
||||
eventBus.on('documentproperties', webViewerDocumentProperties);
|
||||
eventBus.on('find', webViewerFind);
|
||||
eventBus.on('findfromurlhash', webViewerFindFromUrlHash);
|
||||
|
@ -1453,6 +1454,7 @@ let PDFViewerApplication = {
|
|||
eventBus.off('rotatecw', webViewerRotateCw);
|
||||
eventBus.off('rotateccw', webViewerRotateCcw);
|
||||
eventBus.off('switchscrollmode', webViewerSwitchScrollMode);
|
||||
eventBus.off('switchspreadmode', webViewerSwitchSpreadMode);
|
||||
eventBus.off('documentproperties', webViewerDocumentProperties);
|
||||
eventBus.off('find', webViewerFind);
|
||||
eventBus.off('findfromurlhash', webViewerFindFromUrlHash);
|
||||
|
@ -1965,6 +1967,9 @@ function webViewerRotateCcw() {
|
|||
function webViewerSwitchScrollMode(evt) {
|
||||
PDFViewerApplication.pdfViewer.setScrollMode(evt.mode);
|
||||
}
|
||||
function webViewerSwitchSpreadMode(evt) {
|
||||
PDFViewerApplication.pdfViewer.setSpreadMode(evt.mode);
|
||||
}
|
||||
function webViewerDocumentProperties() {
|
||||
PDFViewerApplication.pdfDocumentProperties.open();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue