]> git.parisson.com Git - pdf.js.git/commitdiff
Reset the outline sidebar on each load.
authorBrendan Dahl <brendan.dahl@gmail.com>
Thu, 26 Apr 2012 16:17:29 +0000 (09:17 -0700)
committerBrendan Dahl <brendan.dahl@gmail.com>
Thu, 26 Apr 2012 16:17:29 +0000 (09:17 -0700)
web/viewer.js

index f584c5d1f0c8d84ebf6753b36b944a835724dc3b..c5f0b70ee0f3166de8ef7bebf281ceab39cdcd91 100644 (file)
@@ -1134,6 +1134,8 @@ var ThumbnailView = function thumbnailView(container, pdfPage, id) {
 
 var DocumentOutlineView = function documentOutlineView(outline) {
   var outlineView = document.getElementById('outlineView');
+  while (outlineView.firstChild)
+    outlineView.removeChild(outlineView.firstChild);
 
   function bindItemLink(domObj, item) {
     domObj.href = PDFView.getDestinationHash(item.dest);