aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties/brush-properties.reel/brush-properties.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-03-29 15:40:59 -0700
committerValerio Virgillito2012-03-29 15:40:59 -0700
commitf4949cab544886702e7ad6eeaa6215125c7b067a (patch)
treeb62d6319d6e9aa2c447597c3a2ccde5472da4738 /js/components/tools-properties/brush-properties.reel/brush-properties.js
parent3fd2cdb59027b3f973b9165db9db4fdd22026941 (diff)
parentfa5c9dbdc3e8618d494e142e0967fa69049d0c97 (diff)
downloadninja-f4949cab544886702e7ad6eeaa6215125c7b067a.tar.gz
Merge pull request #147 from pushkarjoshi/brushtool
Brushtool
Diffstat (limited to 'js/components/tools-properties/brush-properties.reel/brush-properties.js')
-rwxr-xr-xjs/components/tools-properties/brush-properties.reel/brush-properties.js30
1 files changed, 30 insertions, 0 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 e6faa0f0..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,6 +9,33 @@ 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 _subPrepare: {
13 value: function() {
14 this.handleChange(null);
15 this._useCalligraphic.addEventListener("change", this, false);
16 this._doSmoothing.addEventListener("change", this, false);
17 }
18 },
19 handleChange: {
20 value: function(event) {
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 }
37 }
38 },
12 strokeSize: { 39 strokeSize: {
13 get: function() { return this._strokeSize; } 40 get: function() { return this._strokeSize; }
14 }, 41 },
@@ -18,6 +45,9 @@ exports.BrushProperties = Montage.create(ToolProperties, {
18 doSmoothing:{ 45 doSmoothing:{
19 get: function() {return this._doSmoothing.checked; } 46 get: function() {return this._doSmoothing.checked; }
20 }, 47 },
48 smoothingAmount:{
49 get: function() {return this._smoothingAmount;}
50 },
21 useCalligraphic: { 51 useCalligraphic: {
22 get: function() {return this._useCalligraphic.checked;} 52 get: function() {return this._useCalligraphic.checked;}
23 }, 53 },