diff options
author | hwc487 | 2012-04-25 15:54:29 -0700 |
---|---|---|
committer | hwc487 | 2012-04-25 15:54:29 -0700 |
commit | 34e6aa5a76fb49c3d9251cedf128c6ed971abb5c (patch) | |
tree | d506addbd3f15dbe77a881c1956ccf45b5d6eda8 /js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js | |
parent | 1304d00cec00f86442981a276817416ca37086b3 (diff) | |
parent | bcc8f8616f5ad4bf310928da6cbc01da12f6e468 (diff) | |
download | ninja-34e6aa5a76fb49c3d9251cedf128c6ed971abb5c.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into Canvas-interaction
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 | 49 |
1 files changed, 34 insertions, 15 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 e3ffc359..6d5c46f6 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 | |||
@@ -10,8 +10,6 @@ var Montage = require("montage/core/core").Montage, | |||
10 | 10 | ||
11 | exports.InkBottleProperties = Montage.create(ToolProperties, { | 11 | exports.InkBottleProperties = Montage.create(ToolProperties, { |
12 | 12 | ||
13 | _use3D: { value: false }, | ||
14 | |||
15 | _subPrepare: { | 13 | _subPrepare: { |
16 | value: function() { | 14 | value: function() { |
17 | Object.defineBinding(this._strokeMaterial, "items", { | 15 | Object.defineBinding(this._strokeMaterial, "items", { |
@@ -19,23 +17,44 @@ exports.InkBottleProperties = Montage.create(ToolProperties, { | |||
19 | boundObjectPropertyPath: "materials", | 17 | boundObjectPropertyPath: "materials", |
20 | oneway: false | 18 | oneway: false |
21 | }); | 19 | }); |
22 | |||
23 | this.handleChange(null); | ||
24 | this._useWebGL.addEventListener("change", this, false); | ||
25 | } | 20 | } |
26 | }, | 21 | }, |
27 | 22 | ||
28 | handleChange: { | 23 | handleAction: { |
29 | value: function(event) { | 24 | value: function(event) { |
30 | if(this._useWebGL.checked) | 25 | var ch = event.currentTarget, |
31 | { | 26 | val = event.currentTarget.identifier; |
32 | this._use3D = true; | 27 | switch(val) { |
33 | this._materialsContainer.style["display"] = ""; | 28 | case "useBorderWidth": |
34 | } | 29 | if(ch.checked) { |
35 | else | 30 | this.borderWidthLabel.element.classList.remove("disabled"); |
36 | { | 31 | this._borderWidth.enabled = true; |
37 | this._use3D = false; | 32 | } else { |
38 | this._materialsContainer.style["display"] = "none"; | 33 | this.borderWidthLabel.element.classList.add("disabled"); |
34 | this._borderWidth.enabled = false; | ||
35 | } | ||
36 | break; | ||
37 | case "useBorderStyle": | ||
38 | if(ch.checked) { | ||
39 | this.borderStyleLabel.element.classList.remove("disabled"); | ||
40 | this._borderStyle.removeAttribute("disabled") | ||
41 | } else { | ||
42 | this.borderStyleLabel.element.classList.add("disabled"); | ||
43 | this._borderStyle.setAttribute("disabled", "disabled"); | ||
44 | } | ||
45 | break; | ||
46 | case "useStrokeSize": | ||
47 | if(ch.checked) { | ||
48 | this.strokeSizeLabel.element.classList.remove("disabled"); | ||
49 | this._strokeSize.enabled = true | ||
50 | } else { | ||
51 | this.strokeSizeLabel.element.classList.add("disabled"); | ||
52 | this._strokeSize.enabled = false; | ||
53 | } | ||
54 | break; | ||
55 | case "useWebGl": | ||
56 | (ch.checked) ? this._materialsContainer.style["display"] = "" : this._materialsContainer.style["display"] = "none"; | ||
57 | break; | ||
39 | } | 58 | } |
40 | } | 59 | } |
41 | } | 60 | } |