You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by yi...@apache.org on 2020/10/18 14:27:18 UTC
[royale-asjs] branch develop updated: Add height and width to
LoaderInfo
This is an automated email from the ASF dual-hosted git repository.
yishayw pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new fd91b72 Add height and width to LoaderInfo
new c52d280 Merge branch 'develop' of https://github.com/apache/royale-asjs into develop
fd91b72 is described below
commit fd91b72f1cc3bc2479c05d512504f4411d8c41a4
Author: Yishay Weiss <yi...@yell.com>
AuthorDate: Sun Oct 18 15:26:33 2020 +0100
Add height and width to LoaderInfo
---
.../projects/MXRoyale/src/main/royale/mx/display/Loader.as | 1 +
.../MXRoyale/src/main/royale/mx/display/LoaderInfo.as | 12 ++++++++++++
2 files changed, 13 insertions(+)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/display/Loader.as b/frameworks/projects/MXRoyale/src/main/royale/mx/display/Loader.as
index e1f9793..a4bcf9c 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/display/Loader.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/display/Loader.as
@@ -49,6 +49,7 @@ package mx.display
public function load(request:URLRequest, context:Object=null):void
{
+ // TODO do we need to add element before loading from source?
(content as Image).source = request.url;
}
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/display/LoaderInfo.as b/frameworks/projects/MXRoyale/src/main/royale/mx/display/LoaderInfo.as
index c7d5787..0afeb1f 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/display/LoaderInfo.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/display/LoaderInfo.as
@@ -35,5 +35,17 @@ package mx.display
return _loader;
}
+ public function get width():int
+ {
+ // TODO this should be the nominal width, whatever that means
+ return _loader.content.width;
+ }
+
+ public function get height():int
+ {
+ // TODO this should be the nominal height, whatever that means
+ return _loader.content.height;
+ }
+
}
}
\ No newline at end of file