aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/properties.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-04-09 10:33:35 -0700
committerValerio Virgillito2012-04-09 10:33:35 -0700
commitbd43ce383b050d03b0f92cc923c517febc66ca28 (patch)
tree91b95c6c9aef779a743b710105546a8ae74bff12 /js/panels/properties.reel/properties.js
parent86b98ea086b133f4efb247c39fc6200dcf383a65 (diff)
parentc62c5c4287a1ee8a276b32dc61f06abbc24818ec (diff)
downloadninja-bd43ce383b050d03b0f92cc923c517febc66ca28.tar.gz
Merge pull request #159 from mqg734/WebGLMaterials
3D tools, eyedropper, fill, ink-bucket, gradients and shape fixes.
Diffstat (limited to 'js/panels/properties.reel/properties.js')
-rwxr-xr-xjs/panels/properties.reel/properties.js24
1 files changed, 23 insertions, 1 deletions
diff --git a/js/panels/properties.reel/properties.js b/js/panels/properties.reel/properties.js
index d5acd503..625e3eb6 100755
--- a/js/panels/properties.reel/properties.js
+++ b/js/panels/properties.reel/properties.js
@@ -146,8 +146,12 @@ exports.Properties = Montage.create(Component, {
146 value: function(event) { 146 value: function(event) {
147// 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
148 if(event.detail.source && event.detail.source !== "pi") { 148 if(event.detail.source && event.detail.source !== "pi") {
149 var el = this.application.ninja.currentDocument.documentRoot;
150 if(this.application.ninja.selectedElements.length) {
151 el = this.application.ninja.selectedElements[0];
152 }
153
149 // TODO - This should only update the properties that were changed. 154 // TODO - This should only update the properties that were changed.
150 var el = this.application.ninja.selectedElements[0];
151 this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left")); 155 this.positionSize.leftPosition = parseFloat(ElementsMediator.getProperty(el, "left"));
152 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top")); 156 this.positionSize.topPosition = parseFloat(ElementsMediator.getProperty(el, "top"));
153 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); 157 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height"));
@@ -194,6 +198,19 @@ exports.Properties = Montage.create(Component, {
194 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height")); 198 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(stage, "height"));
195 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width")); 199 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(stage, "width"));
196 200
201 if(this.threeD.inGlobalMode)
202 {
203 this.threeD.xAngle = ElementsMediator.get3DProperty(stage, "xAngle");
204 this.threeD.yAngle = ElementsMediator.get3DProperty(stage, "yAngle");
205 this.threeD.zAngle = ElementsMediator.get3DProperty(stage, "zAngle");
206 }
207
208 if(ElementsMediator.getProperty(stage, "-webkit-transform-style") === "preserve-3d") {
209 this.threeD.flatten = false;
210 } else {
211 this.threeD.flatten = true;
212 }
213
197 if(this.customPi !== stage.elementModel.pi) { 214 if(this.customPi !== stage.elementModel.pi) {
198 // We need to unregister color chips from the previous selection from the Color Model 215 // We need to unregister color chips from the previous selection from the Color Model
199 var len = this.customSections.length; 216 var len = this.customSections.length;
@@ -258,6 +275,11 @@ exports.Properties = Montage.create(Component, {
258 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height")); 275 this.positionSize.heightSize = parseFloat(ElementsMediator.getProperty(el, "height"));
259 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width")); 276 this.positionSize.widthSize = parseFloat(ElementsMediator.getProperty(el, "width"));
260 277
278 if(ElementsMediator.getProperty(el, "-webkit-transform-style") === "preserve-3d") {
279 this.threeD.flatten = false;
280 } else {
281 this.threeD.flatten = true;
282 }
261 283
262 if(this.threeD.inGlobalMode) 284 if(this.threeD.inGlobalMode)
263 { 285 {