aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-02-07 13:30:08 -0800
committerNivesh Rajbhandari2012-02-07 13:30:08 -0800
commit3a8875c288049b466bfeb8b7f0510fd8cbfb970d (patch)
treeebe632aa3960a5f93f89fbed22b8ef0ecd9f82e7 /js/controllers
parent8ad767b61460984a4031ba630f76ac8247a61857 (diff)
downloadninja-3a8875c288049b466bfeb8b7f0510fd8cbfb970d.tar.gz
Supporting switching materials in the PI. Also, moved makeFillMaterial and makeStrokeMaterial functions into GLGeomObj so shapes other than GLRectangle can use these routines.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers')
-rw-r--r--js/controllers/elements/shapes-controller.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index 21373aca..c6722dee 100644
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -108,7 +108,15 @@ exports.ShapesController = Montage.create(CanvasController, {
108 return this.getShapeProperty(el, p); 108 return this.getShapeProperty(el, p);
109 case "strokeMaterial": 109 case "strokeMaterial":
110 case "fillMaterial": 110 case "fillMaterial":
111 return this.getShapeProperty(el, p).getName(); 111 var m = this.getShapeProperty(el, p);
112 if(m)
113 {
114 return this.getShapeProperty(el, p).getName();
115 }
116 else
117 {
118 return "FlatMaterial";
119 }
112 default: 120 default:
113 return CanvasController.getProperty(el, p); 121 return CanvasController.getProperty(el, p);
114 } 122 }