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 <[email protected]> Authored: Tue Feb 7 00:19:52 2017 +0200 Committer: Harbs <[email protected]> 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);
