]> git.parisson.com Git - pdf.js.git/commitdiff
Lifting up this.xref; buttons tooltips
authornotmasteryet <async.processingjs@yahoo.com>
Mon, 22 Aug 2011 23:55:49 +0000 (18:55 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Mon, 22 Aug 2011 23:55:49 +0000 (18:55 -0500)
pdf.js
web/viewer.html

diff --git a/pdf.js b/pdf.js
index 185db1f5d41b5c7c98797b31e06a3a3eade7fc3c..c43a9d61c2eaaedeb732f4a9f37693c8727fe88c 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -3438,9 +3438,10 @@ var Catalog = (function() {
         return str;
       }
       var obj = this.catDict.get('Outlines');
+      var xref = this.xref;
       var root = { items: [] };
       if (IsRef(obj)) {
-        obj = this.xref.fetch(obj).get('First');
+        obj = xref.fetch(obj).get('First');
         var processed = new RefSet();
         if (IsRef(obj)) {
           var queue = [{obj: obj, parent: root}];
@@ -3449,12 +3450,12 @@ var Catalog = (function() {
           processed.put(obj);
           while (queue.length > 0) {
             var i = queue.shift();
-            var outlineDict = this.xref.fetch(i.obj);
+            var outlineDict = xref.fetch(i.obj);
             if (!outlineDict.has('Title'))
               error('Invalid outline item');
             var dest = outlineDict.get('A');
             if (dest)
-              dest = this.xref.fetchIfRef(dest).get('D');
+              dest = xref.fetchIfRef(dest).get('D');
             else if (outlineDict.has('Dest')) {
               dest = outlineDict.get('Dest');
               if (IsName(dest))
index 6232ce4b33f41f5dc5431c8d9148c5e773c69959..2766412e08d2187753b6f1f1e7b2e94acb197335 100644 (file)
           <div id="outlineView"></div>
         </div>
         <div id="sidebarControls">
-          <button id="thumbsSwitch" onclick="PDFView.switchSidebarView('thumbs')" data-selected>
-            <img src="images/nav-thumbs.svg" align="top" height="32" />
+          <button id="thumbsSwitch" title="Show Thumbnails" onclick="PDFView.switchSidebarView('thumbs')" data-selected>
+            <img src="images/nav-thumbs.svg" align="top" height="32" alt="Thumbs" />
           </button>
-          <button id="outlineSwitch" onclick="PDFView.switchSidebarView('outline')" disabled>
-            <img src="images/nav-outline.svg" align="top" height="32" />
+          <button id="outlineSwitch" title="Show Document Outline" onclick="PDFView.switchSidebarView('outline')" disabled>
+            <img src="images/nav-outline.svg" align="top" height="32" alt="Document Outline" />
           </button>
         </div>
      </div>