diff options
author | Nivesh Rajbhandari | 2012-04-16 16:06:24 -0700 |
---|---|---|
committer | Nivesh Rajbhandari | 2012-04-16 16:06:24 -0700 |
commit | c253192a08b499ea7be46fa5438d273e51f7ec5a (patch) | |
tree | 18a1f0e3679c0eb993a9dedb537035d3861f49ac /js/panels/properties.reel/sections/three-d-view.reel | |
parent | e19376c54eedd1f1c457ba405b2f110be376a559 (diff) | |
parent | 4b900ea5cd6bb77eb30cec8c03b9ec9fa662c1e9 (diff) | |
download | ninja-c253192a08b499ea7be46fa5438d273e51f7ec5a.tar.gz |
Merge branch 'refs/heads/ninja-internal' into WebGLFixes
Diffstat (limited to 'js/panels/properties.reel/sections/three-d-view.reel')
-rwxr-xr-x | js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html | 28 | ||||
-rwxr-xr-x | js/panels/properties.reel/sections/three-d-view.reel/three-d-view.js | 16 |
2 files changed, 41 insertions, 3 deletions
diff --git a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html index 18a7369e..b6c25baf 100755 --- a/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html +++ b/js/panels/properties.reel/sections/three-d-view.reel/three-d-view.html | |||
@@ -22,7 +22,8 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
22 | "xAngleControl": {"@": "threeDRotX"}, | 22 | "xAngleControl": {"@": "threeDRotX"}, |
23 | "yAngleControl": {"@": "threeDRotY"}, | 23 | "yAngleControl": {"@": "threeDRotY"}, |
24 | "zAngleControl": {"@": "threeDRotZ"}, | 24 | "zAngleControl": {"@": "threeDRotZ"}, |
25 | "axisModeGroupControl": {"@": "axisModeGroup"} | 25 | "axisModeGroupControl": {"@": "axisModeGroup"}, |
26 | "flattenControl": {"@": "flattenCheckbox"} | ||
26 | } | 27 | } |
27 | }, | 28 | }, |
28 | 29 | ||
@@ -242,6 +243,29 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
242 | "value": "Global", | 243 | "value": "Global", |
243 | "group": {"@": "axisModeGroup"} | 244 | "group": {"@": "axisModeGroup"} |
244 | } | 245 | } |
246 | }, | ||
247 | "flattenCheckbox": { | ||
248 | "module": "montage/ui/checkbox.reel", | ||
249 | "name": "Checkbox", | ||
250 | "properties": { | ||
251 | "element": {"#": "flattenCh"}, | ||
252 | "identifier": "flatten", | ||
253 | "checked": false | ||
254 | }, | ||
255 | "bindings": { | ||
256 | "checked": { | ||
257 | "boundObject": {"@": "owner"}, | ||
258 | "boundObjectPropertyPath": "flatten", | ||
259 | "oneway": false | ||
260 | } | ||
261 | }, | ||
262 | "listeners": [ | ||
263 | { | ||
264 | "type": "action", | ||
265 | "listener": {"@": "owner"}, | ||
266 | "capture": false | ||
267 | } | ||
268 | ] | ||
245 | } | 269 | } |
246 | } | 270 | } |
247 | </script> | 271 | </script> |
@@ -335,7 +359,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot | |||
335 | <article class="fieldRow oneCol checkbox"> | 359 | <article class="fieldRow oneCol checkbox"> |
336 | <div> | 360 | <div> |
337 | <div class="inputField"> | 361 | <div class="inputField"> |
338 | <input class="nj-skinned" type="checkbox" /> | 362 | <input id="flattenCh" class="nj-skinned" type="checkbox" /> |
339 | </div> | 363 | </div> |
340 | <div> | 364 | <div> |
341 | <label> Flatten</label> | 365 | <label> Flatten</label> |
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 35591afa..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 | |||
@@ -79,6 +79,10 @@ exports.ThreeD = Montage.create(Component, { | |||
79 | value: 0 | 79 | value: 0 |
80 | }, | 80 | }, |
81 | 81 | ||
82 | flatten: { | ||
83 | value: false | ||
84 | }, | ||
85 | |||
82 | _disableTranslation: { | 86 | _disableTranslation: { |
83 | value: true | 87 | value: true |
84 | }, | 88 | }, |
@@ -107,6 +111,16 @@ exports.ThreeD = Montage.create(Component, { | |||
107 | value: null | 111 | value: null |
108 | }, | 112 | }, |
109 | 113 | ||
114 | handleAction: { | ||
115 | value: function(event) { | ||
116 | if(event.currentTarget.identifier === "flatten") { | ||
117 | this.application.ninja.elementMediator.setProperty([this.item], | ||
118 | "-webkit-transform-style", | ||
119 | event.currentTarget.checked ? ["flat"] : ["preserve-3d"]); | ||
120 | } | ||
121 | } | ||
122 | }, | ||
123 | |||
110 | handleChange: { | 124 | handleChange: { |
111 | value: function(event) { | 125 | value: function(event) { |
112 | if(event.wasSetByCode) { | 126 | if(event.wasSetByCode) { |
@@ -231,7 +245,7 @@ exports.ThreeD = Montage.create(Component, { | |||
231 | _getSelectedItem: { | 245 | _getSelectedItem: { |
232 | value: function(els) { | 246 | value: function(els) { |
233 | if(els.length) { | 247 | if(els.length) { |
234 | return els[0]._element || els[0]; | 248 | return els[0]; |
235 | } else { | 249 | } else { |
236 | return this.boundObject.application.ninja.currentDocument.documentRoot; | 250 | return this.boundObject.application.ninja.currentDocument.documentRoot; |
237 | } | 251 | } |