aboutsummaryrefslogtreecommitdiff
path: root/js/components
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-25 11:52:28 -0700
committerJose Antonio Marquez2012-06-25 11:52:28 -0700
commitb435e97ff312eea15086069ce0ab6991acac32ff (patch)
tree542366a4fcd2df043ce91ec7a765ed18511bb70b /js/components
parent32c41a56fd870f28be70c9b9cfb4fe6dfbb16654 (diff)
downloadninja-b435e97ff312eea15086069ce0ab6991acac32ff.tar.gz
Color Popup Test Candidate
Preliminary check in for testing to commence on new color popup functionality.
Diffstat (limited to 'js/components')
-rwxr-xr-xjs/components/gradientpicker.reel/gradientpicker.js2
-rwxr-xr-xjs/components/ui/color-chip.reel/color-chip.js6
2 files changed, 6 insertions, 2 deletions
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js
index 9acd24ac..853d77f9 100755
--- a/js/components/gradientpicker.reel/gradientpicker.js
+++ b/js/components/gradientpicker.reel/gradientpicker.js
@@ -160,7 +160,7 @@ exports.GradientPicker = Montage.create(Component, {
160 //Initialing button with color data 160 //Initialing button with color data
161 button.color(data.color.mode, data.color.value); 161 button.color(data.color.mode, data.color.value);
162 //Button popup data 162 //Button popup data
163 button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: true, gradient: false, image: false, offset: -84, gradientPopup: true, history: false}; 163 button.props = {side: 'top', align: 'center', nocolor: false, wheel: true, palette: false, gradient: false, image: false, offset: -84, gradientPopup: true, history: false};
164 //Listening for color events from button 164 //Listening for color events from button
165 button.addEventListener('change', this, false); 165 button.addEventListener('change', this, false);
166 //Dispatching event depending on type of mode 166 //Dispatching event depending on type of mode
diff --git a/js/components/ui/color-chip.reel/color-chip.js b/js/components/ui/color-chip.reel/color-chip.js
index a684d0db..dd786d15 100755
--- a/js/components/ui/color-chip.reel/color-chip.js
+++ b/js/components/ui/color-chip.reel/color-chip.js
@@ -82,7 +82,11 @@ var ColorChip = exports.ColorChip = Montage.create(Component, {
82 // This is a single chip - Not related to the color panel -- Set the initial color if found 82 // This is a single chip - Not related to the color panel -- Set the initial color if found
83 var mode = "rgb", r = 0, g = 0, b = 0, a = 1, css = "rgb(0,0,0)"; 83 var mode = "rgb", r = 0, g = 0, b = 0, a = 1, css = "rgb(0,0,0)";
84 84
85 if(this.color) { 85 if(this.color && this.color.color) {
86 var g = this.color.color;
87 g.wasSetByCode = true;
88 this.chipBtn.color(this.color.mode, g);
89 } else if (this.color) {
86 var colorObj = this.application.ninja.colorController.getColorObjFromCss(this.color.css); 90 var colorObj = this.application.ninja.colorController.getColorObjFromCss(this.color.css);
87 mode = colorObj.mode; 91 mode = colorObj.mode;
88 r = colorObj.value.r; 92 r = colorObj.value.r;