aboutsummaryrefslogtreecommitdiff
path: root/js/panels/properties.reel/sections
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-04-10 11:24:21 -0700
committerJose Antonio Marquez2012-04-10 11:24:21 -0700
commitd14f78b06d37aa469885f2ecf84419bcb7e3e613 (patch)
tree91b95c6c9aef779a743b710105546a8ae74bff12 /js/panels/properties.reel/sections
parenta9bcc403df76ad2cb7c31ff7fdd42a85c35cf424 (diff)
parentbd43ce383b050d03b0f92cc923c517febc66ca28 (diff)
downloadninja-d14f78b06d37aa469885f2ecf84419bcb7e3e613.tar.gz
Merge branch 'refs/heads/Ninja-Internal' into FileIO
Diffstat (limited to 'js/panels/properties.reel/sections')
-rwxr-xr-xjs/panels/properties.reel/sections/custom.reel/custom.js29
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.html28
-rwxr-xr-xjs/panels/properties.reel/sections/three-d-view.reel/three-d-view.js14
3 files changed, 69 insertions, 2 deletions
diff --git a/js/panels/properties.reel/sections/custom.reel/custom.js b/js/panels/properties.reel/sections/custom.reel/custom.js
index ac316907..876fe110 100755
--- a/js/panels/properties.reel/sections/custom.reel/custom.js
+++ b/js/panels/properties.reel/sections/custom.reel/custom.js
@@ -15,6 +15,7 @@ var ColorSelect = require("js/panels/properties.reel/sections/custom-rows/color-
15 15
16// Components Needed to make this work 16// Components Needed to make this work
17var Hottext = require("js/components/hottextunit.reel").HotTextUnit; 17var Hottext = require("js/components/hottextunit.reel").HotTextUnit;
18var HT = require("js/components/hottext.reel").HotText;
18var Dropdown = require("js/components/combobox.reel").Combobox; 19var Dropdown = require("js/components/combobox.reel").Combobox;
19var TextField = require("js/components/textfield.reel").TextField; 20var TextField = require("js/components/textfield.reel").TextField;
20var FileInput = require("js/components/ui/file-input.reel").FileInput; 21var FileInput = require("js/components/ui/file-input.reel").FileInput;
@@ -168,6 +169,7 @@ exports.CustomSection = Montage.create(Component, {
168 value: function(fields) { 169 value: function(fields) {
169 switch(fields.type) { 170 switch(fields.type) {
170 case "hottext" : return this.createHottext(fields); 171 case "hottext" : return this.createHottext(fields);
172 case "ht" : return this.createHT(fields);
171 case "dropdown" : return this.createDropdown(fields); 173 case "dropdown" : return this.createDropdown(fields);
172 case "textbox" : return this.createTextField(fields); 174 case "textbox" : return this.createTextField(fields);
173 case "file" : return this.createFileInput(fields); 175 case "file" : return this.createFileInput(fields);
@@ -178,6 +180,33 @@ exports.CustomSection = Montage.create(Component, {
178 } 180 }
179 }, 181 },
180 182
183 createHT: {
184 value: function(aField) {
185
186 // Generate Hottext
187 var obj = HT.create();
188
189 // Set Values for HottextRow
190 if (aField.id) obj.id = aField.id;
191 if (aField.value) obj.value = aField.value;
192 if (aField.min) obj._minValue = aField.min;
193 if (aField.max) obj._maxValue = aField.max;
194 if (aField.prop) obj.prop = aField.prop;
195
196 //Initiate onChange Events
197 obj.addEventListener("change", this, false);
198 obj.addEventListener("changing", this, false);
199
200 //Bind object value to controls list so it can be manipulated
201 Object.defineBinding(this.controls, aField.id, {
202 boundObject: obj,
203 boundObjectPropertyPath: "value"
204 });
205
206 return obj;
207 }
208 },
209
181 //Breaking Up Switch Case Statement to functions to return a row 210 //Breaking Up Switch Case Statement to functions to return a row
182 createHottext: { 211 createHottext: {
183 value: function(aField) { 212 value: function(aField) {
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 f72d1ff6..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) {