aboutsummaryrefslogtreecommitdiff
path: root/js/controllers/elements
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-xjs/controllers/elements/body-controller.js20
1 files changed, 18 insertions, 2 deletions
diff --git a/js/controllers/elements/body-controller.js b/js/controllers/elements/body-controller.js
index 0b6a5bad..bc4d2e42 100755
--- a/js/controllers/elements/body-controller.js
+++ b/js/controllers/elements/body-controller.js
@@ -19,6 +19,14 @@ exports.BodyController = Montage.create(ElementController, {
19 el.elementModel.props3D.matrix3d = mat; 19 el.elementModel.props3D.matrix3d = mat;
20 el.elementModel.props3D.perspectiveDist = dist; 20 el.elementModel.props3D.perspectiveDist = dist;
21 21
22 if(this.application.ninja.currentDocument.model.views.design._template) {
23 if(!MathUtils.isIdentityMatrix(mat)) {
24 el.parentNode.style.backgroundColor = "transparent";
25 } else {
26 el.parentNode.style.removeProperty("background-color");
27 }
28 }
29
22 this.application.ninja.stage.updatedStage = true; 30 this.application.ninja.stage.updatedStage = true;
23 31
24 if(update3DModel) { 32 if(update3DModel) {
@@ -34,7 +42,11 @@ exports.BodyController = Montage.create(ElementController, {
34 case "background-image": 42 case "background-image":
35 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-image")); 43 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-image"));
36 case "background-color": 44 case "background-color":
37 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color")); 45 if(this.application.ninja.currentDocument.model.views.design._template) {
46 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el.parentNode, "background-color"));
47 } else {
48 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color"));
49 }
38 case "border": 50 case "border":
39 return 0; 51 return 0;
40 case "height": 52 case "height":
@@ -56,7 +68,11 @@ exports.BodyController = Montage.create(ElementController, {
56 this.application.ninja.stylesController.setElementStyle(el, "background-image", value); 68 this.application.ninja.stylesController.setElementStyle(el, "background-image", value);
57 break; 69 break;
58 case "background-color": 70 case "background-color":
59 this.application.ninja.stylesController.setElementStyle(el, "background-color", value); 71 if(this.application.ninja.currentDocument.model.views.design._template) {
72 this.application.ninja.stylesController.setElementStyle(el.parentNode, "background-color", value);
73 } else {
74 this.application.ninja.stylesController.setElementStyle(el, "background-color", value);
75 }
60 break; 76 break;
61 case "overflow": 77 case "overflow":
62 case "width": 78 case "width":