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

Side by Side Diff: elements/viewer-toolbar/viewer-toolbar.html

Issue 137703012: Run PRESUBMIT checks over existing files in html-office-public (Closed) Base URL: https://chromium.googlesource.com/chromium/html-office-public.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « elements/viewer-toolbar/viewer-toolbar.css ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <polymer-element name="viewer-toolbar" attributes="fadingIn" 1 <polymer-element name="viewer-toolbar" attributes="fadingIn"
2 on-mouseover="{{fadeIn}}" on-mousemove="{{fadeIn}}" 2 on-mouseover="{{fadeIn}}" on-mousemove="{{fadeIn}}"
3 on-mouseout="{{fadeOut}}"> 3 on-mouseout="{{fadeOut}}">
4 <template> 4 <template>
5 <link rel="stylesheet" href="viewer-toolbar.css"> 5 <link rel="stylesheet" href="viewer-toolbar.css">
6 <div id="toolbar"> 6 <div id="toolbar">
7 <content></content> 7 <content></content>
8 </div> 8 </div>
9 </template> 9 </template>
10 <script> 10 <script>
11 Polymer('viewer-toolbar', { 11 Polymer('viewer-toolbar', {
12 fadingIn: false, 12 fadingIn: false,
13 timerId: undefined, 13 timerId: undefined,
14 ready: function() { 14 ready: function() {
15 this.fadingInChanged(); 15 this.fadingInChanged();
16 }, 16 },
17 fadeIn: function() { 17 fadeIn: function() {
18 this.fadingIn = true; 18 this.fadingIn = true;
19 }, 19 },
20 fadeOut: function() { 20 fadeOut: function() {
21 this.fadingIn = false; 21 this.fadingIn = false;
22 }, 22 },
23 fadingInChanged: function() { 23 fadingInChanged: function() {
24 if (this.fadingIn) { 24 if (this.fadingIn) {
25 this.style.opacity = 1; 25 this.style.opacity = 1;
26 if (this.timerId !== undefined) { 26 if (this.timerId !== undefined) {
27 clearTimeout(this.timerId); 27 clearTimeout(this.timerId);
28 this.timerId = undefined; 28 this.timerId = undefined;
29 } 29 }
30 } else { 30 } else {
31 if (this.timerId === undefined) { 31 if (this.timerId === undefined) {
32 this.timerId = setTimeout( 32 this.timerId = setTimeout(
33 function() { 33 function() {
34 this.style.opacity = 0; 34 this.style.opacity = 0;
35 this.timerId = undefined; 35 this.timerId = undefined;
36 }.bind(this), 3000); 36 }.bind(this), 3000);
37 }
38 } 37 }
39 } 38 }
40 }); 39 }
41 </script> 40 });
41 </script>
42 </polymer-element> 42 </polymer-element>
OLDNEW
« no previous file with comments | « elements/viewer-toolbar/viewer-toolbar.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698