From e4ab045e30acbb559c8d9d502b701cc865c285cc Mon Sep 17 00:00:00 2001 From: Andrew Joslin Date: Thu, 12 Jun 2014 09:02:35 -0600 Subject: [PATCH] feat($ionicSlideBoxDelegate): add `start()` to resume after stop Closes #1584 --- js/angular/service/slideBoxDelegate.js | 6 ++++++ js/views/sliderView.js | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/js/angular/service/slideBoxDelegate.js b/js/angular/service/slideBoxDelegate.js index aa8bbf3429c..52e6908f48d 100644 --- a/js/angular/service/slideBoxDelegate.js +++ b/js/angular/service/slideBoxDelegate.js @@ -77,6 +77,12 @@ IonicModule * explicitly told to do so. */ 'stop', + /** + * @ngdoc method + * @name $ionicSlideBoxDelegate#start + * @description Start sliding again if the slideBox was stopped. + */ + 'start', /** * @ngdoc method * @name $ionicSlideBoxDelegate#currentIndex diff --git a/js/views/sliderView.js b/js/views/sliderView.js index ff95ec271f8..9444de454ee 100644 --- a/js/views/sliderView.js +++ b/js/views/sliderView.js @@ -506,6 +506,10 @@ ionic.views.Slider = ionic.views.View.inherit({ stop(); }; + this.start = function() { + begin(); + }; + this.currentIndex = function() { // return current index position return index;