Skip to content

Commit 1bdb5e8

Browse files
committed
fix(ionSlideBox): fix disable-scroll attr, deprecate in favor of $ionicScrollDelegate
Closes #1113
1 parent 554c439 commit 1bdb5e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/angular/directive/slideBox.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
* @param {number=} slide-interval How many milliseconds to wait to change slides (if does-continue is true). Defaults to 4000.
3232
* @param {boolean=} show-pager Whether a pager should be shown for this slide box.
3333
* @param {expression=} pager-click Expression to call when a pager is clicked (if show-pager is true). Is passed the 'index' variable.
34-
* @param {boolean=} disable-scroll Whether to disallow scrolling/dragging of the slide-box content.
3534
* @param {expression=} on-slide-changed Expression called whenever the slide is changed. Is passed an 'index' variable.
3635
* @param {expression=} active-slide Model to bind the current slide to.
3736
*/
@@ -63,7 +62,6 @@ function($timeout, $compile, $ionicSlideBoxDelegate) {
6362
var slider = new ionic.views.Slider({
6463
el: $element[0],
6564
auto: slideInterval,
66-
disableScroll: ($scope.$eval($scope.disableScroll) === true) || false,
6765
continuous: continuous,
6866
startSlide: $scope.activeSlide,
6967
slidesChanged: function() {
@@ -82,6 +80,8 @@ function($timeout, $compile, $ionicSlideBoxDelegate) {
8280
}
8381
});
8482

83+
slider.enableSlide($scope.$eval($attrs.disableScroll) !== true);
84+
8585
$scope.$watch('activeSlide', function(nv) {
8686
if(angular.isDefined(nv)){
8787
slider.slide(nv);

0 commit comments

Comments
 (0)