OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 Polymer('viewer-pdf-toolbar', { |
| 6 /** |
| 7 * @type {string} |
| 8 * The title of the PDF document. |
| 9 */ |
| 10 docTitle: '', |
| 11 |
| 12 /** |
| 13 * @type {number} |
| 14 * The current index of the page being viewed (0-based). |
| 15 */ |
| 16 pageIndex: 0, |
| 17 |
| 18 /** |
| 19 * @type {number} |
| 20 * The current loading progress of the PDF document (0 - 100). |
| 21 */ |
| 22 loadProgress: 0, |
| 23 |
| 24 /** |
| 25 * @type {number} |
| 26 * The number of pages in the PDF document. |
| 27 */ |
| 28 docLength: 1, |
| 29 |
| 30 loadProgressChanged: function() { |
| 31 if (this.loadProgress >= 100) |
| 32 this.$.pageselector.style.visibility = 'visible'; |
| 33 }, |
| 34 |
| 35 selectPageNumber: function() { |
| 36 this.$.pageselector.select(); |
| 37 }, |
| 38 |
| 39 rotateRight: function() { |
| 40 this.fire('rotate-right'); |
| 41 }, |
| 42 |
| 43 toggleBookmarks: function() { |
| 44 this.fire('toggle-bookmarks'); |
| 45 }, |
| 46 |
| 47 save: function() { |
| 48 this.fire('save'); |
| 49 }, |
| 50 |
| 51 print: function() { |
| 52 this.fire('print'); |
| 53 } |
| 54 }); |
OLD | NEW |