flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject git commit: [flex-asjs] [refs/heads/develop] - Fix bug where initial selection messes up layout.
Date Sun, 11 Dec 2016 10:15:21 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/develop ff02086da -> 650908713


Fix bug where initial selection messes up layout.


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

Branch: refs/heads/develop
Commit: 650908713bc095cb06ecc9da81de1d9a31eaa87f
Parents: ff02086
Author: yishayw <yishayjobs@hotmail.com>
Authored: Sun Dec 11 12:15:17 2016 +0200
Committer: yishayw <yishayjobs@hotmail.com>
Committed: Sun Dec 11 12:15:17 2016 +0200

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/html/beads/AccordionView.as   | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/65090871/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
index 0f733ac..c57aacf 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AccordionView.as
@@ -19,11 +19,13 @@
 package org.apache.flex.html.beads
 {
 	import org.apache.flex.core.ILayoutChild;
+	import org.apache.flex.core.ISelectionModel;
 	import org.apache.flex.core.UIBase;
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.html.beads.layouts.IOneFlexibleChildLayout;
 	import org.apache.flex.html.supportClasses.ICollapsible;
+	import org.apache.flex.utils.StrandUtils;
 	
 	public class AccordionView extends ListView
 	{
@@ -61,8 +63,13 @@ package org.apache.flex.html.beads
 		
 		override protected function performLayout(event:Event):void
 		{
-			if (layout && layout.flexibleChild)
+			if (layout)
 			{
+				if (!layout.flexibleChild)
+				{
+					var model:ISelectionModel = StrandUtils.loadBead(ISelectionModel, "iBeadModel", host)
as ISelectionModel;
+					layout.flexibleChild = (model.selectedItem as UIBase).id;
+				}
 				super.performLayout(event);
 			}
 		}


Mime
View raw message