7 Polymer
.IronRangeBehavior
13 * The number that represents the current secondary progress.
28 observer
: '_secondaryRatioChanged'
32 * Use an indeterminate progress indicator.
38 observer
: '_toggleIndeterminate'
43 '_ratioChanged(ratio)',
44 '_secondaryProgressChanged(secondaryProgress, min, max)'
47 _toggleIndeterminate: function() {
48 // If we use attribute/class binding, the animation sometimes doesn't translate properly
49 // on Safari 7.1. So instead, we toggle the class here in the update method.
50 this.toggleClass('indeterminate', this.indeterminate
, this.$.activeProgress
);
53 _transformProgress: function(progress
, ratio
) {
54 var transform
= 'scaleX(' + (ratio
/ 100) + ')';
55 progress
.style
.transform
= progress
.style
.webkitTransform
= transform
;
58 _ratioChanged: function(ratio
) {
59 this._transformProgress(this.$.activeProgress
, ratio
);
62 _secondaryRatioChanged: function(secondaryRatio
) {
63 this._transformProgress(this.$.secondaryProgress
, secondaryRatio
);
66 _secondaryProgressChanged: function() {
67 this.secondaryProgress
= this._clampValue(this.secondaryProgress
);
68 this._setSecondaryRatio(this._calcRatio(this.secondaryProgress
) * 100);