diff options
author | Jon Reid | 2012-03-09 16:47:26 -0800 |
---|---|---|
committer | Jon Reid | 2012-03-09 16:47:26 -0800 |
commit | be59c44f9232104ded1a9c4cd888d70021eba33e (patch) | |
tree | b94c8432759362e035f15c0936c575a2861b6ad8 /node_modules/montage/ui/bluemoon/progress.reel | |
parent | 54b31ecbd4c9877183850542227c61946a62aa4f (diff) | |
parent | a28cb88194f45325e42dd8c774469424712dd6f4 (diff) | |
download | ninja-be59c44f9232104ded1a9c4cd888d70021eba33e.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into Timeline-local
Diffstat (limited to 'node_modules/montage/ui/bluemoon/progress.reel')
-rw-r--r-- | node_modules/montage/ui/bluemoon/progress.reel/progress.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/node_modules/montage/ui/bluemoon/progress.reel/progress.js b/node_modules/montage/ui/bluemoon/progress.reel/progress.js index 8bc68b05..20c60d94 100644 --- a/node_modules/montage/ui/bluemoon/progress.reel/progress.js +++ b/node_modules/montage/ui/bluemoon/progress.reel/progress.js | |||
@@ -43,8 +43,8 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo | |||
43 | set: function(val) { | 43 | set: function(val) { |
44 | if(val !== this._value) { | 44 | if(val !== this._value) { |
45 | this._value = val; | 45 | this._value = val; |
46 | if(this._value > this._maximumValue) { | 46 | if(this._value > this._max) { |
47 | this._value = this._maximumValue; | 47 | this._value = this._max; |
48 | } | 48 | } |
49 | if(this._value < 0) { | 49 | if(this._value < 0) { |
50 | this._value = 0; | 50 | this._value = 0; |
@@ -57,7 +57,7 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo | |||
57 | Description TODO | 57 | Description TODO |
58 | @private | 58 | @private |
59 | */ | 59 | */ |
60 | _maximumValue: { | 60 | _max: { |
61 | enumerable: false, | 61 | enumerable: false, |
62 | value: 100 | 62 | value: 100 |
63 | }, | 63 | }, |
@@ -66,15 +66,15 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo | |||
66 | @type {Function} | 66 | @type {Function} |
67 | @default {Number} 100 | 67 | @default {Number} 100 |
68 | */ | 68 | */ |
69 | maximumValue: { | 69 | max: { |
70 | get: function() { | 70 | get: function() { |
71 | return this._maximumValue; | 71 | return this._max; |
72 | }, | 72 | }, |
73 | set: function(val) { | 73 | set: function(val) { |
74 | if(val !== this._maximumValue) { | 74 | if(val !== this._max) { |
75 | this._maximumValue = val; | 75 | this._max = val; |
76 | if(this._maximumValue <= 0) { | 76 | if(this._max <= 0) { |
77 | this._maximumValue = 1; // Prevent divide by zero errors | 77 | this._max = 1; // Prevent divide by zero errors |
78 | } | 78 | } |
79 | this.needsDraw = true; | 79 | this.needsDraw = true; |
80 | } | 80 | } |
@@ -120,7 +120,7 @@ exports.Progress = Montage.create(Component,/** @lends module:"montage/ui/bluemo | |||
120 | draw: { | 120 | draw: { |
121 | enumerable: false, | 121 | enumerable: false, |
122 | value: function() { | 122 | value: function() { |
123 | var ratio = this._value / this._maximumValue; | 123 | var ratio = this._value / this._max; |
124 | // constrain to interval [0, 1] | 124 | // constrain to interval [0, 1] |
125 | ratio = Math.min(Math.max(ratio, 0), 1); | 125 | ratio = Math.min(Math.max(ratio, 0), 1); |
126 | // map into [0, 100] | 126 | // map into [0, 100] |