flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [07/10] git commit: [flex-asjs] [refs/heads/feature/mdl] - Use interface IMaterialIcon and "as" to check null
Date Tue, 20 Dec 2016 07:35:48 GMT
Use interface IMaterialIcon and "as" to check null


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

Branch: refs/heads/feature/mdl
Commit: 11a4d483b197985783a4791f9196fb1c906938c8
Parents: 5ce980f
Author: piotrz <piotrz@apache.org>
Authored: Mon Dec 19 22:30:18 2016 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Mon Dec 19 22:30:18 2016 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as | 5 ++---
 .../main/flex/org/apache/flex/mdl/beads/DeletableLinkChip.as | 8 ++------
 2 files changed, 4 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/11a4d483/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
index d839e14..9f523c8 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableChip.as
@@ -23,7 +23,6 @@ package org.apache.flex.mdl.beads
     import org.apache.flex.core.UIBase;
     import org.apache.flex.mdl.Button;
     import org.apache.flex.mdl.materialIcons.IMaterialIcon;
-    import org.apache.flex.mdl.supportClasses.MaterialIconBase;
 
     /**
      *  The DeletableChip bead class is a specialty bead that can be used to add additional
@@ -92,7 +91,7 @@ package org.apache.flex.mdl.beads
         COMPILE::JS
         private function createDeleteButton():Button
         {
-            var materialIcon:MaterialIconBase = IMaterialIcon(_strand).materialIcon;
+            var materialIcon:IMaterialIcon = _strand as IMaterialIcon;
 
             if (materialIcon == null)
             {
@@ -100,7 +99,7 @@ package org.apache.flex.mdl.beads
             }
 
             var delButton:Button = new Button();
-            delButton.materialIcon = materialIcon;
+            delButton.materialIcon = materialIcon.materialIcon;
 
             var htmlButton:HTMLElement = (delButton.element as HTMLElement);
             htmlButton.classList.remove("mdl-button", "mdl-js-button");

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/11a4d483/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableLinkChip.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableLinkChip.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableLinkChip.as
index cbf79a7..17e413c 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableLinkChip.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/DeletableLinkChip.as
@@ -23,10 +23,6 @@ package org.apache.flex.mdl.beads
     import org.apache.flex.core.UIBase;
     import org.apache.flex.mdl.NavigationLink;
     import org.apache.flex.mdl.materialIcons.IMaterialIcon;
-    import org.apache.flex.mdl.supportClasses.MaterialIconBase;
-    import org.apache.flex.utils.StrandUtils;
-
-    import org.apache.flex.mdl.Button;
 
     /**
      *  The DeletableLinkChip bead class is a specialty bead that can be used to add additional
@@ -102,7 +98,7 @@ package org.apache.flex.mdl.beads
         COMPILE::JS
         private function createLinkElement():NavigationLink
         {
-            var materialIcon:MaterialIconBase = IMaterialIcon(_strand).materialIcon;
+            var materialIcon:IMaterialIcon = _strand as IMaterialIcon;
 
             if (materialIcon == null)
             {
@@ -110,7 +106,7 @@ package org.apache.flex.mdl.beads
             }
 
             var link:NavigationLink = new NavigationLink();
-            link.addElement(materialIcon);
+            link.addElement(materialIcon.materialIcon);
 
             var linkElement:HTMLElement = (link.element as HTMLElement);
             linkElement.classList.remove("mdl-navigation__link");


Mime
View raw message