aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/properties.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-xjs/panels/properties.reel/properties.js16
1 files changed, 7 insertions, 9 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index ca720ae7..625e3eb6 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
@@ -149,7 +148,7 @@ exports.Properties = Montage.create(Component, {
149 if(event.detail.source && event.detail.source !== "pi") { 148 if(event.detail.source && event.detail.source !== "pi") {
150 var el = this.application.ninja.currentDocument.documentRoot; 149 var el = this.application.ninja.currentDocument.documentRoot;
151 if(this.application.ninja.selectedElements.length) { 150 if(this.application.ninja.selectedElements.length) {
152 el = this.application.ninja.selectedElements[0]._element || this.application.ninja.selectedElements[0]; 151 el = this.application.ninja.selectedElements[0];
153 } 152 }
154 153
155 // TODO - This should only update the properties that were changed. 154 // TODO - This should only update the properties that were changed.
@@ -158,17 +157,16 @@ exports.Properties = Montage.create(Component, {
158 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); 157 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height"));
159 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); 158 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width"));
160 159
161 if(this.threeD.inGlobalMode) 160 if(this.threeD.inGlobalMode) {
162 {
163 this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D"); 161 this.threeD.x3D = ElementsMediator.get3DProperty(el, "x3D");
164 this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D"); 162 this.threeD.y3D = ElementsMediator.get3DProperty(el, "y3D");
165 this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D"); 163 this.threeD.z3D = ElementsMediator.get3DProperty(el, "z3D");
166 this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle"); 164 this.threeD.xAngle = ElementsMediator.get3DProperty(el, "xAngle");
167 this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle"); 165 this.threeD.yAngle = ElementsMediator.get3DProperty(el, "yAngle");
168 this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle"); 166 this.threeD.zAngle = ElementsMediator.get3DProperty(el, "zAngle");
167 }
169 } 168 }
170 } 169 }
171 }
172 }, 170 },
173 171
174 handleSelectionChange: { 172 handleSelectionChange: {
@@ -177,7 +175,7 @@ exports.Properties = Montage.create(Component, {
177 this.displayStageProperties(); 175 this.displayStageProperties();
178 } else { 176 } else {
179 if(this.application.ninja.selectedElements.length === 1) { 177 if(this.application.ninja.selectedElements.length === 1) {
180 this.displayElementProperties(this.application.ninja.selectedElements[0]._element); 178 this.displayElementProperties(this.application.ninja.selectedElements[0]);
181 } else { 179 } else {
182 this.displayGroupProperties(this.application.ninja.selectedElements); 180 this.displayGroupProperties(this.application.ninja.selectedElements);
183 } 181 }