From bda9f8f5829c943486f8850e68c991e83f8fb8c8 Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Sat, 24 Mar 2012 13:50:46 -0700 Subject: Adding logic for flatten checkbox in PI. This requires minor modifications to both StageController and ComponentController. Also removing unused global3DSettings CSS. Signed-off-by: Nivesh Rajbhandari --- .../sections/three-d-view.reel/three-d-view.html | 28 ++++++++++++++++++++-- .../sections/three-d-view.reel/three-d-view.js | 14 +++++++++++ 2 files changed, 40 insertions(+), 2 deletions(-) (limited to 'js/panels/properties.reel/sections') 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 "xAngleControl": {"@": "threeDRotX"}, "yAngleControl": {"@": "threeDRotY"}, "zAngleControl": {"@": "threeDRotZ"}, - "axisModeGroupControl": {"@": "axisModeGroup"} + "axisModeGroupControl": {"@": "axisModeGroup"}, + "flattenControl": {"@": "flattenCheckbox"} } }, @@ -242,6 +243,29 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot "value": "Global", "group": {"@": "axisModeGroup"} } + }, + "flattenCheckbox": { + "module": "montage/ui/checkbox.reel", + "name": "Checkbox", + "properties": { + "element": {"#": "flattenCh"}, + "identifier": "flatten", + "checked": false + }, + "bindings": { + "checked": { + "boundObject": {"@": "owner"}, + "boundObjectPropertyPath": "flatten", + "oneway": false + } + }, + "listeners": [ + { + "type": "action", + "listener": {"@": "owner"}, + "capture": false + } + ] } } @@ -335,7 +359,7 @@ No rights, expressed or implied, whatsoever to this software are provided by Mot
- +
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..0d3d111d 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, { value: 0 }, + flatten: { + value: false + }, + _disableTranslation: { value: true }, @@ -107,6 +111,16 @@ exports.ThreeD = Montage.create(Component, { value: null }, + handleAction: { + value: function(event) { + if(event.currentTarget.identifier === "flatten") { + this.application.ninja.elementMediator.setProperty([this.item], + "-webkit-transform-style", + event.currentTarget.checked ? ["flat"] : ["preserve-3d"]); + } + } + }, + handleChange: { value: function(event) { if(event.wasSetByCode) { -- cgit v1.2.3 From b60e576af3915ce0cd7b60ed5e8ed6ff6f1ea9dc Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 4 Apr 2012 16:55:04 -0700 Subject: fixing the number fields to not have units. Signed-off-by: Valerio Virgillito --- .../properties.reel/sections/custom.reel/custom.js | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'js/panels/properties.reel/sections') 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- // Components Needed to make this work var Hottext = require("js/components/hottextunit.reel").HotTextUnit; +var HT = require("js/components/hottext.reel").HotText; var Dropdown = require("js/components/combobox.reel").Combobox; var TextField = require("js/components/textfield.reel").TextField; var FileInput = require("js/components/ui/file-input.reel").FileInput; @@ -168,6 +169,7 @@ exports.CustomSection = Montage.create(Component, { value: function(fields) { switch(fields.type) { case "hottext" : return this.createHottext(fields); + case "ht" : return this.createHT(fields); case "dropdown" : return this.createDropdown(fields); case "textbox" : return this.createTextField(fields); case "file" : return this.createFileInput(fields); @@ -178,6 +180,33 @@ exports.CustomSection = Montage.create(Component, { } }, + createHT: { + value: function(aField) { + + // Generate Hottext + var obj = HT.create(); + + // Set Values for HottextRow + if (aField.id) obj.id = aField.id; + if (aField.value) obj.value = aField.value; + if (aField.min) obj._minValue = aField.min; + if (aField.max) obj._maxValue = aField.max; + if (aField.prop) obj.prop = aField.prop; + + //Initiate onChange Events + obj.addEventListener("change", this, false); + obj.addEventListener("changing", this, false); + + //Bind object value to controls list so it can be manipulated + Object.defineBinding(this.controls, aField.id, { + boundObject: obj, + boundObjectPropertyPath: "value" + }); + + return obj; + } + }, + //Breaking Up Switch Case Statement to functions to return a row createHottext: { value: function(aField) { -- cgit v1.2.3