aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
authorNivesh Rajbhandari2012-03-20 10:59:05 -0700
committerNivesh Rajbhandari2012-03-20 11:04:12 -0700
commite1c4f30a4c13d747fa69d78598e0961286bbe571 (patch)
treebb2fb0955d771274f4e62b47280b95a8493e5aaf /js/controllers/elements
parente33b3ce6f7b6789cfe854d4a6a8bb5bd57b8ae37 (diff)
downloadninja-e1c4f30a4c13d747fa69d78598e0961286bbe571.tar.gz
Support button control in Properties Panel and use them for edit fill and stroke material.
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, 9 insertions, 4 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js
index d72d9c14..b3ac9ddb 100755
--- a/js/controllers/elements/shapes-controller.js
+++ b/js/controllers/elements/shapes-controller.js
@@ -6,10 +6,9 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
6 6
7var Montage = require("montage/core/core").Montage, 7var Montage = require("montage/core/core").Montage,
8 CanvasController = require("js/controllers/elements/canvas-controller").CanvasController, 8 CanvasController = require("js/controllers/elements/canvas-controller").CanvasController,
9 njModule = require("js/lib/NJUtils"); 9 njModule = require("js/lib/NJUtils"),
10 10 World = require("js/lib/drawing/world").World,
11var World = require("js/lib/drawing/world").World; 11 MaterialsModel = require("js/models/materials-model").MaterialsModel;
12var MaterialsModel = require("js/models/materials-model").MaterialsModel;
13 12
14exports.ShapesController = Montage.create(CanvasController, { 13exports.ShapesController = Montage.create(CanvasController, {
15 14
@@ -100,6 +99,12 @@ exports.ShapesController = Montage.create(CanvasController, {
100 el.elementModel.shapeModel.GLWorld.render(); 99 el.elementModel.shapeModel.GLWorld.render();
101 } 100 }
102 break; 101 break;
102 case "editStrokeMaterial":
103 NJevent("showMaterialPopup",{materialId : el.elementModel.shapeModel.strokeMaterial.getName()});
104 break;
105 case "editFillMaterial":
106 NJevent("showMaterialPopup",{materialId : el.elementModel.shapeModel.fillMaterial.getName()});
107 break;
103 default: 108 default:
104 CanvasController.setProperty(el, p, value); 109 CanvasController.setProperty(el, p, value);
105 } 110 }