Skip to content

Commit f947823

Browse files
author
Valentin Hervieu
committed
5.4.0 release
1 parent b29b7c2 commit f947823

9 files changed

+41
-34
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 5.4.0 (2016-07-13)
2+
## Features
3+
- Add function to customize color of ticks (#372).
4+
15
# 5.3.0 (2016-07-11)
26
## Features
37
- Expose labels on scope in template (#358).

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-slider",
3-
"version": "5.3.0",
3+
"version": "5.4.0",
44
"homepage": "https://github.com/angular-slider/angularjs-slider",
55
"authors": [
66
"Rafal Zajac <[email protected]>",

demo/demo.js

+21-18
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,27 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
127127
}
128128
};
129129

130+
//Slider with custom tick formatting
131+
$scope.slider_tick_color = {
132+
value: 0,
133+
options: {
134+
ceil: 1200,
135+
floor: 0,
136+
step: 50,
137+
showSelectionBar: true,
138+
showTicks: true,
139+
getTickColor: function(value){
140+
if (value < 300)
141+
return 'red';
142+
if (value < 600)
143+
return 'orange';
144+
if (value < 900)
145+
return 'yellow';
146+
return '#2AE02A';
147+
}
148+
}
149+
};
150+
130151
//Slider config with floor, ceil and step
131152
$scope.slider_floor_ceil = {
132153
value: 12,
@@ -333,24 +354,6 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
333354
}
334355
};
335356

336-
//Slider with custom tick formating
337-
$scope.slider_custom_tick_format = {
338-
value: 30,
339-
options: {
340-
ceil: 1000,
341-
floor: 0,
342-
showSelectionBar: true,
343-
showTicks: true,
344-
getTickColor: function(value){
345-
if(value > 100){
346-
return 'red';
347-
}
348-
return 'blue';
349-
}
350-
}
351-
};
352-
353-
354357
//Vertical sliders
355358
$scope.verticalSlider1 = {
356359
value: 0,

demo/index.html

+8-8
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@ <h2>Slider with dynamic pointer color</h2>
111111
></rzslider>
112112
</article>
113113

114+
<article>
115+
<h2>Slider with dynamic tick color</h2>
116+
<rzslider
117+
rz-slider-model="slider_tick_color.value"
118+
rz-slider-options="slider_tick_color.options"
119+
></rzslider>
120+
</article>
121+
114122
<article>
115123
<h2>Slider with custom floor/ceil/step</h2>
116124
<rzslider
@@ -252,14 +260,6 @@ <h2>Slider with draggable range only</h2>
252260
></rzslider>
253261
</article>
254262

255-
<article>
256-
<h2>Slider with custom tick formatting</h2>
257-
<rzslider
258-
rz-slider-model="slider_custom_tick_format.value"
259-
rz-slider-options="slider_custom_tick_format.options"
260-
></rzslider>
261-
</article>
262-
263263
<article>
264264
<h2>Vertical sliders</h2>
265265
<div class="row vertical-sliders" style="margin: 20px;">

dist/rzslider.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*! angularjs-slider - v5.3.0 -
1+
/*! angularjs-slider - v5.4.0 -
22
(c) Rafal Zajac <[email protected]>, Valentin Hervieu <[email protected]>, Jussi Saarivirta <[email protected]>, Angelin Sirbu <[email protected]> -
33
https://github.com/angular-slider/angularjs-slider -
4-
2016-07-12 */
4+
2016-07-13 */
55
.rzslider {
66
position: relative;
77
display: inline-block;

dist/rzslider.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*! angularjs-slider - v5.3.0 -
1+
/*! angularjs-slider - v5.4.0 -
22
(c) Rafal Zajac <[email protected]>, Valentin Hervieu <[email protected]>, Jussi Saarivirta <[email protected]>, Angelin Sirbu <[email protected]> -
33
https://github.com/angular-slider/angularjs-slider -
4-
2016-07-12 */
4+
2016-07-13 */
55
/*jslint unparam: true */
66
/*global angular: false, console: false, define, module */
77
(function(root, factory) {

dist/rzslider.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angularjs-slider",
3-
"version": "5.3.0",
3+
"version": "5.4.0",
44
"description": "AngularJS slider directive with no external dependencies. Mobile friendly!.",
55
"main": "dist/rzslider.js",
66
"repository": {

0 commit comments

Comments
 (0)