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 2019/01/14 09:27:15 UTC

[royale-asjs] 09/10: don't cache 0 as measurement value. When a component is visible=false, then display:none and measurements will end up being 0 which is not right, so don't use 0 as cached value

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

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

commit 4847924a5a115c640aa68d87763db7dfb050af3b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Jan 14 01:23:29 2019 -0800

    don't cache 0 as measurement value.  When a component is visible=false, then display:none and measurements will end up being 0 which is not right, so don't use 0 as cached value
---
 frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as | 4 ++--
 1 file changed, 2 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 246e843..8acc298 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/core/UIComponent.as
@@ -1967,7 +1967,7 @@ COMPILE::JS
             }
 		}
 		COMPILE::JS {
-			if (isNaN(_measuredWidth)) 
+			if (isNaN(_measuredWidth) || _measuredWidth <= 0) 
             {
                 var oldWidth:Object;
                 var oldLeft:String;
@@ -2040,7 +2040,7 @@ COMPILE::JS
             }
 		}
 		COMPILE::JS {
-            if (isNaN(_measuredHeight))
+            if (isNaN(_measuredHeight) || _measuredHeight <= 0)
             {
                 var oldHeight:Object;
                 var oldTop:String;