flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [04/12] git commit: [flex-asjs] [refs/heads/develop] - just use offsetParent
Date Mon, 17 Aug 2015 05:30:07 GMT
just use offsetParent


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

Branch: refs/heads/develop
Commit: e74ba9083fba1e8b907f5e34624b0f1786ec1990
Parents: 8915b76
Author: Alex Harui <aharui@apache.org>
Authored: Thu Aug 13 23:49:55 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Thu Aug 13 23:49:55 2015 -0700

----------------------------------------------------------------------
 .../projects/Core/js/src/org/apache/flex/utils/PointUtils.js  | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e74ba908/frameworks/projects/Core/js/src/org/apache/flex/utils/PointUtils.js
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/js/src/org/apache/flex/utils/PointUtils.js b/frameworks/projects/Core/js/src/org/apache/flex/utils/PointUtils.js
index 6c4e743..2ed13ff 100644
--- a/frameworks/projects/Core/js/src/org/apache/flex/utils/PointUtils.js
+++ b/frameworks/projects/Core/js/src/org/apache/flex/utils/PointUtils.js
@@ -75,12 +75,7 @@ org.apache.flex.utils.PointUtils.localToGlobal =
   do {
     x += element.offsetLeft;
     y += element.offsetTop;
-    if (local.hasOwnProperty('parent')) {
-      local = local.parent;
-      element = local.element;
-    } else {
-      element = null;
-    }
+    element = element.offsetParent;
   }
   while (element);
   return new org.apache.flex.geom.Point(x, y);


Mime
View raw message