Repository: flex-asjs
Updated Branches:
  refs/heads/develop 876fa8990 -> 07dfd97bb


Fix Span


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

Branch: refs/heads/develop
Commit: 07dfd97bb0569ac6711d572f9a10e4077b2c40ce
Parents: 876fa89
Author: Carlos Rovira <carlosrov...@apache.org>
Authored: Sat Dec 10 17:10:30 2016 +0100
Committer: Carlos Rovira <carlosrov...@apache.org>
Committed: Sat Dec 10 17:10:30 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/html/Span.as  | 46 ++++++--------------
 .../flex/org/apache/flex/mdl/LayoutTitle.as     |  7 +--
 2 files changed, 15 insertions(+), 38 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07dfd97b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as
index 5f978c5..1771948 100644
--- a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Span.as
@@ -18,7 +18,7 @@
 
////////////////////////////////////////////////////////////////////////////////
 package org.apache.flex.html
 {
-       import org.apache.flex.core.UIBase;
+       import org.apache.flex.core.ContainerBase;
 
     COMPILE::JS
     {
@@ -34,7 +34,7 @@ package org.apache.flex.html
         *  @playerversion AIR 2.6
         *  @productversion FlexJS 0.0
         */
-       public class Span extends UIBase
+       public class Span extends ContainerBase
        {
                /**
                 *  constructor.
@@ -61,51 +61,33 @@ package org.apache.flex.html
          */
                public function get text():String
                {
-            COMPILE::SWF
-            {
-                return _text;
-            }
-            COMPILE::JS
-            {
-                return textNode.nodeValue;
-            }
+            return _text;
                }
 
                public function set text(value:String):void
                {
-            COMPILE::SWF
-            {
-                _text = value;
-            }
-            COMPILE::JS
-            {
-                textNode.nodeValue = value;
-            }
+            _text = value;
+
+                       COMPILE::JS
+                       {
+                               if(MXMLDescriptor == null) {
+                                       element.innerHTML = text;
+                               }
+                       }
+
                }
                
-        COMPILE::JS
-        protected var textNode:Text;
-               
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
-                * @flexjsignorecoercion HTMLSpanElement
          */
         COMPILE::JS
         override protected function createElement():WrappedHTMLElement
         {
-                       var span:HTMLElement = document.createElement('span') 
as HTMLSpanElement;
-            
-            textNode = document.createTextNode('') as Text;
-            span.appendChild(textNode); 
+                       element = document.createElement('span') as 
WrappedHTMLElement;
 
-                       element = span as WrappedHTMLElement;
-            
             positioner = element;
-            positioner.style.position = 'relative';
-                       element.flexjs_wrapper = this;
+            element.flexjs_wrapper = this;
             
-            className = typeNames = 'Span';
-
             return element;
         }
     }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/07dfd97b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/LayoutTitle.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/LayoutTitle.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/LayoutTitle.as
index bc94f19..87b30f5 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/LayoutTitle.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/LayoutTitle.as
@@ -59,12 +59,7 @@ package org.apache.flex.mdl
         {
                        typeNames = "mdl-layout-title";
                        
-                       var span:HTMLElement = document.createElement('span') 
as HTMLSpanElement;
-            
-            textNode = document.createTextNode('') as Text;
-            span.appendChild(textNode); 
-
-                       element = span as WrappedHTMLElement;
+                       element = document.createElement('span')  as 
WrappedHTMLElement;
             
             positioner = element;
                        element.flexjs_wrapper = this;

Reply via email to