aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-22 16:18:38 -0700
committerNivesh Rajbhandari2012-03-22 16:18:38 -0700
commite52b0dcb9540b854a341a881de2d26aa753e9a82 (patch)
tree75cf1a4d40e300ccd4377439f1c42ee434ac50c3 /js/controllers/elements
parent686969216c6a2b19b32dc574d0cbcd38b01955f9 (diff)
downloadninja-e52b0dcb9540b854a341a881de2d26aa753e9a82.tar.gz
Adding checkbox in PI to start/stop WebGL animation preview.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-xjs/controllers/elements/shapes-controller.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index b3ac9ddb..9b2fa618 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -105,6 +105,18 @@ exports.ShapesController = Montage.create(CanvasController, {
105 case "editFillMaterial": 105 case "editFillMaterial":
106 NJevent("showMaterialPopup",{materialId : el.elementModel.shapeModel.fillMaterial.getName()}); 106 NJevent("showMaterialPopup",{materialId : el.elementModel.shapeModel.fillMaterial.getName()});
107 break; 107 break;
108 case "animate":
109 if(value)
110 {
111 el.elementModel.shapeModel.animate = true;
112 el.elementModel.shapeModel.GLWorld.restartRenderLoop();
113 }
114 else
115 {
116 el.elementModel.shapeModel.animate = false;
117 el.elementModel.shapeModel.GLWorld._canvas.task.stop();
118 }
119 break;
108 default: 120 default:
109 CanvasController.setProperty(el, p, value); 121 CanvasController.setProperty(el, p, value);
110 } 122 }
@@ -123,6 +135,7 @@ exports.ShapesController = Montage.create(CanvasController, {
123 case "border": 135 case "border":
124 case "background": 136 case "background":
125 case "useWebGl": 137 case "useWebGl":
138 case "animate":
126 return this.getShapeProperty(el, p); 139 return this.getShapeProperty(el, p);
127 case "strokeMaterial": 140 case "strokeMaterial":
128 case "fillMaterial": 141 case "fillMaterial":