Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #126 from knstntn/master
Browse files Browse the repository at this point in the history
Added slider:refresh event
  • Loading branch information
seiyria committed Feb 4, 2016
2 parents 74acc6a + 6596bab commit 903e44f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-bootstrap-slider",
"version": "0.1.24",
"version": "0.1.25",
"authors": [
"Kyle Kemp <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-bootstrap-slider",
"version": "0.1.24",
"version": "0.1.25",
"description": "An angular directive for seiyria-bootstrap-slider",
"main": "slider.js",
"dependencies": {
Expand Down
9 changes: 7 additions & 2 deletions slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,13 @@ angular.module('ui.bootstrap-slider', [])
});
});

$scope.$on('slider:relayout', function() {
slider.relayout();
var globalEvents = ['relayout', 'refresh'];
angular.forEach(globalEvents, function(event) {
if(angular.isFunction(slider[event])) {
$scope.$on('slider:' + event, function () {
slider[event]();
});
}
});
}
};
Expand Down

0 comments on commit 903e44f

Please sign in to comment.