aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties/brush-properties.reel
diff options
context:
space:
mode:
authorJohn Mayhew2012-04-02 16:28:39 -0700
committerJohn Mayhew2012-04-02 16:28:39 -0700
commitb4155fb4c33675a8a7cd37473513718043fdf0ba (patch)
tree3d8c802473f2395d53d599ec9d8b70b60a4db50c /js/components/tools-properties/brush-properties.reel
parent5ba9aeac94c86049423fd5d4b37b277263939c13 (diff)
parentc6de22bf42be90b403491b5f87b1818d9020310c (diff)
downloadninja-b4155fb4c33675a8a7cd37473513718043fdf0ba.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts: js/helper-classes/RDGE/rdge-compiled.js js/helper-classes/RDGE/runtime/GLRuntime.js js/helper-classes/RDGE/src/core/script/MeshManager.js js/helper-classes/RDGE/src/core/script/engine.js js/helper-classes/RDGE/src/core/script/fx/ssao.js js/helper-classes/RDGE/src/core/script/init_state.js js/helper-classes/RDGE/src/core/script/run_state.js js/helper-classes/RDGE/src/core/script/scenegraphNodes.js js/helper-classes/RDGE/src/core/script/utilities.js js/helper-classes/RDGE/src/tools/compile-rdge-core.bat js/helper-classes/RDGE/src/tools/compile-rdge-core.sh js/helper-classes/RDGE/src/tools/rdge-compiled.js js/lib/drawing/world.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/deform-material.js js/lib/rdge/materials/flat-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/linear-gradient-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-blur-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/relief-tunnel-material.js js/lib/rdge/materials/square-tunnel-material.js js/lib/rdge/materials/star-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/tunnel-material.js js/lib/rdge/materials/twist-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/uber-material.js js/lib/rdge/materials/water-material.js js/lib/rdge/materials/z-invert-material.js js/preloader/Preloader.js
Diffstat (limited to 'js/components/tools-properties/brush-properties.reel')
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.html73
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.js46
2 files changed, 111 insertions, 8 deletions
diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.html b/js/components/tools-properties/brush-properties.reel/brush-properties.html
index 38f7f856..98442164 100755
--- a/js/components/tools-properties/brush-properties.reel/brush-properties.html
+++ b/js/components/tools-properties/brush-properties.reel/brush-properties.html
@@ -11,12 +11,71 @@
11 11
12 <script type="text/montage-serialization"> 12 <script type="text/montage-serialization">
13 { 13 {
14 "strokeSizeHT": {
15 "module": "js/components/hottextunit.reel",
16 "name": "HotTextUnit",
17 "properties": {
18 "element": {"#": "strokeSize"},
19 "minValue": 1,
20 "maxValue": 100,
21 "value": 1,
22 "decimalPlace": 10,
23 "acceptableUnits" : ["px", "pt"]
24 }
25 },
26
27 "strokeHardnessHT": {
28 "module": "js/components/hottextunit.reel",
29 "name": "HotTextUnit",
30 "properties": {
31 "element": {"#": "strokeHardness"},
32 "minValue": 0,
33 "maxValue": 100,
34 "value": 100,
35 "decimalPlace": 10,
36 "acceptableUnits" : ["%"],
37 "units" : "%"
38 }
39 },
40
41 "strokeAngleHT": {
42 "module": "js/components/hottextunit.reel",
43 "name": "HotTextUnit",
44 "properties": {
45 "element": {"#": "strokeAngle"},
46 "minValue": -90,
47 "maxValue": 90,
48 "value": 0,
49 "decimalPlace": 10,
50 "acceptableUnits" : ["deg."],
51 "units" : "deg."
52 }
53 },
54
55 "smoothingAmountHT": {
56 "module": "js/components/hottext.reel",
57 "name": "HotText",
58 "properties": {
59 "element": {"#": "smoothingAmount"},
60 "minValue": 0,
61 "maxValue": 100,
62 "value": 0,
63 "decimalPlace": 10
64 }
65 },
14 66
15 "owner": { 67 "owner": {
16 "module": "js/components/tools-properties/brush-properties.reel", 68 "module": "js/components/tools-properties/brush-properties.reel",
17 "name": "BrushProperties", 69 "name": "BrushProperties",
18 "properties": { 70 "properties": {
19 "element": {"#": "brushProperties"} 71 "element": {"#": "brushProperties"},
72 "_strokeSize": {"@": "strokeSizeHT"},
73 "_strokeHardness": {"@": "strokeHardnessHT"},
74 "_doSmoothing": {"#": "doSmoothing"},
75 "_smoothingAmount": {"@": "smoothingAmountHT"},
76 "_useCalligraphic":{"#": "useCalligraphic"},
77 "_strokeAngle": {"@": "strokeAngleHT"},
78 "_angleLabel": {"#": "angleLabel"}
20 } 79 }
21 } 80 }
22 } 81 }
@@ -26,6 +85,18 @@
26 85
27 <body> 86 <body>
28 <div id="brushProperties" class="subToolHolderPanel"> 87 <div id="brushProperties" class="subToolHolderPanel">
88 <div id="strokesContainer" class="leftLabel" style="margin-left:25px; padding-top: 3px;">
89 <label class="label"> Width:</label>
90 <div id="strokeSize" class="label"></div>
91 <label class="label"> Hardness:</label>
92 <div id="strokeHardness" class="label"></div>
93 <label class="label"><input id="doSmoothing" type="checkbox" name="doSmoothingControl" class="checkBoxAlign"/>Smoothing</label>
94 <div id="smoothingAmount" class="label"></div>
95 <label class="label"><input id="useCalligraphic" type="checkbox" name="useCalligraphicControl" class="checkBoxAlign"/>Calligraphic</label>
96 <label class="label" id="angleLabel"> Angle:</label>
97 <div id="strokeAngle" class="label"></div>
98
99 </div>
29 </div> 100 </div>
30 </body> 101 </body>
31 102
diff --git a/js/components/tools-properties/brush-properties.reel/brush-properties.js b/js/components/tools-properties/brush-properties.reel/brush-properties.js
index 92da98cc..fdcd50f8 100755
--- a/js/components/tools-properties/brush-properties.reel/brush-properties.js
+++ b/js/components/tools-properties/brush-properties.reel/brush-properties.js
@@ -9,17 +9,49 @@ var Component = require("montage/ui/component").Component;
9var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties; 9var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
10 10
11exports.BrushProperties = Montage.create(ToolProperties, { 11exports.BrushProperties = Montage.create(ToolProperties, {
12
13
14 _subPrepare: { 12 _subPrepare: {
15 value: function() { 13 value: function() {
16 //this.divElement.addEventListener("click", this, false); 14 this.handleChange(null);
15 this._useCalligraphic.addEventListener("change", this, false);
16 this._doSmoothing.addEventListener("change", this, false);
17 } 17 }
18 }, 18 },
19 19 handleChange: {
20 handleClick: {
21 value: function(event) { 20 value: function(event) {
22 // this.selectedElement = event._event.target.id; 21 if(this._useCalligraphic.checked) {
22 this._strokeAngle.element.style["display"] = "";
23 this._strokeAngle.visible = true;
24 this._angleLabel.style["display"] = "";
25 } else {
26 this._strokeAngle.element.style["display"] = "none";
27 this._strokeAngle.visible = false;
28 this._angleLabel.style["display"] = "none";
29 }
30 if(this._doSmoothing.checked) {
31 this._smoothingAmount.element.style["display"] = "";
32 this._smoothingAmount.visible = true;
33 } else {
34 this._smoothingAmount.element.style["display"] = "none";
35 this._smoothingAmount.visible = false;
36 }
23 } 37 }
38 },
39 strokeSize: {
40 get: function() { return this._strokeSize; }
41 },
42 strokeHardness: {
43 get: function() { return this._strokeHardness; }
44 },
45 doSmoothing:{
46 get: function() {return this._doSmoothing.checked; }
47 },
48 smoothingAmount:{
49 get: function() {return this._smoothingAmount;}
50 },
51 useCalligraphic: {
52 get: function() {return this._useCalligraphic.checked;}
53 },
54 strokeAngle: {
55 get: function() {return this._strokeAngle;}
24 } 56 }
25}); \ No newline at end of file 57});