diff options
author | Jose Antonio Marquez | 2012-06-25 11:53:19 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-25 11:53:19 -0700 |
commit | 245e70117f9605dc5603328c97685b2e5a10f220 (patch) | |
tree | 063b1b147b246bd93b259a2d84d3bc70928f4174 /js/controllers/elements | |
parent | e74b08a510176d163da9e0bdd771d9b28176a12a (diff) | |
parent | de38cd3479bd5865e058938095120fa3526fc9b3 (diff) | |
download | ninja-245e70117f9605dc5603328c97685b2e5a10f220.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/controllers/elements')
-rwxr-xr-x | js/controllers/elements/body-controller.js | 20 |
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": |