aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties
diff options
context:
space:
mode:
authorPushkar Joshi2012-03-02 12:23:44 -0800
committerPushkar Joshi2012-03-02 12:23:44 -0800
commit1b68bb87c458877cb850a96d8a093d6064bc41dc (patch)
treee479c2f0a3958cdf2110654b1886769518b1bee7 /js/components/tools-properties
parent0b7f2f54738d2c1ea480b9bac7d3a750b1ef4df6 (diff)
downloadninja-1b68bb87c458877cb850a96d8a093d6064bc41dc.tar.gz
Catmull-Rom spline sampling for the brush stroke, and options for stroke size, stroke hardness and both stroke colors (left and right --- temporarily using the stroke and fill colors respectively)
Diffstat (limited to 'js/components/tools-properties')
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.html35
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.js17
2 files changed, 39 insertions, 13 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..af07b3f2 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,39 @@
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" : ["px", "pt"]
37 }
38 },
14 39
15 "owner": { 40 "owner": {
16 "module": "js/components/tools-properties/brush-properties.reel", 41 "module": "js/components/tools-properties/brush-properties.reel",
17 "name": "BrushProperties", 42 "name": "BrushProperties",
18 "properties": { 43 "properties": {
19 "element": {"#": "brushProperties"} 44 "element": {"#": "brushProperties"},
45 "_strokeSize": {"@": "strokeSizeHT"},
46 "_strokeHardness": {"@": "strokeHardnessHT"}
20 } 47 }
21 } 48 }
22 } 49 }
@@ -26,6 +53,12 @@
26 53
27 <body> 54 <body>
28 <div id="brushProperties" class="subToolHolderPanel"> 55 <div id="brushProperties" class="subToolHolderPanel">
56 <div id="strokesContainer" class="leftLabel" style="margin-left:25px; padding-top: 3px;">
57 <label class="label"> Stroke:</label>
58 <div id="strokeSize" class="label"></div>
59 <label class="label"> Hardness:</label>
60 <div id="strokeHardness" class="label"></div>
61 </div>
29 </div> 62 </div>
30 </body> 63 </body>
31 64
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..d2fcf888 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,10 @@ 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 12 strokeSize: {
13 13 get: function() { return this._strokeSize; }
14 _subPrepare: {
15 value: function() {
16 //this.divElement.addEventListener("click", this, false);
17 }
18 }, 14 },
19 15 strokeHardness: {
20 handleClick: { 16 get: function() { return this._strokeHardness; }
21 value: function(event) {
22 // this.selectedElement = event._event.target.id;
23 }
24 } 17 }
25}); \ No newline at end of file 18});