You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/05/16 22:18:05 UTC

[royale-asjs] 03/07: fix sizing

This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/MXRoyale
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 81dc1fb81db320f5be99e713b98587d6f4995775
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed May 16 15:15:36 2018 -0700

    fix sizing
---
 .../MXRoyale/src/main/royale/mx/core/UIComponent.as  | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
index d0c31f0..159f576 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -1286,7 +1286,15 @@ public class UIComponent extends UIBase
 		}
 		COMPILE::JS {
 			if (isNaN(_measuredWidth)) {
-				return this.positioner.offsetWidth;
+                var w:* = positioner.style.width;
+                if (w === undefined || w == "")
+                    return this.positioner.offsetWidth;
+                else
+                {
+                    measure();
+                    if (isNaN(_measuredWidth))
+                        return this.positioner.offsetWidth;
+                }
 			}
 		}
         return _measuredWidth;
@@ -1333,7 +1341,15 @@ public class UIComponent extends UIBase
 		}
 		COMPILE::JS {
 			if (isNaN(_measuredHeight)) {
-				return this.positioner.offsetHeight;
+                var h:* = positioner.style.height;
+                if (h === undefined || h == "")
+    				return this.positioner.offsetHeight;
+                else
+                {
+                    measure();
+                    if (isNaN(_measuredHeight))
+                        return this.positioner.offsetHeight;
+                }
 			}
 		}
         return _measuredHeight;

-- 
To stop receiving notification emails like this one, please contact
aharui@apache.org.