From 89d64cf06e170c3c50b02eeadd9dcf10d6efe1a3 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 2 Feb 2012 13:22:30 -0800 Subject: Updating Shapes PI to support corner radii. Also fixed PI bug where we were always updating custom section 0. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/shapes-controller.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'js/controllers/elements') 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, { el.elementModel.shapeModel.GLGeomObj.setInnerRadius(val/100); el.elementModel.shapeModel.GLGeomObj.buildBuffers(); break; + case "tlRadius": + this.setShapeProperty(el, "tlRadius", value); + el.elementModel.shapeModel.GLGeomObj.setTLRadius(val); + el.elementModel.shapeModel.GLGeomObj.buildBuffers(); + break; + case "trRadius": + this.setShapeProperty(el, "trRadius", value); + el.elementModel.shapeModel.GLGeomObj.setTRRadius(val); + el.elementModel.shapeModel.GLGeomObj.buildBuffers(); + break; + case "blRadius": + this.setShapeProperty(el, "blRadius", value); + el.elementModel.shapeModel.GLGeomObj.setBLRadius(val); + el.elementModel.shapeModel.GLGeomObj.buildBuffers(); + break; + case "brRadius": + this.setShapeProperty(el, "brRadius", value); + el.elementModel.shapeModel.GLGeomObj.setBRRadius(val); + el.elementModel.shapeModel.GLGeomObj.buildBuffers(); + break; case "width": el.elementModel.shapeModel.GLGeomObj.setWidth(val); CanvasController.setProperty(el, p, value); @@ -46,8 +66,16 @@ exports.ShapesController = Montage.create(CanvasController, { getProperty: { value: function(el, p) { switch(p) { + case "stroke": + case "fill": case "strokeSize": case "innerRadius": + case "tlRadius": + case "trRadius": + case "blRadius": + case "brRadius": + case "strokeMaterial": + case "fillMaterial": return this.getShapeProperty(el, p); default: return CanvasController.getProperty(el, p); -- cgit v1.2.3 From d41dee0c552a30724a146965ae4272a268777fc5 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 2 Feb 2012 14:53:14 -0800 Subject: Integrating Pan and Zoom tool and snap manager fixes. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/canvas-controller.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'js/controllers/elements') diff --git a/js/controllers/elements/canvas-controller.js b/js/controllers/elements/canvas-controller.js index 21de9879..b5df3911 100644 --- a/js/controllers/elements/canvas-controller.js +++ b/js/controllers/elements/canvas-controller.js @@ -34,12 +34,12 @@ exports.CanvasController = Montage.create(ElementController, { } } }, - - setProperties: { - value: function(el, props, index) { - for(var p in props) { - el.elementModel.controller.setProperty(el, p, props[p][index]); - } - } + + setProperties: { + value: function(el, props, index) { + for(var p in props) { + el.elementModel.controller.setProperty(el, p, props[p][index]); + } + } } }); \ No newline at end of file -- cgit v1.2.3