Skip to content

Commit ae78b50

Browse files
committed
2.8.0 release
1 parent 3faa86c commit ae78b50

File tree

12 files changed

+46
-18
lines changed

12 files changed

+46
-18
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# 2.7.1 (2016-02-08)
2+
## Features
3+
- Add a `getPointerColor` option to dynamically change the pointers color (#253).
4+
15
# 2.7.1 (2016-02-06)
26
## Fix
37
- Fix high label positioning when size is different than the ceil one.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ The default options are:
181181
ticksTooltip: null,
182182
ticksValuesTooltip: null,
183183
vertical: false,
184-
selectionBarColor: null,
184+
getSelectionBarColor: null,
185185
getPointerColor: null,
186186
keyboardSupport: true,
187187
scale: 1,
@@ -250,7 +250,7 @@ $scope.slider = {
250250

251251
**getSelectionBarColor** - _Function(value) or Function(minVal, maxVal) (defaults to null)_: Function that returns the current color of the selection bar. If the returned color depends on a model value (either `rzScopeModel`or `'rzSliderHigh`), you should use the argument passed to the function. Indeed, when the function is called, there is no certainty that the model has already been updated.
252252

253-
**getPointerColor** - _Function(value, pointerType) (defaults to null)_: Function that returns the current color of a pointer. To handle range slider pointer independently, you should evaluate pointerType within the given function where "min" stands for `rzScopeModel` and "max" for `rzScopeHigh` values. Indeed, when the function is called, there is no certainty that the model has already been updated.
253+
**getPointerColor** - _Function(value, pointerType) (defaults to null)_: Function that returns the current color of a pointer. If the returned color depends on a model value (either `rzScopeModel`or `'rzSliderHigh`), you should use the argument passed to the function. Indeed, when the function is called, there is no certainty that the model has already been updated. To handle range slider pointers independently, you should evaluate pointerType within the given function where "min" stands for `rzScopeModel` and "max" for `rzScopeHigh` values.
254254

255255
**hideLimitLabels** - _Boolean (defaults to false)_: Set to true to hide min / max labels
256256

bower.json

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

demo/demo.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
6969
}
7070
};
7171

72-
//Slider with selection bar
72+
//Slider with selection bar color
7373
$scope.color_slider_bar = {
7474
value: 12,
7575
options: {
@@ -86,6 +86,22 @@ app.controller('MainCtrl', function($scope, $rootScope, $timeout, $modal) {
8686
}
8787
};
8888

89+
//Slider with pointer color
90+
$scope.color_slider_pointer = {
91+
value: 12,
92+
options: {
93+
getPointerColor: function(value) {
94+
if (value <= 3)
95+
return 'red';
96+
if (value <= 6)
97+
return 'orange';
98+
if (value <= 9)
99+
return 'yellow';
100+
return '#2AE02A';
101+
}
102+
}
103+
};
104+
89105
//Slider config with floor, ceil and step
90106
$scope.slider_floor_ceil = {
91107
value: 12,

demo/index.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ <h2>Slider with dynamic selection bar colors</h2>
8686
></rzslider>
8787
</article>
8888

89+
<article>
90+
<h2>Slider with dynamic pointer color</h2>
91+
<rzslider
92+
rz-slider-model="color_slider_pointer.value"
93+
rz-slider-options="color_slider_pointer.options"
94+
></rzslider>
95+
</article>
96+
8997
<article>
9098
<h2>Slider with custom floor/ceil/step</h2>
9199
<rzslider

dist/rzslider.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*! angularjs-slider - v2.7.1 -
1+
/*! angularjs-slider - v2.8.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-02-07 */
4+
2016-02-08 */
55
rzslider {
66
position: relative;
77
display: inline-block;

dist/rzslider.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
/*! angularjs-slider - v2.7.1 -
1+
/*! angularjs-slider - v2.8.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-02-07 */
4+
2016-02-08 */
55
/*jslint unparam: true */
66
/*global angular: false, console: false, define, module */
77
(function(root, factory) {
@@ -49,7 +49,7 @@
4949
ticksTooltip: null,
5050
ticksValuesTooltip: null,
5151
vertical: false,
52-
selectionBarColor: null,
52+
getSelectionBarColor: null,
5353
getPointerColor: null,
5454
keyboardSupport: true,
5555
scale: 1,

dist/rzslider.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/rzslider.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

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

0 commit comments

Comments
 (0)