set body size if main view is using %
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/b22c4777 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/b22c4777 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/b22c4777 Branch: refs/heads/develop Commit: b22c47775f0c23fe211a22f0087ad23772809248 Parents: 67f2726 Author: Alex Harui <[email protected]> Authored: Fri Sep 4 22:28:57 2015 -0700 Committer: Alex Harui <[email protected]> Committed: Fri Sep 4 22:28:57 2015 -0700 ---------------------------------------------------------------------- .../projects/Core/js/src/org/apache/flex/core/Application.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b22c4777/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js b/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js index e9b2a3e..8ac8d91 100644 --- a/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js +++ b/frameworks/projects/Core/js/src/org/apache/flex/core/Application.js @@ -83,7 +83,11 @@ org.apache.flex.core.Application.prototype.start = function() { this.initialView.applicationModel = this.model; this.addElement(this.initialView); - + if (!isNaN(this.initialView.percentWidth) || !isNaN(this.initialView.percentHeight)) { + this.element.style.height = window.innerHeight.toString() + 'px'; + this.element.style.width = window.innerWidth.toString() + 'px'; + this.initialView.dispatchEvent('sizeChanged'); // kick off layout if % sizes + } this.dispatchEvent('viewChanged'); };
