flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [33/50] [abbrv] git commit: [flex-asjs] [refs/heads/dual] - Re-introduce changes that enable programmatic changes to slider values. At some point they were removed, for some reason.
Date Tue, 18 Apr 2017 06:17:57 GMT
Re-introduce changes that enable programmatic changes to slider values.
At some point they were removed, for some reason.


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

Branch: refs/heads/dual
Commit: 62b3c0961e7e84d00567ac846ffeee0676c9183b
Parents: 61c4300
Author: DESKTOP-RH4S838\Yishay <yishayjobs@hotmail.com>
Authored: Mon Apr 10 12:00:24 2017 +0300
Committer: DESKTOP-RH4S838\Yishay <yishayjobs@hotmail.com>
Committed: Mon Apr 10 12:00:24 2017 +0300

----------------------------------------------------------------------
 .../main/flex/org/apache/flex/mdl/beads/views/SliderView.as | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/62b3c096/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/SliderView.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/SliderView.as
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/SliderView.as
index a537bc4..0b2e13d 100644
--- a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/SliderView.as
+++ b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/SliderView.as
@@ -145,6 +145,15 @@ package org.apache.flex.mdl.beads.views
 				inputElement.step = String(rangeModel.stepSize);
 				inputElement.min = String(rangeModel.minimum);
 				inputElement.max = String(rangeModel.maximum);
+				// This makes sure that materialslider can accept programmatic changes to its values
+				var materialSlider:Object = (inputElement as Object)["MaterialSlider"];
+				if (materialSlider)
+				{
+					materialSlider["change"](rangeModel.value);
+				} else
+				{
+					inputElement.value = rangeModel.value.toString();
+				}
 			}
 		}
 	}


Mime
View raw message