mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 17:30:09 +02:00
Allow outline to be collapsed / shown via icon.
- This commit adds a '>' before every outline item that has subitems. - Click on the '>' to collapse all subitems under that item (which turns the '>' in a 'v'). - Shift + click expands/collapses all descendant items under that tree. - Double-clicking on the "Show Document Outline" button in the toolbar expands/collapses all outline items.
This commit is contained in:
parent
862342189f
commit
7c992243fd
7 changed files with 100 additions and 3 deletions
|
@ -1401,6 +1401,11 @@ function webViewerInitialized() {
|
|||
PDFViewerApplication.switchSidebarView('outline');
|
||||
});
|
||||
|
||||
document.getElementById('viewOutline').addEventListener('dblclick',
|
||||
function() {
|
||||
PDFViewerApplication.outline.toggleOutlineTree();
|
||||
});
|
||||
|
||||
document.getElementById('viewAttachments').addEventListener('click',
|
||||
function() {
|
||||
PDFViewerApplication.switchSidebarView('attachments');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue