diff options
author | Nivesh Rajbhandari | 2012-02-02 13:22:30 -0800 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-02-02 13:22:30 -0800 |
commit | 89d64cf06e170c3c50b02eeadd9dcf10d6efe1a3 (patch) | |
tree | ccfc63ef6f9532151a0b85c9f06981b84c2415b5 /js/controllers/elements | |
parent | c0f43749523f4720ca4c8942fa9ac17753d93a67 (diff) | |
download | ninja-89d64cf06e170c3c50b02eeadd9dcf10d6efe1a3.tar.gz |
Updating Shapes PI to support corner radii. Also fixed PI bug where we were always updating custom section 0.
Signed-off-by: Nivesh Rajbhandari <mqg734@motorola.com>
Diffstat (limited to 'js/controllers/elements')
-rw-r--r-- | js/controllers/elements/shapes-controller.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/js/controllers/elements/shapes-controller.js b/js/controllers/elements/shapes-controller.js index d34644a7..c5f22138 100644 --- a/js/controllers/elements/shapes-controller.js +++ b/js/controllers/elements/shapes-controller.js | |||
@@ -24,6 +24,26 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
24 | el.elementModel.shapeModel.GLGeomObj.setInnerRadius(val/100); | 24 | el.elementModel.shapeModel.GLGeomObj.setInnerRadius(val/100); |
25 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | 25 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); |
26 | break; | 26 | break; |
27 | case "tlRadius": | ||
28 | this.setShapeProperty(el, "tlRadius", value); | ||
29 | el.elementModel.shapeModel.GLGeomObj.setTLRadius(val); | ||
30 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
31 | break; | ||
32 | case "trRadius": | ||
33 | this.setShapeProperty(el, "trRadius", value); | ||
34 | el.elementModel.shapeModel.GLGeomObj.setTRRadius(val); | ||
35 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
36 | break; | ||
37 | case "blRadius": | ||
38 | this.setShapeProperty(el, "blRadius", value); | ||
39 | el.elementModel.shapeModel.GLGeomObj.setBLRadius(val); | ||
40 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
41 | break; | ||
42 | case "brRadius": | ||
43 | this.setShapeProperty(el, "brRadius", value); | ||
44 | el.elementModel.shapeModel.GLGeomObj.setBRRadius(val); | ||
45 | el.elementModel.shapeModel.GLGeomObj.buildBuffers(); | ||
46 | break; | ||
27 | case "width": | 47 | case "width": |
28 | el.elementModel.shapeModel.GLGeomObj.setWidth(val); | 48 | el.elementModel.shapeModel.GLGeomObj.setWidth(val); |
29 | CanvasController.setProperty(el, p, value); | 49 | CanvasController.setProperty(el, p, value); |
@@ -46,8 +66,16 @@ exports.ShapesController = Montage.create(CanvasController, { | |||
46 | getProperty: { | 66 | getProperty: { |
47 | value: function(el, p) { | 67 | value: function(el, p) { |
48 | switch(p) { | 68 | switch(p) { |
69 | case "stroke": | ||
70 | case "fill": | ||
49 | case "strokeSize": | 71 | case "strokeSize": |
50 | case "innerRadius": | 72 | case "innerRadius": |
73 | case "tlRadius": | ||
74 | case "trRadius": | ||
75 | case "blRadius": | ||
76 | case "brRadius": | ||
77 | case "strokeMaterial": | ||
78 | case "fillMaterial": | ||
51 | return this.getShapeProperty(el, p); | 79 | return this.getShapeProperty(el, p); |
52 | default: | 80 | default: |
53 | return CanvasController.getProperty(el, p); | 81 | return CanvasController.getProperty(el, p); |