diff options
author | Jonathan Duran | 2012-06-25 13:40:37 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-06-25 13:40:37 -0700 |
commit | 8b46c251664a45039db355075bce85ddfd345269 (patch) | |
tree | 0de66b839b0c9107077705ee6f5efe737725207d /js/controllers/elements | |
parent | da3d11366fa6f42a99cbd8998eebd5fe572b76bc (diff) | |
parent | 4e5331c9967d4a24df56160188cc916a4051052b (diff) | |
download | ninja-8b46c251664a45039db355075bce85ddfd345269.tar.gz |
Merge branch 'refs/heads/NINJAmaster' into Timeline-bugfix1
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": |