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/11/12 18:08:28 UTC
[royale-asjs] branch develop updated: try to handle window resize
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
The following commit(s) were added to refs/heads/develop by this push:
new 61f2967 try to handle window resize
61f2967 is described below
commit 61f2967ef9757241e58a73318147240798cce32a
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Nov 12 10:06:12 2019 -0800
try to handle window resize
---
.../src/main/royale/mx/managers/SystemManager.as | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
index 7b56f6d..86a853b 100644
--- a/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
+++ b/frameworks/projects/MXRoyale/src/main/royale/mx/managers/SystemManager.as
@@ -2985,7 +2985,22 @@ public class SystemManager extends SystemManagerBase implements ISystemManager,
mxmlDocument.moduleFactory = this;
addChild(mxmlDocument as IUIComponent);
var screen:Rectangle = this.screen;
- mxmlDocument.setActualSize(screen.width, screen.height);
+ mxmlDocument.setActualSize(screen.width, screen.height);
+
+ COMPILE::JS
+ {
+ window.addEventListener('resize',
+ this.resizeHandler, false);
+ }
+ }
+
+ /**
+ * @royaleignorecoercion org.apache.royale.core.ILayoutChild
+ */
+ private function resizeHandler(event:Event):void
+ {
+ var screen:Rectangle = this.screen;
+ mxmlDocument.setActualSize(screen.width, screen.height);
}
private function applicationCompleteHandler(event:Event):void