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 2020/12/08 03:51:13 UTC
[royale-asjs] 01/03: make sure Image/Bitmap image measurements are
not NaN
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch ChildResize
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 199b4959b9f9b5d400718ababfedf1df720f9b08
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Dec 7 19:47:50 2020 -0800
make sure Image/Bitmap image measurements are not NaN
---
frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as
index da77888..d69460e 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/controls/Image.as
@@ -617,12 +617,12 @@ public class Image extends UIComponent
override public function get measuredWidth():Number
{
- return contentWidth;
+ return isNaN(contentWidth) ? 0 : contentWidth;
}
override public function get measuredHeight():Number
{
- return contentHeight;
+ return isNaN(contentHeight) ? 0 : contentHeight;
}
override protected function updateDisplayList(unscaledWidth:Number,