diff options
author | Eric Guzman | 2012-06-11 13:28:42 -0700 |
---|---|---|
committer | Eric Guzman | 2012-06-11 13:28:42 -0700 |
commit | 3a4727ffc350216a434a7c6977b6a23653b77780 (patch) | |
tree | c5dff306f8803c36a16163ba5df1e7f492e762b5 /js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js | |
parent | d6b46ba496c9c8974ae39bb476aea35bcd1ddaf1 (diff) | |
parent | 337efc667372326ae2f9984d89a47bb151016774 (diff) | |
download | ninja-3a4727ffc350216a434a7c6977b6a23653b77780.tar.gz |
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Diffstat (limited to 'js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js')
-rwxr-xr-x | js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js index 945df857..7affe581 100755 --- a/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js +++ b/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js | |||
@@ -28,7 +28,7 @@ var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolPrope | |||
28 | } | 28 | } |
29 | }, | 29 | }, |
30 | 30 | ||
31 | draw: { | 31 | draw: { |
32 | enumerable: false, | 32 | enumerable: false, |
33 | value: function () { | 33 | value: function () { |
34 | Object.getPrototypeOf(InkBottleProperties).draw.call(this); | 34 | Object.getPrototypeOf(InkBottleProperties).draw.call(this); |
@@ -58,7 +58,7 @@ var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolPrope | |||
58 | 58 | ||
59 | _subPrepare: { | 59 | _subPrepare: { |
60 | value: function() { | 60 | value: function() { |
61 | Object.defineBinding(this._strokeMaterial, "items", { | 61 | Object.defineBinding(this.strokeMaterial, "items", { |
62 | boundObject: this.application.ninja.appModel, | 62 | boundObject: this.application.ninja.appModel, |
63 | boundObjectPropertyPath: "materials", | 63 | boundObjectPropertyPath: "materials", |
64 | oneway: false | 64 | oneway: false |
@@ -72,33 +72,19 @@ var InkBottleProperties = exports.InkBottleProperties = Montage.create(ToolPrope | |||
72 | val = event.currentTarget.identifier; | 72 | val = event.currentTarget.identifier; |
73 | switch(val) { | 73 | switch(val) { |
74 | case "useBorderWidth": | 74 | case "useBorderWidth": |
75 | if(ch.checked) { | 75 | this.borderWidth.enabled = ch.checked; |
76 | this.borderWidthLabel.element.classList.remove("disabled"); | ||
77 | this._borderWidth.enabled = true; | ||
78 | } else { | ||
79 | this.borderWidthLabel.element.classList.add("disabled"); | ||
80 | this._borderWidth.enabled = false; | ||
81 | } | ||
82 | break; | 76 | break; |
83 | case "useBorderStyle": | 77 | case "useBorderStyle": |
84 | if(ch.checked) { | 78 | if(ch.checked) { |
85 | this.borderStyleLabel.element.classList.remove("disabled"); | 79 | this.borderStyle.removeAttribute("disabled"); |
86 | this._borderStyle.removeAttribute("disabled") | ||
87 | } else { | 80 | } else { |
88 | this.borderStyleLabel.element.classList.add("disabled"); | 81 | this.borderStyle.setAttribute("disabled", "disabled"); |
89 | this._borderStyle.setAttribute("disabled", "disabled"); | ||
90 | } | 82 | } |
91 | break; | 83 | break; |
92 | case "useStrokeSize": | 84 | case "useStrokeSize": |
93 | if(ch.checked) { | 85 | this.strokeSize.enabled = ch.checked; |
94 | this.strokeSizeLabel.element.classList.remove("disabled"); | ||
95 | this._strokeSize.enabled = true | ||
96 | } else { | ||
97 | this.strokeSizeLabel.element.classList.add("disabled"); | ||
98 | this._strokeSize.enabled = false; | ||
99 | } | ||
100 | break; | 86 | break; |
101 | case "useWebGl": | 87 | case "useWebGL": |
102 | (ch.checked) ? this._materialsContainer.style["display"] = "" : this._materialsContainer.style["display"] = "none"; | 88 | (ch.checked) ? this._materialsContainer.style["display"] = "" : this._materialsContainer.style["display"] = "none"; |
103 | break; | 89 | break; |
104 | } | 90 | } |