diff options
author | Pushkar Joshi | 2012-03-14 15:39:59 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-03-14 15:39:59 -0700 |
commit | 571ed9ef856780eded3ac7104ed0ce72c7c7c81c (patch) | |
tree | fc7bdcd86b2eb742f4cda2ccdee6bd599b1f382e /js/components/gradientpicker.reel | |
parent | 23baa44e0bc7bfb24e42702c1ef58bf62da083d8 (diff) | |
parent | 089534a80c64226bf7d124ab9147afce386fdb5c (diff) | |
download | ninja-571ed9ef856780eded3ac7104ed0ce72c7c7c81c.tar.gz |
Merge branch 'master' into pentool
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 | // |