diff options
author | Pushkar Joshi | 2012-04-04 15:55:48 -0700 |
---|---|---|
committer | Pushkar Joshi | 2012-04-04 15:55:48 -0700 |
commit | 0681b34b506767b6caf2816b9096bc1a57a17a2d (patch) | |
tree | 20f10c767efe8d9c5c38fbc2cdb713d093bb279d /js/panels/properties.reel/properties.js | |
parent | f4eccf3e7cb76a14a3546a646575162dbd831538 (diff) | |
parent | 8482e23cd9b8c4700b5130f2588e5eb24d376536 (diff) | |
download | ninja-0681b34b506767b6caf2816b9096bc1a57a17a2d.tar.gz |
Merge branch 'master' into pentool
Conflicts:
js/tools/PenTool.js
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 | } |