Repository: flex-asjs
Updated Branches:
  refs/heads/develop e2ad230bb -> f4eb38ee2


try to fix align right


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

Branch: refs/heads/develop
Commit: ec524990804ef678c93985a2915009d8726da571
Parents: e2ad230
Author: Alex Harui <[email protected]>
Authored: Wed Oct 29 13:43:41 2014 -0700
Committer: Alex Harui <[email protected]>
Committed: Wed Oct 29 13:43:41 2014 -0700

----------------------------------------------------------------------
 .../FlexJSUI/src/org/apache/flex/core/CSSTextField.as         | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/ec524990/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
----------------------------------------------------------------------
diff --git 
a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as 
b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
index ab40d04..fa23ccd 100644
--- a/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
+++ b/frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/CSSTextField.as
@@ -19,6 +19,7 @@
 package org.apache.flex.core
 {
        import flash.text.TextField;
+    import flash.text.TextFieldAutoSize;
        import flash.text.TextFormat;
        
        import org.apache.flex.core.ValuesManager;
@@ -84,9 +85,15 @@ package org.apache.flex.core
                        tf.rightMargin = paddingRight;
             var align:Object = ValuesManager.valuesImpl.getValue(sp, 
"text-align");
             if (align == "center")
+                       {
+                               autoSize = TextFieldAutoSize.NONE;
                 tf.align = "center";
+                       }
             else if (align == "right")
+                       {
                 tf.align = "right";
+                               autoSize = TextFieldAutoSize.NONE;      
+                       }
 
                        defaultTextFormat = tf;
                        super.text = value;

Reply via email to