Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D1856200C13 for ; Mon, 6 Feb 2017 23:39:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D00F7160B6B; Mon, 6 Feb 2017 22:39:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2385E160B56 for ; Mon, 6 Feb 2017 23:39:24 +0100 (CET) Received: (qmail 85151 invoked by uid 500); 6 Feb 2017 22:20:17 -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 85143 invoked by uid 99); 6 Feb 2017 22:20:17 -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; Mon, 06 Feb 2017 22:20:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7448FDFF17; Mon, 6 Feb 2017 22:19:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: harbs@apache.org To: commits@flex.apache.org Message-Id: <236ccc3f67a8456ea2c3f54a7b97f57f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: [flex-asjs] [refs/heads/develop] - Negative left values causes the object to go outside the left of the viewport. Possibly a distinction should be made if overflow:hidden is used, but I believe this to be better behavior if overflow is visibl Date: Mon, 6 Feb 2017 22:19:58 +0000 (UTC) archived-at: Mon, 06 Feb 2017 22:39:26 -0000 Repository: flex-asjs Updated Branches: refs/heads/develop 06fa792ba -> 92bcb5a06 Negative left values causes the object to go outside the left of the viewport. Possibly a distinction should be made if overflow:hidden is used, but I believe this to be better behavior if overflow is visible. Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/92bcb5a0 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/92bcb5a0 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/92bcb5a0 Branch: refs/heads/develop Commit: 92bcb5a06b39c555497c3db8b520f5af41643d2c Parents: 06fa792 Author: Harbs Authored: Tue Feb 7 00:19:52 2017 +0200 Committer: Harbs Committed: Tue Feb 7 00:19:52 2017 +0200 ---------------------------------------------------------------------- .../main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/92bcb5a0/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as index 51bfa20..500f7a0 100644 --- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as +++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/layouts/BasicLayout.as @@ -427,7 +427,7 @@ package org.apache.flex.html.beads.layouts if (horizontalCenter) { child.positioner.style.position = 'absolute'; - child.positioner.style.left = ((w - child.width) / 2) + 'px'; + child.positioner.style.left = Math.max(((w - child.width) / 2),0) + 'px'; } child.dispatchEvent('sizeChanged'); maxWidth = Math.max(maxWidth, child.positioner.offsetLeft + child.positioner.offsetWidth);