flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [22/50] [abbrv] git commit: [flex-asjs] [refs/heads/spark] - Found a couple of minor bugs while fixing an example.
Date Thu, 25 Aug 2016 15:32:30 GMT
Found a couple of minor bugs while fixing an example.


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

Branch: refs/heads/spark
Commit: f57cfc42ea8a18772940b95668e13ea7cb8b2f87
Parents: 6e9672b
Author: Peter Ent <pent@apache.org>
Authored: Wed Aug 3 17:27:27 2016 -0400
Committer: Peter Ent <pent@apache.org>
Committed: Wed Aug 3 17:27:27 2016 -0400

----------------------------------------------------------------------
 .../HTML/src/main/flex/org/apache/flex/html/beads/ListView.as  | 4 ++--
 .../org/apache/flex/html/supportClasses/DataItemRenderer.as    | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f57cfc42/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as
index cab97f8..3018600 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ListView.as
@@ -165,12 +165,12 @@ package org.apache.flex.html.beads
 			if (lastSelectedIndex != -1)
 			{
 				var ir:ISelectableItemRenderer = dataGroup.getItemRendererForIndex(lastSelectedIndex)
as ISelectableItemRenderer;
-                ir.selected = false;
+                if (ir != null) ir.selected = false;
 			}
 			if (listModel.selectedIndex != -1)
 			{
 	            ir = dataGroup.getItemRendererForIndex(listModel.selectedIndex) as ISelectableItemRenderer;
-	            ir.selected = true;
+	            if (ir != null) ir.selected = true;
 			}
             lastSelectedIndex = listModel.selectedIndex;
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f57cfc42/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
index 796e6b7..71d534a 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/supportClasses/DataItemRenderer.as
@@ -148,10 +148,12 @@ package org.apache.flex.html.supportClasses
 			COMPILE::JS
 			{
 				if (selected) {
-					element.className = "StringItemRenderer selected";
+					element.className = element.className + " selected";
 				}
 				else {
-					element.className = "StringItemRenderer";
+					if (element.className.endsWith(" selected")) {
+						element.className = element.className.replace(" selected", "");
+					}
 				}
 			}
 		}


Mime
View raw message