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

Side by Side Diff: chrome/browser/resources/chromeos/login/indeterminate-progress.js

Issue 883033002: Disabled animation in indeterminate progress bar. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2214
Patch Set: Created 5 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 | « no previous file | 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 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 Polymer('indeterminate-progress', { 5 Polymer('indeterminate-progress', {
6 runnerPortion: 20, 6 runnerPortion: 20,
7 rate: 1, 7 rate: 1,
8 runnerColor: '#0f9d58', 8 runnerColor: '#0f9d58',
9 backgroundColor: '#c8c8c8', 9 backgroundColor: '#c8c8c8',
10 10
11 progress: 0, 11 progress: 0,
12 min: Math.min, 12 min: Math.min,
13 max: Math.max, 13 max: Math.max,
14 14
15 computed: { 15 computed: {
16 scaledProgress: '((100 + runnerPortion) * progress / 100) - runnerPortion', 16 scaledProgress: '((100 + runnerPortion) * progress / 100) - runnerPortion',
17 primaryProgress: 'max(0, scaledProgress)', 17 primaryProgress: 'max(0, scaledProgress)',
18 secondaryProgress: 'min(scaledProgress + runnerPortion, 100)', 18 secondaryProgress: 'min(scaledProgress + runnerPortion, 100)',
19 timeout: '20 / min(max(rate, 1), 10)' 19 timeout: '20 / min(max(rate, 1), 10)'
20 }, 20 },
21 21
22 ready: function() { 22 ready: function() {
23 this.async(this.doProgress, null, this.timeout);
24 }, 23 },
25 24
26 doProgress: function() { 25 doProgress: function() {
27 if (this.progress + 1 > 100) 26 if (this.progress + 1 > 100)
28 this.progress = 0; 27 this.progress = 0;
29 else 28 else
30 ++this.progress; 29 ++this.progress;
31 this.async(this.doProgress, null, this.timeout); 30 this.async(this.doProgress, null, this.timeout);
32 } 31 }
33 }); 32 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698