You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2016/07/28 12:05:56 UTC

[1/7] git commit: [flex-asjs] [refs/heads/refactor-sprite] - TransformBead working.

Repository: flex-asjs
Updated Branches:
  refs/heads/refactor-sprite 98822cbc6 -> f30fd3234


TransformBead working.


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

Branch: refs/heads/refactor-sprite
Commit: 518995ed1f9fb2edba8a58b4038c85e1c8b2d4c9
Parents: 580eded
Author: yishayw <yi...@hotmail.com>
Authored: Thu Jul 28 02:47:21 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Jul 28 02:47:21 2016 +0300

----------------------------------------------------------------------
 .../projects/Core/src/main/flex/CoreClasses.as  |   1 +
 .../org/apache/flex/core/ITransformModel.as     |  47 +++++
 .../projects/Graphics/.actionScriptProperties   |  21 --
 frameworks/projects/Graphics/.flexLibProperties |  23 +--
 .../Graphics/src/main/flex/GraphicsClasses.as   |   2 +
 .../org/apache/flex/graphics/IBeadTransform.as  |  46 +++++
 .../org/apache/flex/graphics/ITransformHost.as  |  64 ++++++
 .../org/apache/flex/graphics/TransformModel.as  |  31 +++
 .../org/apache/flex/svg/GraphicContainer.as     | 201 +++++++++++++++++--
 .../flex/org/apache/flex/svg/TransformBead.as   |  90 +++++++++
 10 files changed, 465 insertions(+), 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as b/frameworks/projects/Core/src/main/flex/CoreClasses.as
index a1cfe9c..2fa67a5 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -67,6 +67,7 @@ internal class CoreClasses
     import org.apache.flex.core.IParentIUIBase; IParentIUIBase;
     import org.apache.flex.core.IPopUp; IPopUp;
     import org.apache.flex.core.IRangeModel; IRangeModel;
+	import org.apache.flex.core.ITransformModel; ITransformModel;
     import org.apache.flex.core.IRollOverModel; IRollOverModel;
 	COMPILE::SWF
 	{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformModel.as
new file mode 100644
index 0000000..56cb961
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformModel.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.geom.Matrix;
+	
+    /**
+     *  The ITransformModel interface describes the minimum set of properties
+     *  needed to define a transformation on an object.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+	public interface ITransformModel extends IEventDispatcher, IBeadModel
+	{
+        /**
+         *  The matrix of the Transform
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+		function get matrix():Matrix;
+		function set matrix(value:Matrix):void;
+		
+	}
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Graphics/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/.actionScriptProperties b/frameworks/projects/Graphics/.actionScriptProperties
index f3a3b57..f398fbb 100644
--- a/frameworks/projects/Graphics/.actionScriptProperties
+++ b/frameworks/projects/Graphics/.actionScriptProperties
@@ -1,22 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
 <actionScriptProperties analytics="false" mainApplicationPath="Graphics.as" projectUUID="ff3e0531-b7c9-4b0c-9146-05c27a47f837" version="11">
   <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::SWF,true&#10;-define=COMPILE::JS,false&#10;-load-config=../config/compile-as-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>
@@ -31,19 +13,16 @@ limitations under the License.
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/Collections.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/Mobile.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/HTML.swc" useDefaultLinkType="false"/>
-          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/Core.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/Binding.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/Charts.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/Graphics.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/flex.swc" useDefaultLinkType="false"/>
-          <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/core.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/Network.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/GoogleMaps.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/DragDrop.swc" useDefaultLinkType="false"/>
           <libraryPathEntry kind="3" linkType="1" path="${PROJECT_FRAMEWORKS}/libs/CreateJS.swc" useDefaultLinkType="false"/>
         </excludedEntries>
       </libraryPathEntry>
-      <libraryPathEntry kind="3" linkType="1" path="/Core/target/Core.swc" useDefaultLinkType="false"/>
     </libraryPath>
     <sourceAttachmentPath/>
   </compiler>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Graphics/.flexLibProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/.flexLibProperties b/frameworks/projects/Graphics/.flexLibProperties
index 20339ea..096c2b5 100644
--- a/frameworks/projects/Graphics/.flexLibProperties
+++ b/frameworks/projects/Graphics/.flexLibProperties
@@ -1,24 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
 <flexLibProperties includeAllClasses="true" useMultiPlatformConfig="false" version="3">
-  <includeClasses/>
+  <includeClasses>
+    <classEntry path="org.apache.flex.svg.TransformBead"/>
+    <classEntry path="org.apache.flex.graphics.ITransformHost"/>
+  </includeClasses>
   <includeResources/>
   <namespaceManifests/>
 </flexLibProperties>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
index 0cc1db9..b8a5765 100644
--- a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
+++ b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
@@ -39,6 +39,8 @@ internal class GraphicsClasses
 	import org.apache.flex.svg.Text; Text;
 	import org.apache.flex.svg.CompoundGraphic; CompoundGraphic;
 	import org.apache.flex.svg.LinearGradient; LinearGradient;
+	import org.apache.flex.graphics.TransformModel; TransformModel;
+	import org.apache.flex.svg.TransformBead; TransformBead;
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as
new file mode 100644
index 0000000..1a8f61c
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as
@@ -0,0 +1,46 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.graphics
+{
+	import org.apache.flex.core.IBead;
+
+	/**
+	 *  The IBeadTransform interface is the basic interface for the 
+	 *  container views that transform drawable objects that implement ITransformHost
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public interface IBeadTransform extends IBead
+	{
+		
+		/**
+		 *  Transform the ITransformHost. The implementor of this method should
+		 *  have concrete knowledge of ITransformHost implementor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function transform():void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as
new file mode 100644
index 0000000..6310dd0
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as
@@ -0,0 +1,64 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.graphics
+{
+	import org.apache.flex.core.IFlexJSElement;
+	import org.apache.flex.core.IStrand;
+	
+	
+
+	/**
+	 *  The ITransformHost interface is the basic interface for the 
+	 *  container views that have an IBeadTransform.
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public interface ITransformHost extends IStrand
+	{
+		/**
+		 *  Each ITransformHost has an element that is actually added to
+		 *  the platform's display list DOM.  It may not be the actual
+		 *  component itself.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		COMPILE::SWF
+		function get transformElement():IFlexJSElement;
+		
+		/**
+		 *  Each ITransformHost has an element that is actually added to
+		 *  the platform's display list DOM.  It may not be the actual
+		 *  component itself.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		COMPILE::JS
+		function get transformElement():org.apache.flex.core.WrappedHTMLElement;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as
new file mode 100644
index 0000000..68d650b
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as
@@ -0,0 +1,31 @@
+package org.apache.flex.graphics
+{
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ITransformModel;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.EventDispatcher;
+	import org.apache.flex.geom.Matrix;
+	
+	public class TransformModel extends EventDispatcher implements ITransformModel
+	{
+		private var _matrix:Matrix;
+		
+		public function TransformModel()
+		{
+		}
+		
+		public function get matrix():Matrix
+		{
+			return _matrix;
+		}
+
+		public function set matrix(value:Matrix):void
+		{
+			_matrix = value;
+			dispatchEvent(new Event(Event.CHANGE));
+		}
+		
+		public function set strand(value:IStrand):void {}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/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 d156f2d..b40b53b 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
@@ -14,15 +14,19 @@
 package org.apache.flex.svg
 {
     import org.apache.flex.core.ContainerBase;
-    import org.apache.flex.core.IParent;
-    import org.apache.flex.events.Event;
+    import org.apache.flex.core.IFlexJSElement;
+    import org.apache.flex.graphics.ITransformHost;
 
 	COMPILE::JS
 	{
-		import org.apache.flex.core.WrappedHTMLElement;
+		import org.apache.flex.core.IContainer;
+		import org.apache.flex.core.UIBase;
 	}
 
-    public class GraphicContainer extends ContainerBase
+	[DefaultProperty("mxmlContent")]
+
+	COMPILE::SWF
+    public class GraphicContainer extends ContainerBase implements ITransformHost
     {
         public function GraphicContainer()
         {
@@ -30,12 +34,50 @@ package org.apache.flex.svg
         }
 
 		/**
+		 *  @private
+		 */
+		override public function addElement(c:Object, dispatchEvent:Boolean = true):void
+		{
+			if(c is GraphicShape)
+				super.addElement(c, dispatchEvent);
+			else 
+				throw new Error("Only svg elements can be added to svg containers");
+		}
+		
+		/**
+		 *  @private
+		 */
+		override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
+		{
+			if(c is GraphicShape)
+				super.addElementAt(c, index, dispatchEvent);
+			else 
+				throw new Error("Only svg elements can be added to svg containers");
+		}
+		
+		public function get transformElement():IFlexJSElement
+		{
+			return element;
+		}
+
+    }
+	
+	COMPILE::JS
+	public class GraphicContainer extends UIBase implements ITransformHost, IContainer
+	{
+		private var graphicGroup:ContainerBase;
+		
+		public function GraphicContainer()
+		{
+			super();
+		}
+		
+		/**
 		 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
 		 */
-		COMPILE::JS
-		override protected function createElement():WrappedHTMLElement
+		override protected function createElement():org.apache.flex.core.WrappedHTMLElement
 		{
-			element = document.createElementNS('http://www.w3.org/2000/svg', 'svg') as WrappedHTMLElement;
+			element = document.createElementNS('http://www.w3.org/2000/svg', 'svg') as org.apache.flex.core.WrappedHTMLElement;
 			
 			positioner = element;
 			
@@ -46,34 +88,151 @@ package org.apache.flex.svg
 			positioner.style.position = 'relative';
 			element.flexjs_wrapper = this;
 			
-			/*addEventListener('childrenAdded',
-			runLayoutHandler);
-			addEventListener('elementRemoved',
-			runLayoutHandler);*/
-			
+			graphicGroup = new GraphicGroup();
+			addElement(graphicGroup);
 			return element;
 		}
+
+		
+		public function get transformElement():org.apache.flex.core.WrappedHTMLElement
+		{
+			return graphicGroup.element;
+		}
+
 		/**
-		 *  @private
+		 *  @copy org.apache.flex.core.IParent#getElementAt()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function getElementAt(index:int):Object
+		{
+			return graphicGroup.getElementAt(index);
+		}        
+		
+		/**
+		 *  @copy org.apache.flex.core.IParent#addElement()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
 		 */
 		override public function addElement(c:Object, dispatchEvent:Boolean = true):void
 		{
-			if(c is GraphicShape)
-				super.addElement(c, dispatchEvent);
-			else 
+			if(!(c is GraphicShape))
+			{
 				throw new Error("Only svg elements can be added to svg containers");
+			}
+			graphicGroup.addElement(c, dispatchEvent);
+			if (dispatchEvent)
+				this.dispatchEvent(new Event("childrenAdded"));
 		}
 		
 		/**
-		 *  @private
+		 *  @copy org.apache.flex.core.IParent#addElementAt()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
 		 */
 		override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
 		{
-			if(c is GraphicShape)
-				super.addElementAt(c, index, dispatchEvent);
-			else 
+			if(!(c is GraphicShape))
+			{
 				throw new Error("Only svg elements can be added to svg containers");
+			}
+			graphicGroup.addElementAt(c, index, dispatchEvent);
+			if (dispatchEvent)
+				this.dispatchEvent(new Event("childrenAdded"));
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.IParent#removeElement()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function removeElement(c:Object, dispatchEvent:Boolean = true):void
+		{
+			graphicGroup.removeElement(c, dispatchEvent);
+			if (dispatchEvent)
+				this.dispatchEvent(new Event("childrenRemoved"));
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.IContainer#childrenAdded()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function childrenAdded():void
+		{
+			dispatchEvent(new Event("childrenAdded"));
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.IParent#getElementIndex()
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function getElementIndex(c:Object):int
+		{
+			return graphicGroup.getElementIndex(c);
 		}
+		
+		
+		/**
+		 *  The number of elements in the parent.
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		override public function get numElements():int
+		{
+			return graphicGroup.numElements;
+		}
+	}
+}
 
-    }
+import org.apache.flex.core.ContainerBase;
+
+class GraphicGroup extends ContainerBase
+{
+	COMPILE::JS
+	/**
+	 * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+	 */
+	override protected function createElement():org.apache.flex.core.WrappedHTMLElement
+	{
+		element = document.createElementNS('http://www.w3.org/2000/svg', 'g') as org.apache.flex.core.WrappedHTMLElement;
+		
+		positioner = element;
+		
+		// absolute positioned children need a non-null
+		// position value in the parent.  It might
+		// get set to 'absolute' if the container is
+		// also absolutely positioned
+		positioner.style.position = 'relative';
+		element.flexjs_wrapper = this;
+		
+		/*addEventListener('childrenAdded',
+		runLayoutHandler);
+		addEventListener('elementRemoved',
+		runLayoutHandler);*/
+		
+		return element;
+	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/518995ed/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
new file mode 100644
index 0000000..ed9de0e
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
@@ -0,0 +1,90 @@
+package org.apache.flex.svg
+{
+	import org.apache.flex.core.IStrand;
+	import org.apache.flex.core.ITransformModel;
+	import org.apache.flex.events.Event;
+	import org.apache.flex.geom.Matrix;
+	import org.apache.flex.graphics.IBeadTransform;
+	import org.apache.flex.graphics.ITransformHost;
+
+	COMPILE::SWF {
+		import flash.display.Sprite;
+		import flash.geom.Matrix;
+	}
+	
+	
+	public class TransformBead implements IBeadTransform
+	{
+		private var _strand:IStrand;
+		private var transformModel:ITransformModel;
+		
+		public function TransformBead()
+		{
+		}
+		
+		/**
+		 *  @copy org.apache.flex.core.IBead#strand
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */		
+		public function set strand(value:IStrand):void
+		{
+			if (!(value is GraphicContainer))
+			{
+				throw new Error("This bead only works with svg GraphicContainers");
+				return;
+			}
+			_strand = value;
+			transformModel = value.getBeadByType(ITransformModel) as ITransformModel;
+			if (!transformModel)
+			{
+				throw new Error("An ITransformModel needs to be defined.");
+				return;
+			}
+			transformModel.addEventListener(Event.CHANGE, changeHandler);
+			if (transformModel.matrix)
+			{
+				transform();
+			}
+		}
+		
+		COMPILE::SWF
+		public function transform():void
+		{
+			var element:Sprite = host.transformElement as Sprite;
+			var fjsm:org.apache.flex.geom.Matrix = transformModel.matrix;
+			var flashMatrix:flash.geom.Matrix = new flash.geom.Matrix(fjsm.a, fjsm.b, fjsm.c, fjsm.d, fjsm.tx, fjsm.ty);
+			element.transform.matrix = flashMatrix;
+		}
+		
+		COMPILE::JS
+		public function transform():void
+		{
+			var element:org.apache.flex.core.WrappedHTMLElement = host.transformElement;
+			var fjsm:org.apache.flex.geom.Matrix = transformModel.matrix;
+			var elem:Array = [fjsm.a , fjsm.b, fjsm.c, fjsm.d, fjsm.tx, fjsm.ty];
+			element.setAttribute("transform", "matrix(" +elem.join(",") + ")";
+		}
+		
+		private function changeHandler(e:Event):void
+		{
+			transform();
+		}
+		
+		/**
+		 *  The host component. 
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		public function get host():ITransformHost
+		{
+			return _strand as ITransformHost;
+		}
+	}
+}
\ No newline at end of file


[6/7] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Add to new beads to manifest files.

Posted by ha...@apache.org.
Add to new beads to manifest files.


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

Branch: refs/heads/refactor-sprite
Commit: fa40021ed5dd43182e42f048f21c5151c0b84b71
Parents: 54fd2b4
Author: yishayw <yi...@hotmail.com>
Authored: Thu Jul 28 13:24:24 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Jul 28 13:24:24 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/Core/src/main/resources/basic-manifest.xml   | 2 ++
 frameworks/projects/Graphics/src/main/resources/svg-manifest.xml | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fa40021e/frameworks/projects/Core/src/main/resources/basic-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/resources/basic-manifest.xml b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
index a196a57..0131eca 100644
--- a/frameworks/projects/Core/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
@@ -36,6 +36,8 @@
     <component id="ParentDocumentBead" class="org.apache.flex.core.ParentDocumentBead"/>
     <component id="MixinManager" class="org.apache.flex.utils.MixinManager" />
     <component id="ViewSourceContextMenuOption" class="org.apache.flex.utils.ViewSourceContextMenuOption" />
+    <component id="TransformModel" class="org.apache.flex.core.TransformModel" />
+    <component id="TransformRotateModel" class="org.apache.flex.core.TransformRotateModel" />
     
     <component id="State" class="org.apache.flex.states.State"/>
 </componentPackage>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/fa40021e/frameworks/projects/Graphics/src/main/resources/svg-manifest.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/resources/svg-manifest.xml b/frameworks/projects/Graphics/src/main/resources/svg-manifest.xml
index 0b49d33..08d278a 100644
--- a/frameworks/projects/Graphics/src/main/resources/svg-manifest.xml
+++ b/frameworks/projects/Graphics/src/main/resources/svg-manifest.xml
@@ -26,5 +26,6 @@
 	<component id="Rect" class="org.apache.flex.svg.Rect" />
 	<component id="CompoundGraphic" class="org.apache.flex.svg.CompoundGraphic" />
 	<component id="GraphicContainer" class="org.apache.flex.svg.GraphicContainer" />
-  <component id="LinearGradient" class="org.apache.flex.svg.LinearGradient" />
+	<component id="TransformBead" class="org.apache.flex.svg.TransformBead" />
+  	<component id="LinearGradient" class="org.apache.flex.svg.LinearGradient" />
 </componentPackage>


[5/7] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Moved transform classes that were not specific to graphics to core.

Posted by ha...@apache.org.
Moved transform classes that were not specific to graphics to core.


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

Branch: refs/heads/refactor-sprite
Commit: 54fd2b4d89fc539a80ee8136f1e45b958868c1f8
Parents: 054a000
Author: yishayw <yi...@hotmail.com>
Authored: Thu Jul 28 11:45:23 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Jul 28 11:45:23 2016 +0300

----------------------------------------------------------------------
 .../projects/Core/src/main/flex/CoreClasses.as  |  8 ++-
 .../flex/org/apache/flex/core/IBeadTransform.as | 45 ++++++++++++++
 .../flex/org/apache/flex/core/ITransformHost.as | 62 +++++++++++++++++++
 .../flex/org/apache/flex/core/TransformModel.as | 29 +++++++++
 .../apache/flex/core/TransformRotateModel.as    | 28 +++++++++
 .../Graphics/src/main/flex/GraphicsClasses.as   |  2 -
 .../org/apache/flex/graphics/IBeadTransform.as  | 46 --------------
 .../org/apache/flex/graphics/ITransformHost.as  | 64 --------------------
 .../org/apache/flex/graphics/TransformModel.as  | 31 ----------
 .../flex/graphics/TransformRotateModel.as       | 28 ---------
 .../org/apache/flex/svg/GraphicContainer.as     |  2 +-
 .../flex/org/apache/flex/svg/TransformBead.as   |  4 +-
 12 files changed, 173 insertions(+), 176 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as b/frameworks/projects/Core/src/main/flex/CoreClasses.as
index 2fa67a5..72e9230 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -40,7 +40,8 @@ internal class CoreClasses
     import org.apache.flex.core.IAlertModel; IAlertModel;
     import org.apache.flex.core.IBead; IBead;
     import org.apache.flex.core.IBeadController; IBeadController;
-    import org.apache.flex.core.IBeadLayout; IBeadLayout;
+	import org.apache.flex.core.IBeadLayout; IBeadLayout;
+	import org.apache.flex.core.IBeadTransform; IBeadTransform;
     import org.apache.flex.core.IBeadModel; IBeadModel;
     import org.apache.flex.core.IBeadView; IBeadView;
 	COMPILE::SWF
@@ -68,6 +69,7 @@ internal class CoreClasses
     import org.apache.flex.core.IPopUp; IPopUp;
     import org.apache.flex.core.IRangeModel; IRangeModel;
 	import org.apache.flex.core.ITransformModel; ITransformModel;
+	import org.apache.flex.core.ITransformHost; ITransformHost;
     import org.apache.flex.core.IRollOverModel; IRollOverModel;
 	COMPILE::SWF
 	{
@@ -147,7 +149,9 @@ internal class CoreClasses
     import org.apache.flex.core.IDataGridModel; IDataGridModel;
     import org.apache.flex.core.IDataGridPresentationModel; IDataGridPresentationModel;
     import org.apache.flex.core.IDateChooserModel; IDateChooserModel;
-    import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
+	import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
+	import org.apache.flex.core.TransformModel; TransformModel;
+	import org.apache.flex.core.TransformRotateModel; TransformRotateModel;
     import org.apache.flex.utils.CSSUtils; CSSUtils;
 
     import org.apache.flex.utils.Proxy; Proxy;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadTransform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadTransform.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadTransform.as
new file mode 100644
index 0000000..41e52e4
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/IBeadTransform.as
@@ -0,0 +1,45 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+
+	/**
+	 *  The IBeadTransform interface is the basic interface for the 
+	 *  container views that transform drawable objects that implement ITransformHost
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public interface IBeadTransform extends IBead
+	{
+		
+		/**
+		 *  Transform the ITransformHost. The implementor of this method should
+		 *  have concrete knowledge of ITransformHost implementor.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		function transform():void;
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformHost.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformHost.as
new file mode 100644
index 0000000..3553cc3
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/ITransformHost.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.core
+{
+	
+	
+
+	/**
+	 *  The ITransformHost interface is the basic interface for the 
+	 *  container views that have an IBeadTransform.
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	public interface ITransformHost extends IStrand
+	{
+		/**
+		 *  Each ITransformHost has an element that is actually added to
+		 *  the platform's display list DOM.  It may not be the actual
+		 *  component itself.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		COMPILE::SWF
+		function get transformElement():IFlexJSElement;
+		
+		/**
+		 *  Each ITransformHost has an element that is actually added to
+		 *  the platform's display list DOM.  It may not be the actual
+		 *  component itself.
+		 *  
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+		 */
+		COMPILE::JS
+		function get transformElement():org.apache.flex.core.WrappedHTMLElement;
+		
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformModel.as
new file mode 100644
index 0000000..6f0df64
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformModel.as
@@ -0,0 +1,29 @@
+package org.apache.flex.core
+{
+	import org.apache.flex.events.Event;
+	import org.apache.flex.events.EventDispatcher;
+	import org.apache.flex.geom.Matrix;
+	
+	public class TransformModel extends EventDispatcher implements ITransformModel
+	{
+		private var _matrix:Matrix;
+		
+		public function TransformModel()
+		{
+		}
+		
+		public function get matrix():Matrix
+		{
+			return _matrix;
+		}
+
+		public function set matrix(value:Matrix):void
+		{
+			_matrix = value;
+			dispatchEvent(new Event(Event.CHANGE));
+		}
+		
+		public function set strand(value:IStrand):void {}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformRotateModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformRotateModel.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformRotateModel.as
new file mode 100644
index 0000000..b08c767
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformRotateModel.as
@@ -0,0 +1,28 @@
+package org.apache.flex.core
+{
+	import org.apache.flex.geom.Matrix;
+	
+	
+	public class TransformRotateModel extends TransformModel
+	{
+		private var _angle:Number;
+		
+		public function TransformRotateModel()
+		{
+		}
+		
+		public function get angle():Number
+		{
+			return _angle;
+		}
+
+		public function set angle(value:Number):void
+		{
+			_angle = value;
+			var radians:Number = value * Math.PI/180;
+			matrix = new Matrix(Math.cos(radians), Math.sin(radians), -Math.sin(radians), Math.cos(radians));
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
index 17a1349..55fccb5 100644
--- a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
+++ b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
@@ -39,8 +39,6 @@ internal class GraphicsClasses
 	import org.apache.flex.svg.Text; Text;
 	import org.apache.flex.svg.CompoundGraphic; CompoundGraphic;
 	import org.apache.flex.svg.LinearGradient; LinearGradient;
-	import org.apache.flex.graphics.TransformModel; TransformModel;
-	import org.apache.flex.graphics.TransformRotateModel; TransformRotateModel;
 	import org.apache.flex.svg.TransformBead; TransformBead;
 }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as
deleted file mode 100644
index 1a8f61c..0000000
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/IBeadTransform.as
+++ /dev/null
@@ -1,46 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.graphics
-{
-	import org.apache.flex.core.IBead;
-
-	/**
-	 *  The IBeadTransform interface is the basic interface for the 
-	 *  container views that transform drawable objects that implement ITransformHost
-	 * 
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public interface IBeadTransform extends IBead
-	{
-		
-		/**
-		 *  Transform the ITransformHost. The implementor of this method should
-		 *  have concrete knowledge of ITransformHost implementor.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		function transform():void;
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as
deleted file mode 100644
index 6310dd0..0000000
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/ITransformHost.as
+++ /dev/null
@@ -1,64 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  Licensed to the Apache Software Foundation (ASF) under one or more
-//  contributor license agreements.  See the NOTICE file distributed with
-//  this work for additional information regarding copyright ownership.
-//  The ASF licenses this file to You under the Apache License, Version 2.0
-//  (the "License"); you may not use this file except in compliance with
-//  the License.  You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-//  Unless required by applicable law or agreed to in writing, software
-//  distributed under the License is distributed on an "AS IS" BASIS,
-//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-//  See the License for the specific language governing permissions and
-//  limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package org.apache.flex.graphics
-{
-	import org.apache.flex.core.IFlexJSElement;
-	import org.apache.flex.core.IStrand;
-	
-	
-
-	/**
-	 *  The ITransformHost interface is the basic interface for the 
-	 *  container views that have an IBeadTransform.
-	 * 
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10.2
-	 *  @playerversion AIR 2.6
-	 *  @productversion FlexJS 0.0
-	 */
-	public interface ITransformHost extends IStrand
-	{
-		/**
-		 *  Each ITransformHost has an element that is actually added to
-		 *  the platform's display list DOM.  It may not be the actual
-		 *  component itself.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		COMPILE::SWF
-		function get transformElement():IFlexJSElement;
-		
-		/**
-		 *  Each ITransformHost has an element that is actually added to
-		 *  the platform's display list DOM.  It may not be the actual
-		 *  component itself.
-		 *  
-		 *  @langversion 3.0
-		 *  @playerversion Flash 10.2
-		 *  @playerversion AIR 2.6
-		 *  @productversion FlexJS 0.0
-		 */
-		COMPILE::JS
-		function get transformElement():org.apache.flex.core.WrappedHTMLElement;
-		
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as
deleted file mode 100644
index 68d650b..0000000
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformModel.as
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.apache.flex.graphics
-{
-	import org.apache.flex.core.IStrand;
-	import org.apache.flex.core.ITransformModel;
-	import org.apache.flex.events.Event;
-	import org.apache.flex.events.EventDispatcher;
-	import org.apache.flex.geom.Matrix;
-	
-	public class TransformModel extends EventDispatcher implements ITransformModel
-	{
-		private var _matrix:Matrix;
-		
-		public function TransformModel()
-		{
-		}
-		
-		public function get matrix():Matrix
-		{
-			return _matrix;
-		}
-
-		public function set matrix(value:Matrix):void
-		{
-			_matrix = value;
-			dispatchEvent(new Event(Event.CHANGE));
-		}
-		
-		public function set strand(value:IStrand):void {}
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as
deleted file mode 100644
index 2dd97fc..0000000
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as
+++ /dev/null
@@ -1,28 +0,0 @@
-package org.apache.flex.graphics
-{
-	import org.apache.flex.geom.Matrix;
-	
-	
-	public class TransformRotateModel extends TransformModel
-	{
-		private var _angle:Number;
-		
-		public function TransformRotateModel()
-		{
-		}
-		
-		public function get angle():Number
-		{
-			return _angle;
-		}
-
-		public function set angle(value:Number):void
-		{
-			_angle = value;
-			var radians:Number = value * Math.PI/180;
-			matrix = new Matrix(Math.cos(radians), Math.sin(radians), -Math.sin(radians), Math.cos(radians));
-		}
-
-
-	}
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/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 351bcec..0967b85 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
@@ -15,7 +15,7 @@ package org.apache.flex.svg
 {
     import org.apache.flex.core.ContainerBase;
     import org.apache.flex.core.IFlexJSElement;
-    import org.apache.flex.graphics.ITransformHost;
+    import org.apache.flex.core.ITransformHost;
 
 	COMPILE::JS
 	{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/54fd2b4d/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
index 3cba59b..e852db5 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
@@ -4,8 +4,8 @@ package org.apache.flex.svg
 	import org.apache.flex.core.ITransformModel;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.geom.Matrix;
-	import org.apache.flex.graphics.IBeadTransform;
-	import org.apache.flex.graphics.ITransformHost;
+	import org.apache.flex.core.IBeadTransform;
+	import org.apache.flex.core.ITransformHost;
 
 	COMPILE::SWF {
 		import flash.display.Sprite;


[3/7] git commit: [flex-asjs] [refs/heads/refactor-sprite] - First working version on JS side.

Posted by ha...@apache.org.
First working version on 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/37251739
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/37251739
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/37251739

Branch: refs/heads/refactor-sprite
Commit: 372517392e007d846fecb8785450ac0fc26249cf
Parents: a94a923
Author: yishayw <yi...@hotmail.com>
Authored: Thu Jul 28 11:00:23 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Jul 28 11:00:23 2016 +0300

----------------------------------------------------------------------
 .../flex/graphics/TransformRotateModel.as       | 28 +++++++++++++++++
 .../org/apache/flex/svg/GraphicContainer.as     | 32 +-------------------
 .../flex/org/apache/flex/svg/TransformBead.as   |  9 ++++--
 3 files changed, 35 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/37251739/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as
new file mode 100644
index 0000000..2dd97fc
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/graphics/TransformRotateModel.as
@@ -0,0 +1,28 @@
+package org.apache.flex.graphics
+{
+	import org.apache.flex.geom.Matrix;
+	
+	
+	public class TransformRotateModel extends TransformModel
+	{
+		private var _angle:Number;
+		
+		public function TransformRotateModel()
+		{
+		}
+		
+		public function get angle():Number
+		{
+			return _angle;
+		}
+
+		public function set angle(value:Number):void
+		{
+			_angle = value;
+			var radians:Number = value * Math.PI/180;
+			matrix = new Matrix(Math.cos(radians), Math.sin(radians), -Math.sin(radians), Math.cos(radians));
+		}
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/37251739/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 b40b53b..351bcec 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
@@ -33,28 +33,6 @@ package org.apache.flex.svg
             super();
         }
 
-		/**
-		 *  @private
-		 */
-		override public function addElement(c:Object, dispatchEvent:Boolean = true):void
-		{
-			if(c is GraphicShape)
-				super.addElement(c, dispatchEvent);
-			else 
-				throw new Error("Only svg elements can be added to svg containers");
-		}
-		
-		/**
-		 *  @private
-		 */
-		override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
-		{
-			if(c is GraphicShape)
-				super.addElementAt(c, index, dispatchEvent);
-			else 
-				throw new Error("Only svg elements can be added to svg containers");
-		}
-		
 		public function get transformElement():IFlexJSElement
 		{
 			return element;
@@ -89,7 +67,7 @@ package org.apache.flex.svg
 			element.flexjs_wrapper = this;
 			
 			graphicGroup = new GraphicGroup();
-			addElement(graphicGroup);
+			super.addElement(graphicGroup);
 			return element;
 		}
 
@@ -122,10 +100,6 @@ package org.apache.flex.svg
 		 */
 		override public function addElement(c:Object, dispatchEvent:Boolean = true):void
 		{
-			if(!(c is GraphicShape))
-			{
-				throw new Error("Only svg elements can be added to svg containers");
-			}
 			graphicGroup.addElement(c, dispatchEvent);
 			if (dispatchEvent)
 				this.dispatchEvent(new Event("childrenAdded"));
@@ -141,10 +115,6 @@ package org.apache.flex.svg
 		 */
 		override public function addElementAt(c:Object, index:int, dispatchEvent:Boolean = true):void
 		{
-			if(!(c is GraphicShape))
-			{
-				throw new Error("Only svg elements can be added to svg containers");
-			}
 			graphicGroup.addElementAt(c, index, dispatchEvent);
 			if (dispatchEvent)
 				this.dispatchEvent(new Event("childrenAdded"));

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/37251739/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
index ed9de0e..3cba59b 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/svg/TransformBead.as
@@ -59,14 +59,17 @@ package org.apache.flex.svg
 			var flashMatrix:flash.geom.Matrix = new flash.geom.Matrix(fjsm.a, fjsm.b, fjsm.c, fjsm.d, fjsm.tx, fjsm.ty);
 			element.transform.matrix = flashMatrix;
 		}
-		
+		/**
+		 * @flexjsignorecoercion HTMLElement
+		 */
 		COMPILE::JS
 		public function transform():void
 		{
 			var element:org.apache.flex.core.WrappedHTMLElement = host.transformElement;
+			(element.parentNode as HTMLElement).setAttribute("overflow", "visible");
 			var fjsm:org.apache.flex.geom.Matrix = transformModel.matrix;
-			var elem:Array = [fjsm.a , fjsm.b, fjsm.c, fjsm.d, fjsm.tx, fjsm.ty];
-			element.setAttribute("transform", "matrix(" +elem.join(",") + ")";
+			var matrixArray:Array = [fjsm.a , fjsm.b, fjsm.c, fjsm.d, fjsm.tx, fjsm.ty];
+			element.setAttribute("transform", "matrix(" +matrixArray.join(",") + ")";
 		}
 		
 		private function changeHandler(e:Event):void


[7/7] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Merge branch 'svg-rename' into refactor-sprite

Posted by ha...@apache.org.
Merge branch 'svg-rename' into refactor-sprite

* svg-rename:
  Add to new beads to manifest files.
  Moved transform classes that were not specific to graphics to core.
  First working version on JS side.
  First working version on JS side.
  TransformBead working.

Conflicts:
	frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as


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

Branch: refs/heads/refactor-sprite
Commit: f30fd32349e0d97422faf5b96a3a16dc673e1ac0
Parents: 98822cb fa40021
Author: Harbs <ha...@in-tools.com>
Authored: Thu Jul 28 15:05:50 2016 +0300
Committer: Harbs <ha...@in-tools.com>
Committed: Thu Jul 28 15:05:50 2016 +0300

----------------------------------------------------------------------
 .../projects/Core/src/main/flex/CoreClasses.as  |   9 +-
 .../flex/org/apache/flex/core/IBeadTransform.as |  45 +++++
 .../flex/org/apache/flex/core/ITransformHost.as |  62 +++++++
 .../org/apache/flex/core/ITransformModel.as     |  47 +++++
 .../flex/org/apache/flex/core/TransformModel.as |  29 +++
 .../apache/flex/core/TransformRotateModel.as    |  28 +++
 .../Core/src/main/resources/basic-manifest.xml  |   2 +
 .../Graphics/src/main/flex/GraphicsClasses.as   |   1 +
 .../org/apache/flex/svg/GraphicContainer.as     | 175 ++++++++++++++++---
 .../flex/org/apache/flex/svg/TransformBead.as   |  93 ++++++++++
 .../src/main/resources/svg-manifest.xml         |   3 +-
 11 files changed, 468 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f30fd323/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f30fd323/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
----------------------------------------------------------------------
diff --cc frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
index 916d6b4,55fccb5..fefcc10
--- a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
+++ b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
@@@ -39,14 -39,7 +39,15 @@@ internal class GraphicsClasse
  	import org.apache.flex.svg.Text; Text;
  	import org.apache.flex.svg.CompoundGraphic; CompoundGraphic;
  	import org.apache.flex.svg.LinearGradient; LinearGradient;
 +	import org.apache.flex.graphics.CubicCurve; CubicCurve;
 +	import org.apache.flex.graphics.LineStyle; LineStyle;
 +	import org.apache.flex.graphics.LineTo; LineTo;
 +	import org.apache.flex.graphics.MoveTo; MoveTo;
 +	import org.apache.flex.graphics.PathBuilder; PathBuilder;
 +	import org.apache.flex.graphics.QuadraticCurve; QuadraticCurve;
 +	import org.apache.flex.svg.DOMWrapper; DOMWrapper;
 +	
+ 	import org.apache.flex.svg.TransformBead; TransformBead;
  }
  
  }


[4/7] git commit: [flex-asjs] [refs/heads/refactor-sprite] - First working version on JS side.

Posted by ha...@apache.org.
First working version on 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/054a000d
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/054a000d
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/054a000d

Branch: refs/heads/refactor-sprite
Commit: 054a000d87569ed0d5b346d1fa81d8b4260a256a
Parents: 3725173
Author: yishayw <yi...@hotmail.com>
Authored: Thu Jul 28 11:01:07 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Jul 28 11:01:07 2016 +0300

----------------------------------------------------------------------
 frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/054a000d/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
index b8a5765..17a1349 100644
--- a/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
+++ b/frameworks/projects/Graphics/src/main/flex/GraphicsClasses.as
@@ -40,6 +40,7 @@ internal class GraphicsClasses
 	import org.apache.flex.svg.CompoundGraphic; CompoundGraphic;
 	import org.apache.flex.svg.LinearGradient; LinearGradient;
 	import org.apache.flex.graphics.TransformModel; TransformModel;
+	import org.apache.flex.graphics.TransformRotateModel; TransformRotateModel;
 	import org.apache.flex.svg.TransformBead; TransformBead;
 }
 


[2/7] git commit: [flex-asjs] [refs/heads/refactor-sprite] - Merging

Posted by ha...@apache.org.
Merging


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

Branch: refs/heads/refactor-sprite
Commit: a94a92300af057c7810c5309d35dfbb4195e4836
Parents: 518995e 9cd2852
Author: yishayw <yi...@hotmail.com>
Authored: Thu Jul 28 02:52:35 2016 +0300
Committer: yishayw <yi...@hotmail.com>
Committed: Thu Jul 28 02:52:35 2016 +0300

----------------------------------------------------------------------
 .gitignore                                      |  1 +
 distribution/src/main/assembly/component.xml    |  7 ++-
 .../main/resources/frameworks/flex-config.xml   |  6 ++-
 .../flex/binding/ApplicationDataBinding.as      | 20 +++++--
 .../apache/flex/binding/ContainerDataBinding.as | 20 +++++--
 .../flex/binding/MXMLBeadViewDataBinding.as     | 20 +++++--
 .../org/apache/flex/binding/ViewDataBinding.as  | 16 +++++-
 frameworks/projects/Graphics/pom.xml            |  4 ++
 .../main/flex/org/apache/flex/svg/DOMWrapper.as | 56 ++++++++++++++++++++
 .../src/main/resources/basic-manifest.xml       |  9 ----
 .../src/main/resources/svg-manifest.xml         | 30 +++++++++++
 manualtests/.gitignore                          |  1 +
 12 files changed, 169 insertions(+), 21 deletions(-)
----------------------------------------------------------------------