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 2016/11/02 15:15:02 UTC

[03/50] [abbrv] git commit: [flex-asjs] [refs/heads/develop] - SVG elements don't respond to className string assignments, so use polymorphism and assign class instead.

SVG elements don't respond to className string assignments, so use polymorphism and assign class instead.


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

Branch: refs/heads/develop
Commit: 66b2fcb87b541afc65f700c26a8c40b9dfd6e72e
Parents: d5fd8e9
Author: yishayw <yi...@hotmail.com>
Authored: Sun Oct 30 12:52:19 2016 +0200
Committer: yishayw <yi...@hotmail.com>
Committed: Sun Oct 30 12:52:19 2016 +0200

----------------------------------------------------------------------
 .../Core/src/main/flex/org/apache/flex/core/UIBase.as |  9 ++++++++-
 .../main/flex/org/apache/flex/svg/GraphicContainer.as |  5 +++++
 .../src/main/flex/org/apache/flex/svg/GraphicShape.as | 14 ++++++++++----
 3 files changed, 23 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66b2fcb8/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
index 2a9ce3e..0e4a988 100644
--- a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/UIBase.as
@@ -945,12 +945,19 @@ package org.apache.flex.core
 			{
                 COMPILE::JS
                 {
-                    element.className = typeNames ? value + ' ' + typeNames : value;             
+                    setClassName(typeNames ? value + ' ' + typeNames : value);             
                 }
 				_className = value;
 				dispatchEvent(new Event("classNameChanged"));
 			}
 		}
+		
+		COMPILE::JS
+		protected function setClassName(value:String):void
+		{
+			element.className = value;           
+		}
+		
         
         /**
          *  @copy org.apache.flex.core.Application#beads

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66b2fcb8/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
index 3e8e40e..709d6ea 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicContainer.as
@@ -67,6 +67,11 @@ package org.apache.flex.svg
 			return element;
 		}
 
+		COMPILE::JS
+		override protected function setClassName(value:String):void
+		{
+			element.setAttribute('class', value);           
+		}
 		
 		override public function get transformElement():org.apache.flex.core.WrappedHTMLElement
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/66b2fcb8/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
index 06b5585..8f9e326 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/GraphicShape.as
@@ -17,10 +17,10 @@ package org.apache.flex.svg
 	COMPILE::SWF
     {
 		import flash.display.Graphics;
-        import flash.display.Sprite;
-        import flash.geom.Point;
-        import flash.geom.Rectangle;
-        import org.apache.flex.core.WrappedSprite;
+		import flash.display.Sprite;
+		import flash.geom.Point;
+		import flash.geom.Rectangle;
+		import org.apache.flex.core.WrappedSprite;
     }
     COMPILE::JS
     {
@@ -177,6 +177,12 @@ package org.apache.flex.svg
             return fillStr + ';' + strokeStr;
         }
 
+		COMPILE::JS
+		override protected function setClassName(value:String):void
+		{
+			element.setAttribute('class', value);           
+		}
+
 
         /**
          * @param x X position.