aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-07-09 11:43:36 -0700
committerNivesh Rajbhandari2012-07-09 11:43:36 -0700
commitac27d538af33ca8d67d3d88729f49c05793afda7 (patch)
tree4be9251ff087e93a37b1f463ae9eaaaf779caeeb /js/controllers
parenteff1851b2189bea8b89065980d02541cecea5ddf (diff)
downloadninja-ac27d538af33ca8d67d3d88729f49c05793afda7.tar.gz
PI, drawing and editing fixes for shapes and materials.
IKNinja-1841 - Cannot change webgl shape with LinearGradient and RadialGradient to solid color. IKNINJA-1851 - Cannot draw webgl shapes with Linear/RadialGradient material. IKNINJA-1864 - PI doesn't update the color of shape if WebGL material switches to Flat. IKNINJA-1886 - Gradient edits not applied to WebGL Stage object. Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js15
1 files changed, 6 insertions, 9 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index c3099459..636482f5 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -858,15 +858,12 @@ exports.ShapesController = Montage.create(CanvasController, {
858 value: function(m) 858 value: function(m)
859 { 859 {
860 var css, 860 var css,
861 colorObj; 861 colorObj,
862 if(m === "Linear Gradient") 862 material;
863 { 863
864 css = "-webkit-gradient(linear, left top, right top, from(rgb(255, 0, 0)), color-stop(0.3, rgb(0, 255, 0)), color-stop(0.6, rgb(0, 0, 255)), to(rgb(0, 255, 255)))"; 864 material = MaterialsModel.getMaterial(m);
865 } 865
866 else if(m === "Radial Gradient") 866 css = material.getGradientData();
867 {
868 css = "-webkit-radial-gradient(50% 50%, ellipse cover, rgb(255, 0, 0) 0%, rgb(0, 255, 0) 30%, rgb(0, 0, 255) 60%, rgb(0, 255, 255) 100%)";
869 }
870 867
871 if(css) 868 if(css)
872 { 869 {