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:
Rob Wu 2015-07-21 19:52:49 +02:00
parent 862342189f
commit 7c992243fd
7 changed files with 100 additions and 3 deletions

View file

@ -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');