diff options
-rw-r--r-- | js/components/combobox.reel/combobox.js | 28 | ||||
-rw-r--r-- | js/components/tools-properties/shape-properties.reel/shape-properties.js | 43 |
2 files changed, 51 insertions, 20 deletions
diff --git a/js/components/combobox.reel/combobox.js b/js/components/combobox.reel/combobox.js index 3200b01c..bc433f52 100644 --- a/js/components/combobox.reel/combobox.js +++ b/js/components/combobox.reel/combobox.js | |||
@@ -104,6 +104,26 @@ exports.Combobox = Montage.create(Component, { | |||
104 | } | 104 | } |
105 | }, | 105 | }, |
106 | 106 | ||
107 | _visible: { | ||
108 | enumerable: false, | ||
109 | value: true | ||
110 | }, | ||
111 | |||
112 | visible: { | ||
113 | enumerable: true, | ||
114 | serializable: true, | ||
115 | get: function() { | ||
116 | return this._visible; | ||
117 | }, | ||
118 | set: function(value) { | ||
119 | if(value !== this._visible) | ||
120 | { | ||
121 | this._visible = value; | ||
122 | this.needsDraw = true; | ||
123 | } | ||
124 | } | ||
125 | }, | ||
126 | |||
107 | handleChange: | 127 | handleChange: |
108 | { | 128 | { |
109 | value:function(event) | 129 | value:function(event) |
@@ -158,6 +178,14 @@ exports.Combobox = Montage.create(Component, { | |||
158 | this.element.appendChild(optionItem); | 178 | this.element.appendChild(optionItem); |
159 | } | 179 | } |
160 | this.element.disabled = !this._enabled; | 180 | this.element.disabled = !this._enabled; |
181 | if(this._visible) | ||
182 | { | ||
183 | this.element.style.visibility = "visible"; | ||
184 | } | ||
185 | else | ||
186 | { | ||
187 | this.element.style.visibility = "hidden"; | ||
188 | } | ||
161 | } | 189 | } |
162 | } | 190 | } |
163 | }, | 191 | }, |
diff --git a/js/components/tools-properties/shape-properties.reel/shape-properties.js b/js/components/tools-properties/shape-properties.reel/shape-properties.js index 345e361c..79567453 100644 --- a/js/components/tools-properties/shape-properties.reel/shape-properties.js +++ b/js/components/tools-properties/shape-properties.reel/shape-properties.js | |||
@@ -45,13 +45,16 @@ exports.ShapeProperties = Montage.create(ToolProperties, { | |||
45 | this._selectedSubTool = value; | 45 | this._selectedSubTool = value; |
46 | this[this._selectedSubTool.properties].visible = true; | 46 | this[this._selectedSubTool.properties].visible = true; |
47 | 47 | ||
48 | // if(this._selectedSubTool.id === "LineTool") { | 48 | if(this._useWebGL.checked) |
49 | // this._fillIcon.style["display"] = "none"; | 49 | { |
50 | // this._fillMaterial.style["display"] = "none"; | 50 | if(this._selectedSubTool.id === "LineTool") { |
51 | // } else { | 51 | this._fillIcon.style["display"] = "none"; |
52 | // this._fillIcon.style["display"] = ""; | 52 | this._fillMaterial.visible = false; |
53 | // this._fillMaterial.style["display"] = ""; | 53 | } else { |
54 | // } | 54 | this._fillIcon.style["display"] = ""; |
55 | this._fillMaterial.visible = true; | ||
56 | } | ||
57 | } | ||
55 | 58 | ||
56 | } | 59 | } |
57 | } | 60 | } |
@@ -62,23 +65,23 @@ exports.ShapeProperties = Montage.create(ToolProperties, { | |||
62 | if(this._useWebGL.checked) | 65 | if(this._useWebGL.checked) |
63 | { | 66 | { |
64 | this._use3D = true; | 67 | this._use3D = true; |
65 | // this._materialLabel.style["display"] = ""; | 68 | this._materialLabel.style["display"] = ""; |
66 | // this._strokeIcon.style["display"] = ""; | 69 | this._strokeIcon.style["display"] = ""; |
67 | // this._strokeMaterial.style["display"] = ""; | 70 | this._strokeMaterial.visible = true; |
68 | // if(this.selectedSubTool.id !== "LineTool") | 71 | if(this.selectedSubTool.id !== "LineTool") |
69 | // { | 72 | { |
70 | // this._fillIcon.style["display"] = ""; | 73 | this._fillIcon.style["display"] = ""; |
71 | // this._fillMaterial.style["display"] = ""; | 74 | this._fillMaterial.visible = true; |
72 | // } | 75 | } |
73 | } | 76 | } |
74 | else | 77 | else |
75 | { | 78 | { |
76 | this._use3D = false; | 79 | this._use3D = false; |
77 | // this._materialLabel.style["display"] = "none"; | 80 | this._materialLabel.style["display"] = "none"; |
78 | // this._strokeIcon.style["display"] = "none"; | 81 | this._strokeIcon.style["display"] = "none"; |
79 | // this._strokeMaterial.style["display"] = "none"; | 82 | this._strokeMaterial.visible = false; |
80 | // this._fillIcon.style["display"] = "none"; | 83 | this._fillIcon.style["display"] = "none"; |
81 | // this._fillMaterial.style["display"] = "none"; | 84 | this._fillMaterial.visible = false; |
82 | } | 85 | } |
83 | } | 86 | } |
84 | } | 87 | } |