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

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

Issue 129903002: Add the Quickoffice viewer toolbar polymer elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/html-office-public.git@master
Patch Set: Created 6 years, 11 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
(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 timerId: undefined,
14 ready: function() {
15 this.fadingInChanged();
16 },
17 fadeIn: function() {
18 this.fadingIn = true;
19 },
20 fadeOut: function() {
21 this.fadingIn = false;
22 },
23 fadingInChanged: function() {
24 if (this.fadingIn) {
25 this.style.opacity = 1;
26 if (this.timerId !== undefined) {
27 clearTimeout(this.timerId);
28 this.timerId = undefined;
29 }
30 } else {
31 if (this.timerId === undefined) {
32 this.timerId = setTimeout(
33 function() {
34 this.style.opacity = 0;
35 this.timerId = undefined;
36 }.bind(this), 3000);
37 }
38 }
39 }
40 });
41 </script>
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