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

Fix issue #158 - update dependency of bootstrap-slider to 10.5.0 and test new feature #160

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"karma-chrome-launcher": "^0.2.1",
"karma-jasmine": "^0.3.6",
"protractor": "^5.4.1",
"bootstrap-slider": "^10.3.2",
"bootstrap-slider": "^10.5.0",
"angular": ">= 1.3 <=1.7",
"bootstrap": "~3.3.6",
"jquery": "3.3.1"
Expand Down
4 changes: 3 additions & 1 deletion slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ angular.module('ui.bootstrap-slider', [])
formatter: '&',
onStartSlide: '&',
onStopSlide: '&',
onSlide: '&'
onSlide: '&',
lockToTicks: '='
},
link: function ($scope, element, attrs, ngModelCtrl, $compile) {
var ngModelDeregisterFn, ngDisabledDeregisterFn;
Expand Down Expand Up @@ -76,6 +77,7 @@ angular.module('ui.bootstrap-slider', [])
setOption('rangeHighlights', $scope.rangeHighlights);
setOption('scale', $scope.scale, 'linear');
setOption('focus', $scope.focus);
setOption('lock_to_ticks', $scope.lockToTicks, false);

setFloatOption('min', $scope.min, 0);
setFloatOption('max', $scope.max, 10);
Expand Down
9 changes: 9 additions & 0 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,15 @@
<span slider ng-model="model.tenth"
updateevent="[&quot;slideStop&quot;, &quot;slide&quot;, &quot;slideStart&quot;]"></span>
Model: {{model.tenth}}

<br><br>
Lock to ticks
<span slider
ng-model="model.eleventh"
ticks="[3, 5, 7]"
lock_to_ticks="true"></span>
Model: {{model.eleventh}}

</div>


Expand Down
6 changes: 4 additions & 2 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ angular.module('angular-bootstrap-slider-test', ['ui.bootstrap-slider'])
seventh: 0,
eighth: 0,
ninth: 0,
tenth: 0
tenth: 0,
eleventh: 3
};

$scope.value = {
Expand All @@ -43,7 +44,8 @@ angular.module('angular-bootstrap-slider-test', ['ui.bootstrap-slider'])
seventh: 0,
eighth: 0,
ninth: 0,
tenth: 0
tenth: 0,
eleventh: 3
};

$scope.prefix = 'Current value: ';
Expand Down