aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties/brush-properties.reel/brush-properties.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/components/tools-properties/brush-properties.reel/brush-properties.js')
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.js46
1 files changed, 39 insertions, 7 deletions
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});