Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2862)

Unified Diff: elements/viewer-page-indicator/viewer-page-indicator.js

Issue 236723003: Allow the PDF page indicator to accept a list of page labels (Closed) Base URL: https://chromium.googlesource.com/chromium/html-office-public.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « elements/viewer-page-indicator/viewer-page-indicator.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: elements/viewer-page-indicator/viewer-page-indicator.js
diff --git a/elements/viewer-page-indicator/viewer-page-indicator.js b/elements/viewer-page-indicator/viewer-page-indicator.js
index e22b5a6f91c496e2e3b2ee36080d10bff8527589..8612e170348f1894f46296e0dc5e2be93c984c33 100644
--- a/elements/viewer-page-indicator/viewer-page-indicator.js
+++ b/elements/viewer-page-indicator/viewer-page-indicator.js
@@ -3,8 +3,10 @@
// found in the LICENSE file.
Polymer('viewer-page-indicator', {
- text: '1',
+ label: '1',
+ index: 0,
timerId: undefined,
+ pageLabels: null,
ready: function() {
var callback = this.fadeIn.bind(this, 2000);
window.addEventListener('scroll', function() {
@@ -27,5 +29,14 @@ Polymer('viewer-page-indicator', {
this.style.opacity = 0;
this.timerId = undefined;
}.bind(this), displayTime);
+ },
+ pageLabelsChanged: function() {
+ this.indexChanged();
+ },
+ indexChanged: function() {
+ if (this.pageLabels)
+ this.label = this.pageLabels[this.index];
+ else
+ this.label = String(this.index + 1);
}
});
« no previous file with comments | « elements/viewer-page-indicator/viewer-page-indicator.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698