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/05/23 07:16:20 UTC

[12/13] git commit: [flex-asjs] [refs/heads/release0.8.0] - block infinite layout loops when notifying parent your size has changed

block infinite layout loops when notifying parent your size has changed


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

Branch: refs/heads/release0.8.0
Commit: 43bbbdb971144d739090867447c39dbe4c385bc7
Parents: bdd34d2
Author: Alex Harui <ah...@apache.org>
Authored: Tue May 23 00:10:56 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Tue May 23 00:15:57 2017 -0700

----------------------------------------------------------------------
 .../Basic/src/main/flex/org/apache/flex/core/LayoutBase.as       | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/43bbbdb9/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
index 5241bed..859add9 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/core/LayoutBase.as
@@ -303,7 +303,11 @@ package org.apache.flex.core
 			// and send an event to re-layout parent of host
 			if (host.width != oldWidth ||
 			    host.height != oldHeight)
+			{
+				isLayoutRunning = true;
 				host.dispatchEvent(new Event("sizeChanged"));
+				isLayoutRunning = false;
+			}
 
 		}