3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
13 <title>paper-progress
</title>
15 <meta name=
"viewport" content=
"width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
16 <meta name=
"mobile-web-app-capable" content=
"yes">
17 <meta name=
"apple-mobile-web-app-capable" content=
"yes">
19 <script src=
"../webcomponentsjs/webcomponents.js"></script>
21 <link rel=
"import" href=
"paper-progress.html">
22 <link rel=
"import" href=
"../paper-button/paper-button.html">
24 <style shim-shadowdom
>
27 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
38 paper-progress.pink::shadow #activeProgress {
39 background-color: #e91e63;
42 paper-progress.pink::shadow #secondaryProgress {
43 background-color: #f8bbd0;
51 <paper-progress></paper-progress>
53 <paper-button raised
onclick=
"startProgress();">Start
</paper-button>
57 <paper-progress></paper-progress><br>
59 <paper-progress value=
"40"></paper-progress><br>
61 <paper-progress value=
"800" min=
"100" max=
"1000"></paper-progress><br>
63 <paper-progress value=
"40" secondaryProgress=
"80"></paper-progress><br>
65 <paper-progress value=
"200" max=
"200"></paper-progress><br>
67 <paper-progress indeterminate
></paper-progress><br>
69 <paper-progress class=
"pink" value=
"80"></paper-progress><br>
71 <paper-progress class=
"pink" value=
"40" secondaryProgress=
"80"></paper-progress><br>
73 <paper-progress class=
"pink" indeterminate
></paper-progress><br>
77 var progress
= document
.querySelector('paper-progress');
78 var button
= document
.querySelector('paper-button');
80 var repeat
, maxRepeat
= 5, animating
= false;
82 function nextProgress() {
84 if (progress
.value
< progress
.max
) {
85 progress
.value
+= (progress
.step
|| 1);
87 if (++repeat
>= maxRepeat
) {
89 button
.disabled
= false;
92 progress
.value
= progress
.min
;
94 progress
.async(nextProgress
);
97 function startProgress() {
99 progress
.value
= progress
.min
;
100 button
.disabled
= true;
106 addEventListener('polymer-ready', function() {