aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js
diff options
context:
space:
mode:
authorValerio Virgillito2012-06-05 15:20:13 -0700
committerValerio Virgillito2012-06-05 15:20:13 -0700
commitb23a684a6aba38946867463bbbf4184ba2a2ff4a (patch)
treeda14f63082178ca11c908c008d475ac2d20006c2 /js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js
parent783097854612a292ac1be18ff15d88343013f773 (diff)
parent7b02dcf3ae97674bd8d87ad9909abcb439350b61 (diff)
downloadninja-b23a684a6aba38946867463bbbf4184ba2a2ff4a.tar.gz
Merge pull request #267 from mqg734/ToolOptions
Updated ink bottle and fill tools to support tool options checkboxes and materials.
Diffstat (limited to 'js/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js')
-rwxr-xr-xjs/components/tools-properties/ink-bottle-properties.reel/ink-bottle-properties.js28
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 }