aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-04-04 11:50:54 -0700
committerJose Antonio Marquez2012-04-04 11:50:54 -0700
commit0a469a14757b8cea262c21f652e75c85c9903f4b (patch)
treec388fdc93e9707e7d66f51ef41eb1d9b366716c7 /js/panels/properties.reel
parent6034e3aa1d033149ba9ca8f0578e0a95889a7e46 (diff)
parent8482e23cd9b8c4700b5130f2588e5eb24d376536 (diff)
downloadninja-0a469a14757b8cea262c21f652e75c85c9903f4b.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-xjs/panels/properties.reel/properties.js16
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js2
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 }