Commit 0324d2ad authored by Valentin Hervieu's avatar Valentin Hervieu

Add getSelectionBarColor to the demo page

parent ca15931b
......@@ -25,6 +25,23 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
}
};
//Slider with selection bar
$scope.color_slider_bar = {
value: 12,
options: {
showSelectionBar: true,
getSelectionBarColor: function(value) {
if (value <= 3)
return 'red';
if (value <= 6)
return 'orange';
if (value <= 9)
return 'yellow';
return '#2AE02A';
}
}
};
//Slider config with floor, ceil and step
$scope.slider_floor_ceil = {
value: 12,
......
......@@ -44,6 +44,14 @@
></rzslider>
</article>
<article>
<h2>Slider with dynamic selection bar colors</h2>
<rzslider
rz-slider-model="color_slider_bar.value"
rz-slider-options="color_slider_bar.options"
></rzslider>
</article>
<article>
<h2>Slider with custom floor/ceil/step</h2>
<rzslider
......
......@@ -2,11 +2,11 @@
git checkout master -- .gitignore
git checkout master -- demo/*
#git checkout master -- demo/*
git checkout master -- dist/rzslider.css
git checkout master -- dist/rzslider.js
mv demo/* ./
#mv demo/* ./
# cp bower_components/angular/angular.min.js angular.min.js
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment