flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject [08/10] git commit: [flex-asjs] [refs/heads/develop] - Added compound transforms along with translate facades.
Date Sun, 31 Jul 2016 07:58:42 GMT
Added compound transforms along with translate facades.


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

Branch: refs/heads/develop
Commit: 92e6ec9262fbe817fed32358cb6eeaf7ece59f2f
Parents: 970f3e3
Author: yishayw <yishayjobs@hotmail.com>
Authored: Thu Jul 28 18:19:52 2016 +0300
Committer: yishayw <yishayjobs@hotmail.com>
Committed: Thu Jul 28 18:19:52 2016 +0300

----------------------------------------------------------------------
 .../projects/Core/src/main/flex/CoreClasses.as  |  3 ++
 .../apache/flex/core/TransformCompoundModel.as  | 35 ++++++++++++++++++++
 .../org/apache/flex/core/TransformMoveXModel.as | 25 ++++++++++++++
 .../org/apache/flex/core/TransformMoveYModel.as | 25 ++++++++++++++
 .../Core/src/main/resources/basic-manifest.xml  |  3 ++
 5 files changed, 91 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/92e6ec92/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 72e9230..ed42da0 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -151,7 +151,10 @@ internal class CoreClasses
     import org.apache.flex.core.IDateChooserModel; IDateChooserModel;
 	import org.apache.flex.core.ParentDocumentBead; ParentDocumentBead;
 	import org.apache.flex.core.TransformModel; TransformModel;
+	import org.apache.flex.core.TransformCompoundModel; TransformCompoundModel;
 	import org.apache.flex.core.TransformRotateModel; TransformRotateModel;
+	import org.apache.flex.core.TransformMoveXModel; TransformMoveXModel;
+	import org.apache.flex.core.TransformMoveYModel; TransformMoveYModel;
     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/92e6ec92/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformCompoundModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformCompoundModel.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformCompoundModel.as
new file mode 100644
index 0000000..d2b3339
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformCompoundModel.as
@@ -0,0 +1,35 @@
+package org.apache.flex.core
+{
+	import org.apache.flex.geom.Matrix;
+
+	public class TransformCompoundModel extends TransformModel
+	{
+		private var _tranformModels:Array;
+
+		[DefaultProperty("transformModels")]
+		public function get tranformModels():Array
+		{
+			return _tranformModels;
+		}
+
+		public function set tranformModels(value:Array):void
+		{
+			_tranformModels = value;
+			if (value && value.length > 0)
+			{
+				var length:int = value.length;
+				var product:Matrix = (value[0] as ITransformModel).matrix.clone();
+				for (var i:int = 1; i < length; i++)
+				{
+					var current:Matrix = (value[i] as ITransformModel).matrix;
+					product.concat(current);
+				}
+				matrix = product;
+			} else
+			{
+				matrix = new Matrix();
+			}
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/92e6ec92/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveXModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveXModel.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveXModel.as
new file mode 100644
index 0000000..38948a9
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveXModel.as
@@ -0,0 +1,25 @@
+package org.apache.flex.core
+{
+	import org.apache.flex.geom.Matrix;
+
+	public class TransformMoveXModel extends TransformModel
+	{
+		private var _x:Number;
+		
+		public function TransformMoveXModel()
+		{
+		}
+
+		public function get x():Number
+		{
+			return _x;
+		}
+
+		public function set x(value:Number):void
+		{
+			_x = value;
+			matrix = new Matrix(1, 0, 0, 1, x, 0);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/92e6ec92/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveYModel.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveYModel.as
b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveYModel.as
new file mode 100644
index 0000000..9d03a60
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/core/TransformMoveYModel.as
@@ -0,0 +1,25 @@
+package org.apache.flex.core
+{
+	import org.apache.flex.geom.Matrix;
+
+	public class TransformMoveYModel extends TransformModel
+	{
+		private var _y:Number;
+		
+		public function TransformMoveYModel()
+		{
+		}
+
+		public function get y():Number
+		{
+			return _y;
+		}
+
+		public function set y(value:Number):void
+		{
+			_y = value;
+			matrix = new Matrix(1, 0, 0, 1, 0, y);
+		}
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/92e6ec92/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 0131eca..4958e66 100644
--- a/frameworks/projects/Core/src/main/resources/basic-manifest.xml
+++ b/frameworks/projects/Core/src/main/resources/basic-manifest.xml
@@ -38,6 +38,9 @@
     <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="TransformCompoundModel" class="org.apache.flex.core.TransformCompoundModel"
/>
+    <component id="TransformMoveXModel" class="org.apache.flex.core.TransformMoveXModel"
/>
+    <component id="TransformMoveYModel" class="org.apache.flex.core.TransformMoveYModel"
/>
     
     <component id="State" class="org.apache.flex.states.State"/>
 </componentPackage>


Mime
View raw message