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/refactor-sprite] - Make sure hitTestPoint works in JS for composite objects.
Date Mon, 31 Oct 2016 10:57:19 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite 66b2fcb87 -> 1829b467e


Make sure hitTestPoint works in JS for composite objects.


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

Branch: refs/heads/refactor-sprite
Commit: 1829b467e14c91ef2e1ff819d6da654b79361f52
Parents: 66b2fcb
Author: yishayw <yishayjobs@hotmail.com>
Authored: Mon Oct 31 12:57:05 2016 +0200
Committer: yishayw <yishayjobs@hotmail.com>
Committed: Mon Oct 31 12:57:05 2016 +0200

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/utils/DisplayUtils.as | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/1829b467/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as
index 54b1f99..483ab41 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/DisplayUtils.as
@@ -132,11 +132,17 @@ package org.apache.flex.utils
 		            break;
 		        }
 		        elements[elements.length] = element;
-		        if(elem && elem == element)
-		        {
-		        	found = element;
-		        	break;
-		        }
+				// work our way up the parent tree to find containing elements if applicable
+				var parent:Element = element;
+				while(parent)
+				{
+					if(elem && elem == parent)
+					{
+						found = parent;
+						break;
+					}
+					parent = parent.parentElement;
+				}
 		        visibility[visibility.length] = element.style.visibility;
 		        element.style.visibility = 'hidden'; // Temporarily hide the element (without changing
the layout)
 		    }


Mime
View raw message