flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject [04/40] git commit: [flex-asjs] [refs/heads/tlf] - - Make MDL Switch selected if it's needed
Date Sun, 26 Mar 2017 13:01:56 GMT
- Make MDL Switch selected if it's needed


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

Branch: refs/heads/tlf
Commit: e319035b8967f6118c1a4f6763da7cbbc65b5f9b
Parents: 5345db8
Author: piotrz <piotrz@apache.org>
Authored: Sat Mar 18 15:02:03 2017 +0100
Committer: piotrz <piotrz@apache.org>
Committed: Sat Mar 18 15:02:03 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/Switch.as         | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/e319035b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
index ab82468..081c55b 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/Switch.as
@@ -147,13 +147,15 @@ package org.apache.flex.mdl
             if (IToggleButtonModel(model).selected != value)
             {
                 IToggleButtonModel(model).selected = value;
+
+
+                COMPILE::JS
+                {
+                    input.checked = value;
+                }
+                
                 dispatchEvent(new Event(Event.CHANGE))
             }
-            
-            COMPILE::JS
-            {
-                input.checked = value;
-            }
         }
 
         private var _ripple:Boolean = false;


Mime
View raw message