Commit d1c174ad36c68a6f4eefc19068a91529f2aff931
1 parent
a0b137a9
Exists in
master
and in
8 other branches
Rollback switch proposal at carousel
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
src/app/components/proposal-carousel/proposal-carousel.directive.js
@@ -46,6 +46,16 @@ | @@ -46,6 +46,16 @@ | ||
46 | vm.activeIndex = (vm.activeIndex > 0) ? --vm.activeIndex : vm.proposalsLength - 1; | 46 | vm.activeIndex = (vm.activeIndex > 0) ? --vm.activeIndex : vm.proposalsLength - 1; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | + ProposalCarouselController.prototype.switchProposal = function (index) { | ||
50 | + var vm = this; | ||
51 | + | ||
52 | + if(index >= 0 && index < vm.proposalsLength) { | ||
53 | + vm.activeIndex = index; | ||
54 | + }else{ | ||
55 | + vm.$log.warn('[switchProposal] "index" not handled:', index); | ||
56 | + } | ||
57 | + }; | ||
58 | + | ||
49 | ProposalCarouselController.prototype.showProposals = function () { | 59 | ProposalCarouselController.prototype.showProposals = function () { |
50 | var vm = this; | 60 | var vm = this; |
51 | 61 |