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

Unified Diff: third_party/polymer/v0_8/components-chromium/paper-progress/paper-progress-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/polymer/v0_8/components-chromium/paper-progress/paper-progress-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/paper-progress/paper-progress-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-progress/paper-progress-extracted.js
new file mode 100644
index 0000000000000000000000000000000000000000..93e3e9ae7dfe4cf715f4ef27831943174d5ac7da
--- /dev/null
+++ b/third_party/polymer/v0_8/components-chromium/paper-progress/paper-progress-extracted.js
@@ -0,0 +1,72 @@
+
+ Polymer({
+
+ is: 'paper-progress',
+
+ behaviors: [
+ Polymer.IronRangeBehavior
+ ],
+
+ properties: {
+
+ /**
+ * The number that represents the current secondary progress.
+ */
+ secondaryProgress: {
+ type: Number,
+ value: 0,
+ notify: true
+ },
+
+ /**
+ * The secondary ratio
+ */
+ secondaryRatio: {
+ type: Number,
+ value: 0,
+ readOnly: true,
+ observer: '_secondaryRatioChanged'
+ },
+
+ /**
+ * Use an indeterminate progress indicator.
+ */
+ indeterminate: {
+ type: Boolean,
+ value: false,
+ notify: true,
+ observer: '_toggleIndeterminate'
+ }
+ },
+
+ observers: [
+ '_ratioChanged(ratio)',
+ '_secondaryProgressChanged(secondaryProgress, min, max)'
+ ],
+
+ _toggleIndeterminate: function() {
+ // If we use attribute/class binding, the animation sometimes doesn't translate properly
+ // on Safari 7.1. So instead, we toggle the class here in the update method.
+ this.toggleClass('indeterminate', this.indeterminate, this.$.activeProgress);
+ },
+
+ _transformProgress: function(progress, ratio) {
+ var transform = 'scaleX(' + (ratio / 100) + ')';
+ progress.style.transform = progress.style.webkitTransform = transform;
+ },
+
+ _ratioChanged: function(ratio) {
+ this._transformProgress(this.$.activeProgress, ratio);
+ },
+
+ _secondaryRatioChanged: function(secondaryRatio) {
+ this._transformProgress(this.$.secondaryProgress, secondaryRatio);
+ },
+
+ _secondaryProgressChanged: function() {
+ this.secondaryProgress = this._clampValue(this.secondaryProgress);
+ this._setSecondaryRatio(this._calcRatio(this.secondaryProgress) * 100);
+ }
+
+ });
+

Powered by Google App Engine
This is Rietveld 408576698