aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements/shapes-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements/shapes-controller.js')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js19
1 files changed, 8 insertions, 11 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index a0d3c0d6..f3ea5c2b 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -28,7 +28,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28POSSIBILITY OF SUCH DAMAGE. 28POSSIBILITY OF SUCH DAMAGE.
29</copyright> */ 29</copyright> */
30 30
31var Montage = require("montage/core/core").Montage, 31var Montage = require("montage/core/core").Montage,
32 CanvasController = require("js/controllers/elements/canvas-controller").CanvasController, 32 CanvasController = require("js/controllers/elements/canvas-controller").CanvasController,
33 njModule = require("js/lib/NJUtils"), 33 njModule = require("js/lib/NJUtils"),
34 World = require("js/lib/drawing/world").World, 34 World = require("js/lib/drawing/world").World,
@@ -300,7 +300,7 @@ exports.ShapesController = Montage.create(CanvasController, {
300 return null; 300 return null;
301 } 301 }
302 break; 302 break;
303 303
304 304
305 case "strokeMaterial": 305 case "strokeMaterial":
306 var sm = el.elementModel.shapeModel.GLGeomObj.getStrokeMaterial(); 306 var sm = el.elementModel.shapeModel.GLGeomObj.getStrokeMaterial();
@@ -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 {