Repository: flex-asjs
Updated Branches:
  refs/heads/develop ff5b3bd1c -> 7493febe8


TabBar ripple can not be used if parent is a Tabs component. Use only in Tabs 
instead to avoid MDL browser error.


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

Branch: refs/heads/develop
Commit: 7493febe8b963694d03e9f017f043e59b788e258
Parents: ff5b3bd
Author: Carlos Rovira <carlosrov...@apache.org>
Authored: Fri Dec 2 00:17:57 2016 +0100
Committer: Carlos Rovira <carlosrov...@apache.org>
Committed: Fri Dec 2 00:17:57 2016 +0100

----------------------------------------------------------------------
 examples/flexjs/MDLExample/src/main/flex/Lists.mxml     |  6 +++++-
 .../src/main/flex/org/apache/flex/mdl/TabBar.as         | 12 +++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7493febe/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/MDLExample/src/main/flex/Lists.mxml 
b/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
index db208d3..f6311e4 100644
--- a/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/Lists.mxml
@@ -67,7 +67,11 @@ limitations under the License.
             <ui:ItemRendererClassFactory>
                 <ui:itemRendererFactory>
                     <fx:Component>
-                        <support:StringItemRenderer />
+                        <support:StringItemRenderer>
+                            <support:beads>
+                                <controllers:ItemRendererMouseController />
+                            </support:beads>
+                        </support:StringItemRenderer>
                     </fx:Component>
                 </ui:itemRendererFactory>
             </ui:ItemRendererClassFactory>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7493febe/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
index 4558abc..1865db3 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/TabBar.as
@@ -90,7 +90,12 @@ package org.apache.flex.mdl
                                typeNames = "mdl-layout__tab-bar";
                        }
                        
-                       element.classList.add(typeNames);                       
+                       element.classList.add(typeNames);
+
+                       if(parent is Tabs && _ripple)
+                       {
+                               throw new Error("TabBar ripple can not be used 
if parent is a Tabs component. Use only in Tabs instead to avoid MDL browser 
error.");
+                       }                       
         }
 
                protected var _ripple:Boolean = false;
@@ -111,6 +116,11 @@ package org.apache.flex.mdl
         {
             _ripple = value;
 
+                       if(parent is Tabs && _ripple)
+                       {
+                               throw new Error("TabBar ripple can not be used 
if parent is a Tabs component. Use only in Tabs instead to avoid MDL browser 
error.");
+                       }
+
             COMPILE::JS
             {
                 element.classList.toggle("mdl-js-ripple-effect", _ripple);

Reply via email to