aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/shapes-controller.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-07-09 12:15:26 -0700
committerValerio Virgillito2012-07-09 12:15:26 -0700
commit1839f24e8dcbad38d1381bbcd65c17a9caa45987 (patch)
tree516a29ca99d4aae0d5228223fff438c1a3c4e0d3 /js/controllers/elements/shapes-controller.js
parentaedd14b18695d031f695d27dfbd94df5614495bb (diff)
parentfebfdb18042d1c73ac58ee4e35c5f176428dee00 (diff)
downloadninja-1839f24e8dcbad38d1381bbcd65c17a9caa45987.tar.gz
Merge pull request #346 from mqg734/MaterialsUI
UI support for preview, edit, duplicate and delete of WebGL Materials.
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-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 a0d3c0d6..df6edeb0 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -882,15 +882,12 @@ exports.ShapesController = Montage.create(CanvasController, {
882 value: function(m) 882 value: function(m)
883 { 883 {
884 var css, 884 var css,
885 colorObj; 885 colorObj,
886 if(m === "Linear Gradient") 886 material;
887 { 887
888 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)))"; 888 material = MaterialsModel.getMaterial(m);
889 } 889
890 else if(m === "Radial Gradient") 890 css = material.getGradientData();
891 {
892 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%)";
893 }
894 891
895 if(css) 892 if(css)
896 { 893 {