aboutsummaryrefslogtreecommitdiff
path: root/js/panels/color/colorpanelbase.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-15 15:14:34 -0700
committerJose Antonio Marquez2012-06-15 15:14:34 -0700
commitfbd9d2492aeaef392ad59792825b8757d6c363fc (patch)
tree0dd06cc81b258763f40628eabcb21fa186ab43b8 /js/panels/color/colorpanelbase.reel
parent43fdc63a00edede743212c0cefe2bd29a63de2ad (diff)
downloadninja-fbd9d2492aeaef392ad59792825b8757d6c363fc.tar.gz
Fixing apply 'no color'
This should fix canvas and standard DOM elements including the root (body or template wrapper).
Diffstat (limited to 'js/panels/color/colorpanelbase.reel')
-rwxr-xr-xjs/panels/color/colorpanelbase.reel/colorpanelbase.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/js/panels/color/colorpanelbase.reel/colorpanelbase.js b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
index 7a28c55d..7071f590 100755
--- a/js/panels/color/colorpanelbase.reel/colorpanelbase.js
+++ b/js/panels/color/colorpanelbase.reel/colorpanelbase.js
@@ -694,7 +694,7 @@ exports.ColorPanelBase = Montage.create(Component, {
694 case 'nocolor': 694 case 'nocolor':
695 this._buttons.nocolor.push(button); 695 this._buttons.nocolor.push(button);
696 button.title = 'No Color'; 696 button.title = 'No Color';
697 button.addEventListener('click', this.setNoColor.bind(this)); 697 button.addEventListener('click', function () {this.setNoColor(false)}.bind(this));
698 break; 698 break;
699 //////////////////////////////////////////////////////// 699 ////////////////////////////////////////////////////////
700 case 'swap': 700 case 'swap':
@@ -746,7 +746,7 @@ exports.ColorPanelBase = Montage.create(Component, {
746 color.wasSetByCode = false; 746 color.wasSetByCode = false;
747 // 747 //
748 if (prev.m === 'nocolor') { 748 if (prev.m === 'nocolor') {
749 this.setNoColor(); 749 this.setNoColor(false);
750 } else { 750 } else {
751 this.colorManager.alpha = { value: alpha, wasSetByCode: true, type: 'change' }; 751 this.colorManager.alpha = { value: alpha, wasSetByCode: true, type: 'change' };
752 this.colorManager[prev.m] = color; 752 this.colorManager[prev.m] = color;
@@ -832,11 +832,11 @@ exports.ColorPanelBase = Montage.create(Component, {
832 //TODO: Add set by code property 832 //TODO: Add set by code property
833 setNoColor: { 833 setNoColor: {
834 enumerable: true, 834 enumerable: true,
835 value: function (e) { 835 value: function (wasSetByCode) {
836 // 836 //
837 this.application.ninja.colorController.colorPopupManager.hideColorPopup(); 837 this.application.ninja.colorController.colorPopupManager.hideColorPopup();
838 // 838 //
839 this.colorManager.applyNoColor(); 839 this.colorManager.applyNoColor(wasSetByCode);
840 } 840 }
841 }, 841 },
842 //////////////////////////////////////////////////////////////////// 842 ////////////////////////////////////////////////////////////////////
@@ -879,7 +879,7 @@ exports.ColorPanelBase = Montage.create(Component, {
879 break; 879 break;
880 //////////////////////////////////////////////////////// 880 ////////////////////////////////////////////////////////
881 default: 881 default:
882 this.setNoColor(); 882 this.setNoColor(false);
883 break; 883 break;
884 //////////////////////////////////////////////////////// 884 ////////////////////////////////////////////////////////
885 } 885 }
@@ -911,7 +911,7 @@ exports.ColorPanelBase = Montage.create(Component, {
911 break; 911 break;
912 //////////////////////////////////////////////////////// 912 ////////////////////////////////////////////////////////
913 default: 913 default:
914 this.setNoColor(); 914 this.setNoColor(false);
915 break; 915 break;
916 //////////////////////////////////////////////////////// 916 ////////////////////////////////////////////////////////
917 } 917 }
@@ -1300,7 +1300,7 @@ exports.ColorPanelBase = Montage.create(Component, {
1300 update.type = 'change'; 1300 update.type = 'change';
1301 this.colorManager.hsl = update; 1301 this.colorManager.hsl = update;
1302 } else { 1302 } else {
1303 this.colorManager.applyNoColor(); 1303 this.colorManager.applyNoColor(false);
1304 } 1304 }
1305 } else { 1305 } else {
1306 update = this.colorManager.hexToRgb(color); 1306 update = this.colorManager.hexToRgb(color);
@@ -1309,7 +1309,7 @@ exports.ColorPanelBase = Montage.create(Component, {
1309 update.type = 'change'; 1309 update.type = 'change';
1310 this.colorManager.rgb = update; 1310 this.colorManager.rgb = update;
1311 } else { 1311 } else {
1312 this.colorManager.applyNoColor(); 1312 this.colorManager.applyNoColor(false);
1313 } 1313 }
1314 } 1314 }
1315 } 1315 }
@@ -1553,7 +1553,7 @@ exports.ColorPanelBase = Montage.create(Component, {
1553 this.colorManager.hsv = color.c; 1553 this.colorManager.hsv = color.c;
1554 break; 1554 break;
1555 default: 1555 default:
1556 this.colorManager.applyNoColor(); 1556 this.colorManager.applyNoColor(true);
1557 break; 1557 break;
1558 } 1558 }
1559 // 1559 //