diff options
author | Ananya Sen | 2012-04-04 13:20:15 -0700 |
---|---|---|
committer | Ananya Sen | 2012-04-04 13:20:15 -0700 |
commit | 22ade57a30b45774882028eef4ab5a5bffe1a624 (patch) | |
tree | 52e589450eeb8adf7e11b66bd222fec5fa66c963 /js/panels/properties.reel | |
parent | bec4cde986975d1cc5f1d2791fdb18548fc2d72a (diff) | |
parent | 8482e23cd9b8c4700b5130f2588e5eb24d376536 (diff) | |
download | ninja-22ade57a30b45774882028eef4ab5a5bffe1a624.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Codeview-improvements
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-x | js/panels/properties.reel/properties.js | 16 | ||||
-rwxr-xr-x | js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | 2 |
2 files changed, 8 insertions, 10 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js index 40e9b86a..d5acd503 100755 --- a/js/panels/properties.reel/properties.js +++ b/js/panels/properties.reel/properties.js | |||
@@ -87,7 +87,7 @@ exports.Properties = Montage.create(Component, { | |||
87 | this.displayStageProperties(); | 87 | this.displayStageProperties(); |
88 | } else { | 88 | } else { |
89 | if(this.application.ninja.selectedElements.length === 1) { | 89 | if(this.application.ninja.selectedElements.length === 1) { |
90 | this.displayElementProperties(this.application.ninja.selectedElements[0]._element); | 90 | this.displayElementProperties(this.application.ninja.selectedElements[0]); |
91 | } else { | 91 | } else { |
92 | this.displayGroupProperties(this.application.ninja.selectedElements); | 92 | this.displayGroupProperties(this.application.ninja.selectedElements); |
93 | } | 93 | } |
@@ -120,7 +120,6 @@ exports.Properties = Montage.create(Component, { | |||
120 | } else if(event.target.id === "elementClass") { | 120 | } else if(event.target.id === "elementClass") { |
121 | if(this.application.ninja.selectedElements.length) { | 121 | if(this.application.ninja.selectedElements.length) { |
122 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); | 122 | ElementsMediator.setAttribute(this.application.ninja.selectedElements[0], "class", this.elementClass.value, "Change", "pi"); |
123 | console.log(this.application.ninja.selectedElements[0]._element.className); | ||
124 | } else { | 123 | } else { |
125 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); | 124 | ElementsMediator.setAttribute(this.application.ninja.currentDocument.documentRoot, "class", this.elementClass.value, "Change", "pi", this.application.ninja.currentDocument.documentRoot.elementModel.elementClass); |
126 | } | 125 | } |
@@ -138,8 +137,8 @@ exports.Properties = Montage.create(Component, { | |||
138 | 137 | ||
139 | handleElementChanging: { | 138 | handleElementChanging: { |
140 | value: function(event) { | 139 | value: function(event) { |
141 | // this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "left")); | 140 | // this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0], "left")); |
142 | // this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0]._element, "top")); | 141 | // this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(this.application.ninja.selectedElements[0], "top")); |
143 | } | 142 | } |
144 | }, | 143 | }, |
145 | 144 | ||
@@ -148,23 +147,22 @@ exports.Properties = Montage.create(Component, { | |||
148 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update | 147 | // console.log("Element Change PI ", event.detail.source); // If the event comes from the pi don't need to update |
149 | if(event.detail.source && event.detail.source !== "pi") { | 148 | if(event.detail.source && event.detail.source !== "pi") { |
150 | // TODO - This should only update the properties that were changed. | 149 | // TODO - This should only update the properties that were changed. |
151 | var el = this.application.ninja.selectedElements[0]._element || this.application.ninja.selectedElements[0]; | 150 | var el = this.application.ninja.selectedElements[0]; |
152 | this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); | 151 | this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); |
153 | this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); | 152 | this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); |
154 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); | 153 | this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); |
155 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); | 154 | this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); |
156 | 155 | ||
157 | if(this.threeD.inGlobalMode) | 156 | if(this.threeD.inGlobalMode) { |
158 | { | ||
159 | this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); | 157 | this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); |
160 | this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D"); | 158 | this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D"); |
161 | this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D"); | 159 | this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D"); |
162 | this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle"); | 160 | this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle"); |
163 | this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle"); | 161 | this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle"); |
164 | this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle"); | 162 | this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle"); |
163 | } | ||
165 | } | 164 | } |
166 | } | 165 | } |
167 | } | ||
168 | }, | 166 | }, |
169 | 167 | ||
170 | handleSelectionChange: { | 168 | handleSelectionChange: { |
@@ -173,7 +171,7 @@ exports.Properties = Montage.create(Component, { | |||
173 | this.displayStageProperties(); | 171 | this.displayStageProperties(); |
174 | } else { | 172 | } else { |
175 | if(this.application.ninja.selectedElements.length === 1) { | 173 | if(this.application.ninja.selectedElements.length === 1) { |
176 | this.displayElementProperties(this.application.ninja.selectedElements[0]._element); | 174 | this.displayElementProperties(this.application.ninja.selectedElements[0]); |
177 | } else { | 175 | } else { |
178 | this.displayGroupProperties(this.application.ninja.selectedElements); | 176 | this.displayGroupProperties(this.application.ninja.selectedElements); |
179 | } | 177 | } |
diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js index 35591afa..f72d1ff6 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | |||
@@ -231,7 +231,7 @@ exports.ThreeD = Montage.create(Component, { | |||
231 | _getSelectedItem: { | 231 | _getSelectedItem: { |
232 | value: function(els) { | 232 | value: function(els) { |
233 | if(els.length) { | 233 | if(els.length) { |
234 | return els[0]._element || els[0]; | 234 | return els[0]; |
235 | } else { | 235 | } else { |
236 | return this.boundObject.application.ninja.currentDocument.documentRoot; | 236 | return this.boundObject.application.ninja.currentDocument.documentRoot; |
237 | } | 237 | } |