From e28eb9158a50d7e6d97dbc68066e591ac600c241 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 21:40:44 -0700 Subject: removing all model creators. The elementModel is now a getter that will create a new model when needed. Signed-off-by: Valerio Virgillito --- js/controllers/elements/body-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 7a3a66f5..9c427c62 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -71,7 +71,7 @@ exports.BodyController = Montage.create(ElementController, { getPerspectiveDist: { value: function(el) { - if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { + if(el.elementModel.props3D && el.elementModel.props3D.perspectiveDist) { return el.elementModel.props3D.perspectiveDist; } else { var dist = this.application.ninja.stylesController.getPerspectiveDistFromElement(el, true); @@ -83,7 +83,7 @@ exports.BodyController = Montage.create(ElementController, { getMatrix: { value: function(el) { - if(el.elementModel && el.elementModel.props3D && el.elementModel.props3D.matrix3d) + if(el.elementModel.props3D && el.elementModel.props3D.matrix3d) { return el.elementModel.props3D.matrix3d.slice(0); } -- cgit v1.2.3 From 25d639e6c7dd737f4671011faf07091c86c0e324 Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Thu, 7 Jun 2012 13:13:01 -0700 Subject: fixing the body color chip for non banners templates Signed-off-by: Valerio Virgillito --- js/controllers/elements/body-controller.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (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 9c427c62..a2aa041f 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -30,6 +30,7 @@ exports.BodyController = Montage.create(ElementController, { value: function(el, p) { switch(p) { case "background" : + case "background-color": return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", false, true)); case "border": return 0; @@ -47,8 +48,8 @@ exports.BodyController = Montage.create(ElementController, { setProperty: { value: function(el, p, value) { switch(p) { - case "body-background": case "background": + case "background-color": this.application.ninja.stylesController.setElementStyle(el, "background-color", value); break; case "overflow": -- cgit v1.2.3 From 21098080e7716379ceefefca5f3cc1850ac78fa7 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Thu, 7 Jun 2012 15:17:19 -0700 Subject: Body PI fixes. Signed-off-by: Nivesh Rajbhandari --- js/controllers/elements/body-controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (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 9c427c62..106fdcd0 100755 --- a/js/controllers/elements/body-controller.js +++ b/js/controllers/elements/body-controller.js @@ -30,7 +30,7 @@ exports.BodyController = Montage.create(ElementController, { value: function(el, p) { switch(p) { case "background" : - return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color", false, true)); + return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color")); case "border": return 0; case "height": -- cgit v1.2.3