You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ha...@apache.org on 2017/03/26 13:01:56 UTC
[04/40] git commit: [flex-asjs] [refs/heads/tlf] - - Make MDL Switch
selected if it's needed
- 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 <pi...@apache.org>
Authored: Sat Mar 18 15:02:03 2017 +0100
Committer: piotrz <pi...@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;