flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carlosrov...@apache.org
Subject [41/50] git commit: [flex-asjs] [refs/heads/feature/mdl] - Added model.selected check and comment manual click toggle
Date Fri, 27 Jan 2017 22:14:22 GMT
Added model.selected check and comment manual click toggle


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

Branch: refs/heads/feature/mdl
Commit: 693eb68d5cf7004dae4eaf33f815f37a0f78d873
Parents: 8da2301
Author: Carlos Rovira <carlosrovira@apache.org>
Authored: Thu Jan 26 10:15:20 2017 +0100
Committer: Carlos Rovira <carlosrovira@apache.org>
Committed: Thu Jan 26 10:15:20 2017 +0100

----------------------------------------------------------------------
 .../src/main/flex/org/apache/flex/mdl/IconToggle.as      | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/693eb68d/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
index 601ca1f..302b6fb 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/IconToggle.as
@@ -118,8 +118,11 @@ package org.apache.flex.mdl
          */
         public function set selected(value:Boolean):void
         {
-            IToggleButtonModel(model).selected = value;
-            dispatchEvent(new Event(Event.CHANGE))
+            if (IToggleButtonModel(model).selected != value)
+            {
+                IToggleButtonModel(model).selected = value;
+                dispatchEvent(new Event(Event.CHANGE))
+            }
         }
 
         private var _dataMdlFor:String = "icon-toggle-1";
@@ -251,8 +254,8 @@ package org.apache.flex.mdl
         {
             event.preventDefault();
             selected = !selected;
-            input.checked = selected;
-            label.classList.toggle("is-checked", selected);
+            //input.checked = selected;
+            //label.classList.toggle("is-checked", selected);
         }
 
         COMPILE::SWF


Mime
View raw message