From 8f8f7f9a36fb9abadea2a9f25aef0084946bebc9 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Fri, 4 May 2012 14:42:00 -0700 Subject: Removed special-casing for new template workflow. Instead, we will enforce a width and height on the body in order to do 3d. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/body-controller.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'js/controllers/elements/body-controller.js') diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js index 14aeae24..943594f2 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -28,11 +28,39 @@ exports.BodyController = Montage.create(ElementController, { getProperty: { value: function(el, p) { + switch(p) { + case "background" : + return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", true, true)); + case "border": + return 0; + case "height": + case "width": + case "-webkit-transform-style": + return this.application.ninja.stylesController.getElementStyle(el, p, true, true); + default: + return ElementController.getProperty(el, p, true, true); + //console.log("Undefined Stage property ", p); + } } }, setProperty: { value: function(el, p, value) { + switch(p) { + case "body-background": + case "background": + this.application.ninja.stylesController.setElementStyle(el, "background-color", value, true); + break; + case "overflow": + case "width": + case "height": + case "-webkit-transform-style": + this.application.ninja.stylesController.setElementStyle(el, p, value, true); + this.application.ninja.stage.updatedStage = true; + break; + default: + console.log("Undefined property ", p, "for the Body Controller"); + } } }, -- cgit v1.2.3