aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/properties.reel')
-rwxr-xr-xjs/panels/properties.reel/properties.css5
-rwxr-xr-xjs/panels/properties.reel/properties.js16
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js2
3 files changed, 13 insertions, 10 deletions
diff --git a/js/panels/properties.reel/properties.css b/js/panels/properties.reel/properties.css
index f82d3660..0928da3a 100755
--- a/js/panels/properties.reel/properties.css
+++ b/js/panels/properties.reel/properties.css
@@ -47,6 +47,11 @@ padding-right:6px;
47 47
48} 48}
49 49
50.propertiesPanel button.nj-skinned {
51 margin-left: -12px;
52 margin-top: -3px;
53}
54
50.propertiesPanel hr { 55.propertiesPanel hr {
51 border: 0; 56 border: 0;
52 border-top: 1px solid #3c3c3c; 57 border-top: 1px solid #3c3c3c;
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 }
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 0d3d111d..dcba51a4 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
@@ -245,7 +245,7 @@ exports.ThreeD = Montage.create(Component, {
245 _getSelectedItem: { 245 _getSelectedItem: {
246 value: function(els) { 246 value: function(els) {
247 if(els.length) { 247 if(els.length) {
248 return els[0]._element || els[0]; 248 return els[0];
249 } else { 249 } else {
250 return this.boundObject.application.ninja.currentDocument.documentRoot; 250 return this.boundObject.application.ninja.currentDocument.documentRoot;
251 } 251 }