You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/02/09 05:45:04 UTC
[12/50] [abbrv] git commit: [flex-asjs] [refs/heads/dual] - replicate
81cbd002fd6c12e97d719ea92a5a4eb5bf42d70c to Basic
replicate 81cbd002fd6c12e97d719ea92a5a4eb5bf42d70c to Basic
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/e9fd96f1
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e9fd96f1
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e9fd96f1
Branch: refs/heads/dual
Commit: e9fd96f1f45e54b97f25766128474beefeed5da8
Parents: b0fa366
Author: Alex Harui <ah...@apache.org>
Authored: Mon Feb 6 09:43:53 2017 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Feb 6 09:43:53 2017 -0800
----------------------------------------------------------------------
.../flex/html/beads/layouts/DataGridLayout.as | 22 +++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e9fd96f1/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
index 1d22956..fe4ccab 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/DataGridLayout.as
@@ -18,7 +18,8 @@
////////////////////////////////////////////////////////////////////////////////
package org.apache.flex.html.beads.layouts
{
- import org.apache.flex.core.IBeadLayout;
+ import org.apache.flex.core.IBead;
+ import org.apache.flex.core.IBeadLayout;
import org.apache.flex.core.IBeadModel;
import org.apache.flex.core.IBeadView;
import org.apache.flex.core.IDataGridModel;
@@ -71,16 +72,23 @@ package org.apache.flex.html.beads.layouts
{
_strand = value;
- var host:UIBase = _strand as UIBase;
- host.addEventListener("widthChanged", handleSizeChanges);
- host.addEventListener("heightChanged", handleSizeChanges);
- host.addEventListener("sizeChanged", handleSizeChanges);
- host.addEventListener("layoutNeeded", handleSizeChanges);
-
+ var host:UIBase = value as UIBase;
+
var view:DataGridView = host.view as DataGridView;
header = view.header;
listArea = view.listArea;
+
+ var anylayout:IBead = listArea.getBeadByType(IBeadLayout);
+ if (anylayout != null) {
+ listArea.removeBead(anylayout);
+ }
listArea.addBead(new BasicLayout());
+
+ host.addEventListener("widthChanged", handleSizeChanges);
+ host.addEventListener("heightChanged", handleSizeChanges);
+ host.addEventListener("sizeChanged", handleSizeChanges);
+ host.addEventListener("layoutNeeded", handleSizeChanges);
+
}
private var _header:UIBase;