aboutsummaryrefslogtreecommitdiff
path: root/js/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'js/controllers')
-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 0ca6c417..604b22d0 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) {
@@ -32,7 +40,11 @@ exports.BodyController = Montage.create(ElementController, {
32 switch(p) { 40 switch(p) {
33 case "background" : 41 case "background" :
34 case "background-color": 42 case "background-color":
35 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color")); 43 if(this.application.ninja.currentDocument.model.views.design._template) {
44 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el.parentNode, "background-color"));
45 } else {
46 return this.application.ninja.colorController.getColorObjFromCss(this.application.ninja.stylesController.getElementStyle(el, "background-color"));
47 }
36 case "border": 48 case "border":
37 return 0; 49 return 0;
38 case "height": 50 case "height":
@@ -51,7 +63,11 @@ exports.BodyController = Montage.create(ElementController, {
51 switch(p) { 63 switch(p) {
52 case "background": 64 case "background":
53 case "background-color": 65 case "background-color":
54 this.application.ninja.stylesController.setElementStyle(el, "background-color", value); 66 if(this.application.ninja.currentDocument.model.views.design._template) {
67 this.application.ninja.stylesController.setElementStyle(el.parentNode, "background-color", value);
68 } else {
69 this.application.ninja.stylesController.setElementStyle(el, "background-color", value);
70 }
55 break; 71 break;
56 case "overflow": 72 case "overflow":
57 case "width": 73 case "width":