flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bigosma...@apache.org
Subject git commit: [flex-asjs] [refs/heads/feature/fontawesome] - Add support for rotation in FontAwesomeIcon
Date Mon, 09 Jan 2017 08:32:50 GMT
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/fontawesome 5c227d430 -> d5120ff7e


Add support for rotation in FontAwesomeIcon


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

Branch: refs/heads/feature/fontawesome
Commit: d5120ff7e63aa909e2282fcebef501610ae2b655
Parents: 5c227d4
Author: OmPrakash Muppirala <bigosmallm@gmail.com>
Authored: Mon Jan 9 00:32:37 2017 -0800
Committer: OmPrakash Muppirala <bigosmallm@gmail.com>
Committed: Mon Jan 9 00:32:37 2017 -0800

----------------------------------------------------------------------
 .../flex/itemRenderers/MemberItemRenderer.mxml  |  3 +-
 .../FontAwesome/src/main/flex/FAClasses.as      |  1 +
 .../flex/org/apache/flex/fa/FontAwesomeIcon.as  | 30 ++++++++++++++++++++
 .../apache/flex/fa/FontAwesomeIconRotation.as   | 27 ++++++++++++++++++
 4 files changed, 60 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d5120ff7/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
index 3d47333..ddd0a89 100644
--- a/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
+++ b/examples/flexjs/FlexTeamPage_MDL/src/main/flex/itemRenderers/MemberItemRenderer.mxml
@@ -26,6 +26,7 @@ limitations under the License.
 
     <fx:Script>
 		<![CDATA[
+        import org.apache.flex.fa.FontAwesomeIconRotation;
         import org.apache.flex.fa.FontAwesomeIconSize;
         import org.apache.flex.fa.FontAwesomeIconType;
 
@@ -80,7 +81,7 @@ limitations under the License.
             <mdl:Button colored="true" fab="true" ripple="true" raised="false">
                 <mdl:materialIcon>
                     <fa:FontAwesomeIcon iconType="{FontAwesomeIconType.GLASS}"
-                                        showBorder="true">
+                                        showBorder="true" rotation="{FontAwesomeIconRotation.R90}">
                     </fa:FontAwesomeIcon>
                 </mdl:materialIcon>
             </mdl:Button>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d5120ff7/frameworks/projects/FontAwesome/src/main/flex/FAClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/FontAwesome/src/main/flex/FAClasses.as b/frameworks/projects/FontAwesome/src/main/flex/FAClasses.as
index 495b61b..22d1a09 100644
--- a/frameworks/projects/FontAwesome/src/main/flex/FAClasses.as
+++ b/frameworks/projects/FontAwesome/src/main/flex/FAClasses.as
@@ -29,6 +29,7 @@ package
 	{
 		import org.apache.flex.fa.FontAwesomeIconType; FontAwesomeIconType;
 		import org.apache.flex.fa.FontAwesomeIconSize; FontAwesomeIconSize;
+		import org.apache.flex.fa.FontAwesomeIconRotation; FontAwesomeIconRotation;
 	}
 }
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d5120ff7/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIcon.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIcon.as
b/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIcon.as
index 9a1022b..04b5715 100644
--- a/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIcon.as
+++ b/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIcon.as
@@ -65,6 +65,7 @@ package org.apache.flex.fa
 		protected var _size:String;
         protected var _fixedWidth:Boolean;
         protected var _showBorder:Boolean;
+        protected var _rotation:String;
 
         /**
          * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
@@ -187,6 +188,35 @@ package org.apache.flex.fa
                 element.classList.toggle('fa-border',_showBorder)
             }
         }
+
+        /**
+         *  Rotate icon
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         *
+         */
+        public function get rotation():String
+        {
+            return _rotation;
+        }
+
+        public function set rotation(value:String)
+        {
+            COMPILE::JS
+            {
+                element.classList.remove(value)
+            }
+
+            _rotation = value;
+
+            COMPILE::JS
+            {
+                element.classList.add(value)
+            }
+        }
 		
     }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d5120ff7/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIconRotation.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIconRotation.as
b/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIconRotation.as
new file mode 100644
index 0000000..4afaa85
--- /dev/null
+++ b/frameworks/projects/FontAwesome/src/main/flex/org/apache/flex/fa/FontAwesomeIconRotation.as
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.fa
+{
+    public class FontAwesomeIconRotation
+    {
+		public static const R90:String = 'fa-rotate-90';
+		public static const R180:String = 'fa-rotate-180';
+		public static const R270:String = 'fa-rotate-270';
+    }
+}
\ No newline at end of file


Mime
View raw message