aboutsummaryrefslogtreecommitdiff
path: root/js/components/gradientpicker.reel/gradientpicker.js
diff options
context:
space:
mode:
authorJonathan Duran2012-03-14 08:59:17 -0700
committerJonathan Duran2012-03-14 08:59:17 -0700
commite065244ac75d1d0f25fd5c75cb58e714a13fe16b (patch)
tree6b49a85a45fdd41b81be5603fbbc2e0d197eb187 /js/components/gradientpicker.reel/gradientpicker.js
parente8f207dc50ad942ee8c1c1db6b146c0110ce3216 (diff)
downloadninja-e065244ac75d1d0f25fd5c75cb58e714a13fe16b.tar.gz
Squashed commit of the following:
merge master into timeline Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/components/gradientpicker.reel/gradientpicker.js')
-rwxr-xr-xjs/components/gradientpicker.reel/gradientpicker.js22
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 //