diff options
author | hwc487 | 2012-03-16 12:40:50 -0700 |
---|---|---|
committer | hwc487 | 2012-03-16 12:40:50 -0700 |
commit | 2ac5db3bb1bcee887d6dd742e6c0273abb5366bd (patch) | |
tree | 13622390967922f9c1719bf835f2f818867b5b9b /js/components/gradientpicker.reel | |
parent | a0d23354802ebc6b437698acb4b18d3395d47cd1 (diff) | |
parent | 3e98d9eaf6f691aa0f7a4334983537a4ee3ffd39 (diff) | |
download | ninja-2ac5db3bb1bcee887d6dd742e6c0273abb5366bd.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into integration
Diffstat (limited to 'js/components/gradientpicker.reel')
-rwxr-xr-x | js/components/gradientpicker.reel/gradientpicker.js | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js index da4e8c0f..b10f6624 100755 --- a/js/components/gradientpicker.reel/gradientpicker.js +++ b/js/components/gradientpicker.reel/gradientpicker.js | |||
@@ -213,21 +213,13 @@ exports.GradientPicker = Montage.create(Component, { | |||
213 | removeStop: { | 213 | removeStop: { |
214 | enumerable: false, | 214 | enumerable: false, |
215 | value: function(stop) { | 215 | value: function(stop) { |
216 | //Removing stops | ||
217 | this.element._components.stopsContainer.removeChild(stop); | ||
218 | //Stopping events related to this current stop | ||
219 | this.removeStopMoving(); | ||
220 | //Resetting stops if less than 2 | ||
221 | var i, buttons = this.element._components.stopsContainer.getElementsByTagName('button'); | 216 | var i, buttons = this.element._components.stopsContainer.getElementsByTagName('button'); |
222 | if (buttons.length < 2) { | 217 | // |
223 | //Removing remaining stops prior to resetting | 218 | if (buttons.length > 2) { |
224 | for (i=0; buttons[i]; i++) { | 219 | //Removing stops |
225 | this.element._components.stopsContainer.removeChild(buttons[i].stop); | 220 | this.element._components.stopsContainer.removeChild(stop); |
226 | } | 221 | //Stopping events related to this current stop |
227 | //Nulling then adding defaults | 222 | this.removeStopMoving(); |
228 | this.value = null; | ||
229 | this.addDefaultStops(); | ||
230 | this._dispatchEvent('change', false); | ||
231 | } | 223 | } |
232 | } | 224 | } |
233 | }, | 225 | }, |
@@ -327,7 +319,7 @@ exports.GradientPicker = Montage.create(Component, { | |||
327 | // | 319 | // |
328 | this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); | 320 | this.application.ninja.colorController.colorPopupManager.hideColorChipPopup(); |
329 | // | 321 | // |
330 | if ((e._event.y+this.hack.y) > this.element._trackY+50 || (e._event.y+this.hack.y) < this.element._trackY) { | 322 | if ((e._event.y+this.hack.y) > this.element._trackY+70 || (e._event.y+this.hack.y) < this.element._trackY) { |
331 | this.removeStop(this.currentStop); | 323 | this.removeStop(this.currentStop); |
332 | } | 324 | } |
333 | // | 325 | // |