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

Side by Side Diff: chrome/browser/resources/pdf/elements/viewer-toolbar/viewer-toolbar.html

Issue 110723007: Add the viewer toolbar to the PDF extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <polymer-element name="viewer-toolbar" attributes="fadingIn"
2 on-mouseover="{{fadeIn}}" on-mousemove="{{fadeIn}}"
3 on-mouseout="{{fadeOut}}">
4 <template>
5 <link rel="stylesheet" href="viewer-toolbar.css">
6 <div id="toolbar">
7 <content></content>
8 </div>
9 </template>
10 <script>
11 Polymer('viewer-toolbar', {
12 fadingIn: false,
13 timerIsRunning: false,
14 timerId: 0,
15 ready: function() {
16 this.fadingInChanged();
17 },
18 fadeIn: function() {
19 this.fadingIn = true;
20 },
21 fadeOut: function() {
22 this.fadingIn = false;
23 },
24 fadingInChanged: function() {
25 if (this.fadingIn) {
26 this.style.opacity = 1;
27 if (this.timerIsRunning) {
28 this.timerIsRunning = false;
29 clearTimeout(this.timerId);
30 }
31 } else {
32 if (!this.timerIsRunning) {
33 this.timerIsRunning = true;
34 this.timerId = setTimeout(
35 function() { this.style.opacity = 0; }.bind(this), 3000);
36 }
ganetsky1 2014/01/03 18:14:39 There are numerous things I don't understand here:
raymes 2014/01/06 00:22:45 1) Done, thanks. 2) The transition has been moved
ganetsky1 2014/01/08 06:13:43 Please correct me if I'm wrong somewhere: There s
37 }
38 }
39 });
40 </script>
41 </polymer-element>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698