aboutsummaryrefslogtreecommitdiff
path: root/js/components/gradientpicker.reel
diff options
context:
space:
mode:
authorEric Guzman2012-03-13 21:52:03 -0700
committerEric Guzman2012-03-13 21:52:03 -0700
commit9aa0880cd37d34c9c2d9c4ed455aa1f562f56ef3 (patch)
treea11a4d791b538fce2b54744180add9faf0dfb797 /js/components/gradientpicker.reel
parent40e03e102c14a343efee1bdcf32d0d244e3f8344 (diff)
parentf4373594569f77d710eea9a266fe41419c029f85 (diff)
downloadninja-9aa0880cd37d34c9c2d9c4ed455aa1f562f56ef3.tar.gz
Merge branch 'refs/heads/master' into CSSPanelUpdates
Diffstat (limited to 'js/components/gradientpicker.reel')
-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 //