From d1c174ad36c68a6f4eefc19068a91529f2aff931 Mon Sep 17 00:00:00 2001 From: Leonardo Merlin Date: Sun, 6 Sep 2015 12:34:17 -0300 Subject: [PATCH] Rollback switch proposal at carousel --- src/app/components/proposal-carousel/proposal-carousel.directive.js | 10 ++++++++++ 1 file changed, 10 insertions(+), 0 deletions(-) diff --git a/src/app/components/proposal-carousel/proposal-carousel.directive.js b/src/app/components/proposal-carousel/proposal-carousel.directive.js index 39c8ce9..a27a9bf 100644 --- a/src/app/components/proposal-carousel/proposal-carousel.directive.js +++ b/src/app/components/proposal-carousel/proposal-carousel.directive.js @@ -46,6 +46,16 @@ vm.activeIndex = (vm.activeIndex > 0) ? --vm.activeIndex : vm.proposalsLength - 1; }; + ProposalCarouselController.prototype.switchProposal = function (index) { + var vm = this; + + if(index >= 0 && index < vm.proposalsLength) { + vm.activeIndex = index; + }else{ + vm.$log.warn('[switchProposal] "index" not handled:', index); + } + }; + ProposalCarouselController.prototype.showProposals = function () { var vm = this; -- libgit2 0.21.2