diff options
author | hwc487 | 2012-06-13 14:04:09 -0700 |
---|---|---|
committer | hwc487 | 2012-06-13 14:04:09 -0700 |
commit | 3e481dd581e0305dd8b572ed0d17e86622223464 (patch) | |
tree | aca2b28aa72857a52e047fb94090c34ab8dd1c2c /js/components/hottext.reel/hottext.js | |
parent | a7aa51e6b91623772eef54b827616432838b560e (diff) | |
parent | 682f4917d6badd105998c3dd84d031c38b51f017 (diff) | |
download | ninja-3e481dd581e0305dd8b572ed0d17e86622223464.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Textures
Diffstat (limited to 'js/components/hottext.reel/hottext.js')
-rwxr-xr-x | js/components/hottext.reel/hottext.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/js/components/hottext.reel/hottext.js b/js/components/hottext.reel/hottext.js index 0480597a..93e6e745 100755 --- a/js/components/hottext.reel/hottext.js +++ b/js/components/hottext.reel/hottext.js | |||
@@ -121,13 +121,19 @@ var HotText = exports.HotText = Montage.create(SliderBase, { | |||
121 | value: 2000 | 121 | value: 2000 |
122 | }, | 122 | }, |
123 | 123 | ||
124 | // Flag used to dispatch a single change event if either or both of value and units are changed | ||
125 | _unitsModified: { | ||
126 | enumerable: false, | ||
127 | value: false | ||
128 | }, | ||
129 | |||
124 | value: { | 130 | value: { |
125 | serializable: true, | 131 | serializable: true, |
126 | enumerable: true, | 132 | enumerable: true, |
127 | get: function() { | 133 | get: function() { |
128 | return this._value; | 134 | return this._value; |
129 | }, | 135 | }, |
130 | set: function(value, fromInput) { | 136 | set: function(value) { |
131 | if (isNaN(value)) { | 137 | if (isNaN(value)) { |
132 | this._valueSyncedWithInputField = false; | 138 | this._valueSyncedWithInputField = false; |
133 | this.needsDraw = true; | 139 | this.needsDraw = true; |
@@ -149,6 +155,9 @@ var HotText = exports.HotText = Montage.create(SliderBase, { | |||
149 | this._valueSyncedWithInputField = false; | 155 | this._valueSyncedWithInputField = false; |
150 | this.needsDraw = true; | 156 | this.needsDraw = true; |
151 | this._dispatchActionEvent(); | 157 | this._dispatchActionEvent(); |
158 | } else if(this._unitsModified) { | ||
159 | // Need to dispatch change event if units changed | ||
160 | this._dispatchActionEvent(); | ||
152 | } | 161 | } |
153 | } | 162 | } |
154 | }, | 163 | }, |
@@ -164,7 +173,7 @@ var HotText = exports.HotText = Montage.create(SliderBase, { | |||
164 | enumerable: false, | 173 | enumerable: false, |
165 | value: function() { | 174 | value: function() { |
166 | this._setEventFlags("change", false); | 175 | this._setEventFlags("change", false); |
167 | Object.getPropertyDescriptor(this, "value").set.call(this, this.inputFunction(this.element.value), true); | 176 | this.value = this.inputFunction(this.element.value); |
168 | } | 177 | } |
169 | }, | 178 | }, |
170 | 179 | ||