From 329a859e2666716c3a1d99c6bd2679e10c81fc8d Mon Sep 17 00:00:00 2001 From: Nivesh Rajbhandari Date: Tue, 7 Feb 2012 15:25:11 -0800 Subject: Added ability to toggle combobox's visibility so we can show/hide materials comboboxes in the tool options. Signed-off-by: Nivesh Rajbhandari --- .../shape-properties.reel/shape-properties.js | 43 ++++++++++++---------- 1 file changed, 23 insertions(+), 20 deletions(-) (limited to 'js/components/tools-properties') 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, { this._selectedSubTool = value; this[this._selectedSubTool.properties].visible = true; -// if(this._selectedSubTool.id === "LineTool") { -// this._fillIcon.style["display"] = "none"; -// this._fillMaterial.style["display"] = "none"; -// } else { -// this._fillIcon.style["display"] = ""; -// this._fillMaterial.style["display"] = ""; -// } + if(this._useWebGL.checked) + { + if(this._selectedSubTool.id === "LineTool") { + this._fillIcon.style["display"] = "none"; + this._fillMaterial.visible = false; + } else { + this._fillIcon.style["display"] = ""; + this._fillMaterial.visible = true; + } + } } } @@ -62,23 +65,23 @@ exports.ShapeProperties = Montage.create(ToolProperties, { if(this._useWebGL.checked) { this._use3D = true; -// this._materialLabel.style["display"] = ""; -// this._strokeIcon.style["display"] = ""; -// this._strokeMaterial.style["display"] = ""; -// if(this.selectedSubTool.id !== "LineTool") -// { -// this._fillIcon.style["display"] = ""; -// this._fillMaterial.style["display"] = ""; -// } + this._materialLabel.style["display"] = ""; + this._strokeIcon.style["display"] = ""; + this._strokeMaterial.visible = true; + if(this.selectedSubTool.id !== "LineTool") + { + this._fillIcon.style["display"] = ""; + this._fillMaterial.visible = true; + } } else { this._use3D = false; -// this._materialLabel.style["display"] = "none"; -// this._strokeIcon.style["display"] = "none"; -// this._strokeMaterial.style["display"] = "none"; -// this._fillIcon.style["display"] = "none"; -// this._fillMaterial.style["display"] = "none"; + this._materialLabel.style["display"] = "none"; + this._strokeIcon.style["display"] = "none"; + this._strokeMaterial.visible = false; + this._fillIcon.style["display"] = "none"; + this._fillMaterial.visible = false; } } } -- cgit v1.2.3