aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-25 16:52:25 -0700
committerJose Antonio Marquez2012-06-25 16:52:25 -0700
commit6a437087e6956904c3b4ff6a09f3cb61d2feb94d (patch)
treefec7e120300ca8c05543b34a38442ccd3d87edb5 /js/panels
parentb5a3d34eadedbbbdd77636a32dbe56902b57c4e3 (diff)
downloadninja-6a437087e6956904c3b4ff6a09f3cb61d2feb94d.tar.gz
Adding default values to chip
This is a fallback is null and alpha is changed.
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/color/colorpopup-manager.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/js/panels/color/colorpopup-manager.js b/js/panels/color/colorpopup-manager.js
index 01727446..a8e3ba6c 100755
--- a/js/panels/color/colorpopup-manager.js
+++ b/js/panels/color/colorpopup-manager.js
@@ -283,7 +283,11 @@ exports.ColorPopupManager = Montage.create(Component, {
283 ctx.stroke(); 283 ctx.stroke();
284 } 284 }
285 // 285 //
286 this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'}); 286 if (rgb) {
287 this._popupChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'});
288 } else {
289 this._popupChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'});
290 }
287 } 291 }
288 }, 292 },
289 //////////////////////////////////////////////////////////////////// 293 ////////////////////////////////////////////////////////////////////
@@ -322,7 +326,11 @@ exports.ColorPopupManager = Montage.create(Component, {
322 ctx.stroke(); 326 ctx.stroke();
323 } 327 }
324 // 328 //
325 this._popupGradientChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'}); 329 if (rgb) {
330 this._popupGradientChipBtn.color('rgb', {r: rgb.r, g: rgb.g, b: rgb.b, a: alpha, css: 'rgba('+rgb.r+', '+rgb.g+', '+rgb.b+', '+alpha+')'});
331 } else {
332 this._popupGradientChipBtn.color('rgb', {r: 255, g: 255, b: 255, a: alpha, css: 'rgba(255, 255, 255, '+alpha+')'});
333 }
326 } 334 }
327 }, 335 },
328 //////////////////////////////////////////////////////////////////// 336 ////////////////////////////////////////////////////////////////////