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 <[email protected]>
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
[email protected].

Reply via email to