flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [15/50] [abbrv] git commit: [flex-asjs] [refs/heads/master] - Better itemRenderer for Tree.
Date Wed, 06 Apr 2016 15:06:13 GMT
Better itemRenderer for Tree.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4c730018
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4c730018
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4c730018

Branch: refs/heads/master
Commit: 4c7300188a86993cd5823bf1c327e948549090ba
Parents: d0dddc1
Author: Peter Ent <pent@apache.org>
Authored: Fri Feb 19 11:57:26 2016 -0500
Committer: Peter Ent <pent@apache.org>
Committed: Fri Feb 19 11:57:26 2016 -0500

----------------------------------------------------------------------
 .../org/apache/flex/html/supportClasses/TreeItemRenderer.as | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4c730018/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TreeItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TreeItemRenderer.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TreeItemRenderer.as
index bf545b0..7250e82 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TreeItemRenderer.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/TreeItemRenderer.as
@@ -47,10 +47,15 @@ package org.apache.flex.html.supportClasses
 			super.data = value;
 			
 			var treeData:TreeListData = listData as TreeListData;
+			var indentSpace:String = "    ";
 			
-			var indent:String = treeData.hasChildren ? (treeData.isOpen ? "-" : "+") : " ";
+			COMPILE::JS {
+				indentSpace = "&nbsp;&nbsp;&nbsp;&nbsp;"
+			}
+			
+			var indent:String = treeData.hasChildren ? (treeData.isOpen ? "▼" : "▶") : " ";
 			for (var i:int=0; i < treeData.depth; i++) {
-				indent += "    ";
+				indent += indentSpace;
 			}
 			
 			this.text = indent + this.text;


Mime
View raw message