Skip to content

Commit 1070cd2

Browse files
dassaptorshiValentinH
authored andcommitted
Add the option for disabling auto-hiding of limit labels (#405)
* Added the option for having fixed label to the directive * Committed the dist folder too * Changed the showLimit labels to autoHideLabels property * #Updated the dist by running the grunt task
1 parent b0c190b commit 1070cd2

File tree

5 files changed

+25
-15
lines changed

5 files changed

+25
-15
lines changed

dist/rzslider.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! angularjs-slider - v5.4.3 -
22
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
33
https://github.com/angular-slider/angularjs-slider -
4-
2016-08-07 */
4+
2016-09-06 */
55
.rzslider {
66
position: relative;
77
display: inline-block;

dist/rzslider.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*! angularjs-slider - v5.4.3 -
22
(c) Rafal Zajac <rzajac@gmail.com>, Valentin Hervieu <valentin@hervieu.me>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com> -
33
https://github.com/angular-slider/angularjs-slider -
4-
2016-08-07 */
4+
2016-09-06 */
55
/*jslint unparam: true */
66
/*global angular: false, console: false, define, module */
77
(function(root, factory) {
@@ -71,7 +71,8 @@
7171
rightToLeft: false,
7272
boundPointerLabels: true,
7373
mergeRangeLabelsIfSame: false,
74-
customTemplateScope: null
74+
customTemplateScope: null,
75+
autoHideLabels: true
7576
};
7677
var globalOptions = {};
7778

@@ -314,7 +315,7 @@
314315
this.maxLab = null; // Label above the high value
315316
this.cmbLab = null; // Combined label
316317
this.ticks = null; // The ticks
317-
318+
318319
// Initialize slider
319320
this.init();
320321
};
@@ -1069,7 +1070,9 @@
10691070
};
10701071
}
10711072

1072-
this.shFloorCeil();
1073+
if(this.options.autoHideLabels){
1074+
this.shFloorCeil();
1075+
}
10731076
},
10741077

10751078
/**
@@ -1089,8 +1092,10 @@
10891092
backgroundColor: pointercolor
10901093
};
10911094
}
1092-
1093-
this.shFloorCeil();
1095+
if(this.options.autoHideLabels){
1096+
this.shFloorCeil();
1097+
}
1098+
10941099
},
10951100

10961101
/**

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.

src/rzslider.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@
7575
rightToLeft: false,
7676
boundPointerLabels: true,
7777
mergeRangeLabelsIfSame: false,
78-
customTemplateScope: null
78+
customTemplateScope: null,
79+
autoHideLabels: true
7980
};
8081
var globalOptions = {};
8182

@@ -318,7 +319,7 @@
318319
this.maxLab = null; // Label above the high value
319320
this.cmbLab = null; // Combined label
320321
this.ticks = null; // The ticks
321-
322+
322323
// Initialize slider
323324
this.init();
324325
};
@@ -1073,7 +1074,9 @@
10731074
};
10741075
}
10751076

1076-
this.shFloorCeil();
1077+
if(this.options.autoHideLabels){
1078+
this.shFloorCeil();
1079+
}
10771080
},
10781081

10791082
/**
@@ -1093,8 +1096,10 @@
10931096
backgroundColor: pointercolor
10941097
};
10951098
}
1096-
1097-
this.shFloorCeil();
1099+
if(this.options.autoHideLabels){
1100+
this.shFloorCeil();
1101+
}
1102+
10981103
},
10991104

11001105
/**

0 commit comments

Comments
 (0)