aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-09 16:00:17 -0800
committerNivesh Rajbhandari2012-03-09 16:00:17 -0800
commitf7bc2dc545765247e5139c0e7c92523747cb1362 (patch)
tree7b49092afbfb0825195724beb88b5559859b7fc1 /js
parenta782acfbbf2d1ac5630c2cae5affcc369ba99785 (diff)
parent69d90467865a1384725b2301901be2180c5a841f (diff)
downloadninja-f7bc2dc545765247e5139c0e7c92523747cb1362.tar.gz
Merge branch 'refs/heads/ninja-internal' into WebGLFixes
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/gradientpicker.reel/gradientpicker.js1
-rwxr-xr-xjs/controllers/color-controller.js4
-rwxr-xr-xjs/panels/Color/colorpanelpopup.reel/colorpanelpopup.js13
3 files changed, 12 insertions, 6 deletions
diff --git a/js/components/gradientpicker.reel/gradientpicker.js b/js/components/gradientpicker.reel/gradientpicker.js
index cedeef50..da4e8c0f 100755
--- a/js/components/gradientpicker.reel/gradientpicker.js
+++ b/js/components/gradientpicker.reel/gradientpicker.js
@@ -397,7 +397,6 @@ exports.GradientPicker = Montage.create(Component, {
397 actionEvent.initEvent(type, true, true); 397 actionEvent.initEvent(type, true, true);
398 actionEvent.type = type; 398 actionEvent.type = type;
399 actionEvent.wasSetByCode = userInitiated; 399 actionEvent.wasSetByCode = userInitiated;
400 // TODO - mode seems to get reset to "rgb", so also setting a gradientMode property
401 actionEvent.gradient = {stops: this.value, mode: this.mode, gradientMode: this.mode, css: css}; 400 actionEvent.gradient = {stops: this.value, mode: this.mode, gradientMode: this.mode, css: css};
402 this.dispatchEvent(actionEvent); 401 this.dispatchEvent(actionEvent);
403 } 402 }
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js
index a6e41dd3..53573baf 100755
--- a/js/controllers/color-controller.js
+++ b/js/controllers/color-controller.js
@@ -259,6 +259,7 @@ exports.ColorController = Montage.create(Component, {
259 //Radial gradient 259 //Radial gradient
260 gradient.stops = []; 260 gradient.stops = [];
261 gradient.mode = 'radial'; 261 gradient.mode = 'radial';
262 gradient.gradientMode = 'radial';
262 gradient.css = css; 263 gradient.css = css;
263 // 264 //
264 arr = css.split('%,'); 265 arr = css.split('%,');
@@ -284,6 +285,7 @@ exports.ColorController = Montage.create(Component, {
284 //Linear gradient 285 //Linear gradient
285 gradient.stops = []; 286 gradient.stops = [];
286 gradient.mode = 'linear'; 287 gradient.mode = 'linear';
288 gradient.gradientMode = 'linear';
287 gradient.css = css; 289 gradient.css = css;
288 // 290 //
289 arr = css.split('from('); 291 arr = css.split('from(');
@@ -317,7 +319,7 @@ exports.ColorController = Montage.create(Component, {
317 } 319 }
318 } 320 }
319 //Creating gradient object 321 //Creating gradient object
320 color = {mode: 'gradient', value: {stops: gradient.stops, mode: gradient.mode, css: css}}; 322 color = {mode: 'gradient', value: {stops: gradient.stops, mode: gradient.mode, gradientMode: gradient.gradientMode, css: css}};
321 } else if (css){ 323 } else if (css){
322 //Simple solid color 324 //Simple solid color
323 color = this.parseCssToColor(css); 325 color = this.parseCssToColor(css);
diff --git a/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js b/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js
index 299e603d..3eae3ea3 100755
--- a/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js
+++ b/js/panels/Color/colorpanelpopup.reel/colorpanelpopup.js
@@ -379,11 +379,16 @@ exports.ColorPanelPopup = Montage.create(Component, {
379 gradient.element = container; 379 gradient.element = container;
380 gradient.hack = this.hack; // TODO: Remove 380 gradient.hack = this.hack; // TODO: Remove
381 // 381 //
382 if (g && g.value && g.value.stops && g.value.mode) { 382 if (g && g.value && g.value.stops) {
383 gradient._mode = g.value.mode; 383 if (g.value.gradientMode) {
384 gradient.value = g.value.stops; 384 gradient._mode = g.value.gradientMode;
385 gradient.value = g.value.stops;
386 } else {
387 gradient._mode = 'linear';
388 gradient.value = g.value.stops;
389 }
385 } else { 390 } else {
386 gradient._mode = this.defaultGradient.mode; 391 gradient._mode = this.defaultGradient.gradientMode;
387 gradient.value = this.defaultGradient.stops; 392 gradient.value = this.defaultGradient.stops;
388 } 393 }
389 // 394 //