diff options
author | Jose Antonio Marquez | 2012-04-10 11:24:35 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-04-10 11:24:35 -0700 |
commit | e663e336ee7e832b5059a82748061506b414cb04 (patch) | |
tree | a09d932319365067f437780e90aeab4ef19f74b4 /js/controllers/elements/stage-controller.js | |
parent | c3022de5ba2e24737184dba7454233b165da0a20 (diff) | |
parent | bd43ce383b050d03b0f92cc923c517febc66ca28 (diff) | |
download | ninja-e663e336ee7e832b5059a82748061506b414cb04.tar.gz |
Merge branch 'refs/heads/Ninja-Internal' into Document
Diffstat (limited to 'js/controllers/elements/stage-controller.js')
-rwxr-xr-x | js/controllers/elements/stage-controller.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/js/controllers/elements/stage-controller.js b/js/controllers/elements/stage-controller.js index 97ea3aa5..dc916b1a 100755 --- a/js/controllers/elements/stage-controller.js +++ b/js/controllers/elements/stage-controller.js | |||
@@ -83,6 +83,12 @@ exports.StageController = Montage.create(ElementController, { | |||
83 | return el.elementModel.stageDimension.style.getProperty(p); | 83 | return el.elementModel.stageDimension.style.getProperty(p); |
84 | case "width": | 84 | case "width": |
85 | return el.elementModel.stageDimension.style.getProperty(p); | 85 | return el.elementModel.stageDimension.style.getProperty(p); |
86 | case "-webkit-transform-style": | ||
87 | if(el.id === "Viewport") { | ||
88 | return this.application.ninja.stylesController.getElementStyle(el, p, false, true); | ||
89 | } else { | ||
90 | return el.elementModel.stageView.style.getProperty(p); | ||
91 | } | ||
86 | default: | 92 | default: |
87 | return ElementController.getProperty(el, p, false, true); | 93 | return ElementController.getProperty(el, p, false, true); |
88 | //console.log("Undefined Stage property ", p); | 94 | //console.log("Undefined Stage property ", p); |
@@ -111,6 +117,9 @@ exports.StageController = Montage.create(ElementController, { | |||
111 | this.application.ninja.currentDocument.iframe.height = parseInt(value) + 400; | 117 | this.application.ninja.currentDocument.iframe.height = parseInt(value) + 400; |
112 | el.elementModel.stageDimension.style.setProperty(p, value); | 118 | el.elementModel.stageDimension.style.setProperty(p, value); |
113 | break; | 119 | break; |
120 | case "-webkit-transform-style": | ||
121 | el.elementModel.stageView.style.setProperty(p, value); | ||
122 | break; | ||
114 | default: | 123 | default: |
115 | console.log("Undefined property ", p, "for the Stage Controller"); | 124 | console.log("Undefined property ", p, "for the Stage Controller"); |
116 | } | 125 | } |
@@ -143,11 +152,10 @@ exports.StageController = Montage.create(ElementController, { | |||
143 | 152 | ||
144 | if (el) | 153 | if (el) |
145 | { | 154 | { |
146 | var xformStr = this.application.ninja.elementMediator.getProperty(el, "-webkit-transform"); | 155 | mat = this.application.ninja.stylesController.getMatrixFromElement(el, true); |
147 | if (xformStr) | 156 | if (!mat) { |
148 | mat = this.transformStringToMat( xformStr ); | ||
149 | if (!mat) | ||
150 | mat = Matrix.I(4); | 157 | mat = Matrix.I(4); |
158 | } | ||
151 | 159 | ||
152 | var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom"); | 160 | var zoom = this.application.ninja.elementMediator.getProperty(el, "zoom"); |
153 | if (zoom) | 161 | if (zoom) |