You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by pe...@apache.org on 2017/05/10 15:03:43 UTC
git commit: [flex-asjs] [refs/heads/develop] - Fixes alignment issues
on the JS side.
Repository: flex-asjs
Updated Branches:
refs/heads/develop b02069b1e -> f97401655
Fixes alignment issues on the JS side.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f9740165
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f9740165
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f9740165
Branch: refs/heads/develop
Commit: f9740165530676b4c4ac2dff964d4337937a6b44
Parents: b02069b
Author: Peter Ent <pe...@apache.org>
Authored: Wed May 10 11:03:41 2017 -0400
Committer: Peter Ent <pe...@apache.org>
Committed: Wed May 10 11:03:41 2017 -0400
----------------------------------------------------------------------
.../flex/html/beads/layouts/VerticalColumnLayout.as | 14 ++++++++++++++
.../apache/flex/html/beads/layouts/VerticalLayout.as | 1 +
.../beads/layouts/VerticalLayoutWithPaddingAndGap.as | 4 +++-
3 files changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f9740165/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
index e489d85..e11bab8 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalColumnLayout.as
@@ -35,6 +35,10 @@ package org.apache.flex.html.beads.layouts
import org.apache.flex.geom.Rectangle;
import org.apache.flex.utils.CSSUtils;
import org.apache.flex.utils.CSSContainerUtils;
+
+ COMPILE::JS {
+ import org.apache.flex.core.WrappedHTMLElement;
+ }
/**
* ColumnLayout is a class that organizes the positioning of children
@@ -83,10 +87,17 @@ package org.apache.flex.html.beads.layouts
/**
* @copy org.apache.flex.core.IBeadLayout#layout
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
*/
override public function layout():Boolean
{
var contentView:ILayoutView = layoutView;
+ COMPILE::JS {
+ if (contentView.element.style.position != "absolute" && contentView.element.style.position != "relative") {
+ contentView.element.style.position = "relative";
+ }
+ contentView.element.style["vertical-align"] = "top";
+ }
var padding:Rectangle = CSSContainerUtils.getPaddingMetrics(host);
var sw:Number = host.width;
@@ -158,6 +169,9 @@ package org.apache.flex.html.beads.layouts
col = 0;
curx = padding.left;
}
+ COMPILE::JS {
+ e.element.style.position = "absolute";
+ }
}
return true;
}
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f9740165/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
index eb9e692..00afeb6 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayout.as
@@ -160,6 +160,7 @@ package org.apache.flex.html.beads.layouts
var i:int;
var n:int;
var contentView:IParentIUIBase = layoutView as IParentIUIBase;
+ contentView.element.style["vertical-align"] = "top";
children = contentView.internalChildren();
n = children.length;
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f9740165/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayoutWithPaddingAndGap.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayoutWithPaddingAndGap.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayoutWithPaddingAndGap.as
index 9a137b4..d2df846 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayoutWithPaddingAndGap.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/layouts/VerticalLayoutWithPaddingAndGap.as
@@ -203,6 +203,7 @@ package org.apache.flex.html.beads.layouts
* @playerversion AIR 2.6
* @productversion FlexJS 0.0
* @flexjsignorecoercion org.apache.flex.core.ILayoutHost
+ * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
*/
override public function layout():Boolean
{
@@ -233,7 +234,7 @@ package org.apache.flex.html.beads.layouts
hostHeight -= paddingMetrics.top + paddingMetrics.bottom + borderMetrics.top + borderMetrics.bottom;
var xpos:Number = borderMetrics.left + paddingMetrics.left;
- var ypos:Number = borderMetrics.top + paddingMetrics.left;
+ var ypos:Number = borderMetrics.top + paddingMetrics.top;
// First pass determines the data about the child.
for(var i:int=0; i < n; i++)
@@ -283,6 +284,7 @@ package org.apache.flex.html.beads.layouts
var i:int;
var n:int;
var contentView:IParentIUIBase = layoutView as IParentIUIBase;
+ contentView.element.style["vertical-align"] = "top";
children = contentView.internalChildren();
n = children.length;