Return-Path: X-Original-To: apmail-flex-commits-archive@www.apache.org Delivered-To: apmail-flex-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 929121799E for ; Thu, 3 Sep 2015 18:46:22 +0000 (UTC) Received: (qmail 92662 invoked by uid 500); 3 Sep 2015 18:46:22 -0000 Delivered-To: apmail-flex-commits-archive@flex.apache.org Received: (qmail 92632 invoked by uid 500); 3 Sep 2015 18:46:22 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 92553 invoked by uid 99); 3 Sep 2015 18:46:22 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2015 18:46:22 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 30DD8E7E9F; Thu, 3 Sep 2015 18:46:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: aharui@apache.org To: commits@flex.apache.org Date: Thu, 03 Sep 2015 18:46:25 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: [flex-asjs] [refs/heads/develop] - don't scroll apps by default and let them take natural size if not specified otherwise don't scroll apps by default and let them take natural size if not specified otherwise Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/51f8ce2e Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/51f8ce2e Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/51f8ce2e Branch: refs/heads/develop Commit: 51f8ce2e3a48b865221819534a6da826f726d6d9 Parents: 4df2c71 Author: Alex Harui Authored: Thu Sep 3 11:45:29 2015 -0700 Committer: Alex Harui Committed: Thu Sep 3 11:46:42 2015 -0700 ---------------------------------------------------------------------- .../Core/as/src/org/apache/flex/core/Application.as | 12 +++++++----- .../Core/js/src/org/apache/flex/core/Application.js | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51f8ce2e/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as b/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as index 3e4821e..d4ba73a 100644 --- a/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as +++ b/frameworks/projects/Core/as/src/org/apache/flex/core/Application.as @@ -182,17 +182,19 @@ package org.apache.flex.core if (initialView) { initialView.applicationModel = model; - if (isNaN(initialView.explicitWidth)) - initialView.width = stage.stageWidth; - if (isNaN(initialView.explicitHeight)) - initialView.height = stage.stageHeight; + if (!isNaN(initialView.percentWidth) && !isNaN(initialView.percentHeight)) + initialView.setWidthAndHeight(stage.stageWidth, stage.stageHeight); + else if (!isNaN(initialView.percentWidth)) + initialView.setWidth(stage.stageWidth); + else if (!isNaN(initialView.percentHeight)) + initialView.setHeight(stage.stageHeight); this.addElement(initialView); var bgColor:Object = ValuesManager.valuesImpl.getValue(this, "background-color"); if (bgColor != null) { var backgroundColor:uint = ValuesManager.valuesImpl.convertColor(bgColor); graphics.beginFill(backgroundColor); - graphics.drawRect(0, 0, stage.stageWidth, stage.stageHeight); + graphics.drawRect(0, 0, initialView.width, initialView.height); graphics.endFill(); } dispatchEvent(new org.apache.flex.events.Event("viewChanged")); http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/51f8ce2e/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 ccb618b..e9b2a3e 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 @@ -72,6 +72,7 @@ org.apache.flex.core.Application.prototype.start = function() { this.element = document.getElementsByTagName('body')[0]; this.element.flexjs_wrapper = this; this.element.className = 'Application'; + this.element.style.overflow = 'hidden'; org.apache.flex.utils.MXMLDataInterpreter.generateMXMLInstances(this, null, this.MXMLDescriptor);