diff options
author | Armen Kesablyan | 2012-04-04 11:34:19 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-04-04 11:34:19 -0700 |
commit | 211f514882144de8df69ebb2106f3b446be1dda0 (patch) | |
tree | c8eaf3d9fc7ac1bc841320e73d41818fbfb5827d /js/panels/properties.reel/properties.js | |
parent | 5a5d0f68dd82b829405a0b301dd11b4cf385c8d5 (diff) | |
parent | a11ef2eed7049835c8bdfa50a2b893632c46eaa0 (diff) | |
download | ninja-211f514882144de8df69ebb2106f3b446be1dda0.tar.gz |
Merge branch 'refs/heads/master' into BugFixes
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-x | js/panels/properties.reel/properties.js | 16 |
1 files changed, 7 insertions, 9 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 | } |