You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2017/04/28 07:03:11 UTC

[1/5] git commit: [flex-asjs] [refs/heads/dual] - simply image/label pairs so they center in JS

Repository: flex-asjs
Updated Branches:
  refs/heads/dual f4a696828 -> eaba96161


simply image/label pairs so they center in JS


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8f3c9a0e
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8f3c9a0e
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8f3c9a0e

Branch: refs/heads/dual
Commit: 8f3c9a0eeb5d063c3ffd560098c0be10479483fa
Parents: f4a6968
Author: Alex Harui <ah...@apache.org>
Authored: Thu Apr 27 23:56:37 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Apr 27 23:56:37 2017 -0700

----------------------------------------------------------------------
 .../FlexJSStore/src/main/flex/HomeView.mxml     | 24 +++-----------------
 1 file changed, 3 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8f3c9a0e/examples/flexjs/FlexJSStore/src/main/flex/HomeView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexJSStore/src/main/flex/HomeView.mxml b/examples/flexjs/FlexJSStore/src/main/flex/HomeView.mxml
index 3a93319..ab10fa0 100755
--- a/examples/flexjs/FlexJSStore/src/main/flex/HomeView.mxml
+++ b/examples/flexjs/FlexJSStore/src/main/flex/HomeView.mxml
@@ -208,13 +208,7 @@ Width and height are hard-coded in the root tag to help the Design view.
 								<js:VerticalLayout />
 							</js:beads>
  							<js:Image id="image1" src="assets/akotter.jpg" style="margin:auto;"/>							
-							<js:Group width="100%">
-							    <js:beads>
-									<js:BasicLayout />
-							    </js:beads>
-								<js:Label text="Annette Kotter" id="feat_prod_1" style="margin:auto;fontWeight:'bold';fontSize:12"/>
-							</js:Group>
-							
+							<js:Label text="Annette Kotter" id="feat_prod_1" style="textAlign:center;fontWeight:'bold';fontSize:12;"/>
 						</js:Group>
 						
 						<js:Group width="33%" height="100%">							
@@ -222,13 +216,7 @@ Width and height are hard-coded in the root tag to help the Design view.
 								<js:VerticalLayout />
 							</js:beads>
 							<js:Image id="image2" style="margin:auto;" src="assets/bcrater.jpg"/>
-							<js:Group width="100%">
-							    <js:beads>
-									<js:BasicLayout />
-							    </js:beads>
-								<js:Label text="Ben Crater" id="feat_prod_2" style="margin:auto;fontWeight:'bold';fontSize:12"/>
-							</js:Group>
-							
+							<js:Label text="Ben Crater" id="feat_prod_2" style="textAlign:center;fontWeight:'bold';fontSize:12;"/>
 						</js:Group>
 						
 						<js:Group width="33%" height="100%">
@@ -236,13 +224,7 @@ Width and height are hard-coded in the root tag to help the Design view.
 								<js:VerticalLayout />
 							</js:beads>
 							<js:Image id="image3" style="margin:auto;" src="assets/jproctor.jpg"/>
-							<js:Group width="100%">
-							    <js:beads>
-									<js:BasicLayout />
-							    </js:beads>
-								<js:Label text="Jane Proctor" id="feat_prod_3" style="margin:auto;fontWeight:'bold';fontSize:12"/>
-							</js:Group>
-							
+							<js:Label text="Jane Proctor" id="feat_prod_3" style="textAlign:center;fontWeight:'bold';fontSize:12;"/>
 						</js:Group>
 						
 					</js:Group>


[3/5] git commit: [flex-asjs] [refs/heads/dual] - TextInput without a width isn't stretchy. It seems to have a default width

Posted by ah...@apache.org.
TextInput without a width isn't stretchy.  It seems to have a default width


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/8377006c
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/8377006c
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/8377006c

Branch: refs/heads/dual
Commit: 8377006c39efc7e453693997a78d398f5ebaab5f
Parents: 9ab3b56
Author: Alex Harui <ah...@apache.org>
Authored: Thu Apr 27 23:58:03 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Apr 27 23:58:03 2017 -0700

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/html/beads/TextInputView.as      | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/8377006c/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextInputView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextInputView.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextInputView.as
index a6f1438..be59056 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextInputView.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextInputView.as
@@ -84,6 +84,8 @@ package org.apache.flex.html.beads
                 h = textField.textHeight;
                 textField.text = s;
                 ilc.setWidth(w + uiMetrics.left + uiMetrics.right, true);
+				// TextInput doesn't stretch if no width like divs do
+				ilc.explicitWidth = ilc.width;
             }
             if (ilc.isHeightSizedToContent())
             {


[5/5] git commit: [flex-asjs] [refs/heads/dual] - these are needed for 8377006

Posted by ah...@apache.org.
these are needed for 8377006


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/eaba9616
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/eaba9616
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/eaba9616

Branch: refs/heads/dual
Commit: eaba961619d93e045bb561da5419afe7792b93b5
Parents: e981c3d
Author: Alex Harui <ah...@apache.org>
Authored: Fri Apr 28 00:01:35 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Apr 28 00:01:35 2017 -0700

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/core/ILayoutChild.as   |  2 ++
 .../main/flex/org/apache/flex/utils/MockLayoutChild.as   | 11 ++++++++++-
 .../main/flex/org/apache/flex/utils/MockLayoutParent.as  |  8 ++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaba9616/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
index da0918f..97e4561 100755
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ILayoutChild.as
@@ -68,6 +68,7 @@ package org.apache.flex.core
          *  @productversion FlexJS 0.0
          */
         function get explicitWidth():Number;
+        function set explicitWidth(value:Number):void;
         
         /**
          *  The height of this component 
@@ -79,6 +80,7 @@ package org.apache.flex.core
          *  @productversion FlexJS 0.0
          */
         function get explicitHeight():Number;
+        function set explicitHeight(value:Number):void;
         
         /**
          * Sets the height of the component without

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaba9616/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
index a8a719d..0dc4f98 100644
--- a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutChild.as
@@ -74,6 +74,11 @@ package org.apache.flex.utils
 			return _explicitHeight;
 		}
 		
+		public function set explicitHeight(value:Number):void
+		{
+			_explicitHeight = value;
+		}
+		
 		public function isHeightSizedToContent():Boolean
 		{
 			return _isHeightSizedToContent;
@@ -129,7 +134,11 @@ package org.apache.flex.utils
 		{
 			return _explicitWidth;
 		}
-		
+		public function set explicitWidth(value:Number):void
+		{
+			_explicitWidth = value;
+		}
+
 		public function isWidthSizedToContent():Boolean
 		{
 			return _isWidthSizedToContent;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/eaba9616/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
index 1da2b5a..a07a1d4 100644
--- a/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
+++ b/frameworks/projects/Effects/src/main/flex/org/apache/flex/utils/MockLayoutParent.as
@@ -182,12 +182,20 @@ package org.apache.flex.utils
 			// TODO Auto Generated method stub
 			return 0;
 		}
+		public function set explicitHeight(value:Number):void
+		{
+			// TODO Auto Generated method stub
+		}
 
 		public function get explicitWidth():Number
 		{
 			// TODO Auto Generated method stub
 			return 0;
 		}
+		public function set explicitWidth(value:Number):void
+		{
+			// TODO Auto Generated method stub
+		}
 
 		public function isHeightSizedToContent():Boolean
 		{


[2/5] git commit: [flex-asjs] [refs/heads/dual] - make sure we know autosize settings before setting text

Posted by ah...@apache.org.
make sure we know autosize settings before setting text


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/9ab3b569
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/9ab3b569
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/9ab3b569

Branch: refs/heads/dual
Commit: 9ab3b569208393549565dbf352f8f65348b6abcf
Parents: 8f3c9a0
Author: Alex Harui <ah...@apache.org>
Authored: Thu Apr 27 23:57:19 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Thu Apr 27 23:57:19 2017 -0700

----------------------------------------------------------------------
 .../org/apache/flex/html/beads/TextFieldViewBase.as     | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/9ab3b569/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextFieldViewBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextFieldViewBase.as b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextFieldViewBase.as
index 75cafb1..8176f53 100644
--- a/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextFieldViewBase.as
+++ b/frameworks/projects/Basic/src/main/flex/org/apache/flex/html/beads/TextFieldViewBase.as
@@ -96,14 +96,16 @@ package org.apache.flex.html.beads
             IEventDispatcher(_strand).addEventListener("heightChanged", heightChangeHandler);
             IEventDispatcher(_strand).addEventListener("sizeChanged", sizeChangeHandler);
 			DisplayObjectContainer(value).addChild(_textField);
-			if (_textModel.text !== null)
-				text = _textModel.text;
-			if (_textModel.html !== null)
-				html = _textModel.html;
-            
+
             var ilc:ILayoutChild = host as ILayoutChild;
             autoHeight = ilc.isHeightSizedToContent();
             autoWidth = ilc.isWidthSizedToContent();
+			
+			if (_textModel.text !== null)
+				text = _textModel.text;
+			if (_textModel.html !== null)
+				html = _textModel.html;            
+			
             if (!autoWidth && !isNaN(ilc.explicitWidth))
             {
                 widthChangeHandler(null);


[4/5] git commit: [flex-asjs] [refs/heads/dual] - in browser, looks like block stretches child blocks

Posted by ah...@apache.org.
in browser, looks like block stretches child blocks


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/e981c3d3
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/e981c3d3
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/e981c3d3

Branch: refs/heads/dual
Commit: e981c3d3119f6240504ee4c1ddb25d6c8f7a2dc9
Parents: 8377006
Author: Alex Harui <ah...@apache.org>
Authored: Fri Apr 28 00:00:52 2017 -0700
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Apr 28 00:00:52 2017 -0700

----------------------------------------------------------------------
 .../flex/org/apache/flex/html/beads/layouts/VerticalLayout.as   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e981c3d3/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 6357e9f..16c81a0 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
@@ -126,6 +126,11 @@ package org.apache.flex.html.beads.layouts
 							childWidth = hostWidth * ilc.percentWidth/100.0;
 							ilc.setWidth(childWidth);
 						}
+						else if (ilc.isWidthSizedToContent() && !margins.auto)
+						{
+							childWidth = hostWidth;
+							ilc.setWidth(childWidth);
+						}
 						if (margins.auto)
 							childXpos = (hostWidth - childWidth) / 2;
 					}