diff options
author | Nivesh Rajbhandari | 2012-02-22 10:33:25 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-22 10:33:25 -0800 |
commit | a69c929602e64f10fb3903b89a2ca9e9ed2c8dfb (patch) | |
tree | e0b9d069e9888828b2ec15bf757d98aa98a2f3ef /js/controllers/color-controller.js | |
parent | 5b7e903bb0f32d1d59620d1d800ff260f49bfa48 (diff) | |
download | ninja-a69c929602e64f10fb3903b89a2ca9e9ed2c8dfb.tar.gz |
Fixing eyedropper tool to get color from image data. This required us to workaround having inconsistent color object.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers/color-controller.js')
-rwxr-xr-x | js/controllers/color-controller.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/js/controllers/color-controller.js b/js/controllers/color-controller.js index e3b15f1c..a6e41dd3 100755 --- a/js/controllers/color-controller.js +++ b/js/controllers/color-controller.js | |||
@@ -322,7 +322,19 @@ exports.ColorController = Montage.create(Component, { | |||
322 | //Simple solid color | 322 | //Simple solid color |
323 | color = this.parseCssToColor(css); | 323 | color = this.parseCssToColor(css); |
324 | } | 324 | } |
325 | //Returning color object (or null if none) | 325 | // TODO - Hack for inconsistent color object -- some workflows set color.color and some color.value |
326 | if(color) | ||
327 | { | ||
328 | if(color.value && !color.color) | ||
329 | { | ||
330 | color.color = color.value; | ||
331 | } | ||
332 | else if(color.color && !color.value) | ||
333 | { | ||
334 | color.value = color.color; | ||
335 | } | ||
336 | } | ||
337 | //Returning color object (or null if none) | ||
326 | return color; | 338 | return color; |
327 | } | 339 | } |
328 | }, | 340 | }, |