From 9c6bc47214ff331b2a482fc5181b40cd1e50f180 Mon Sep 17 00:00:00 2001 From: Felipe Pereira Date: Fri, 19 Feb 2016 20:43:18 -0300 Subject: [PATCH] added event stop in arrow controls --- dist/angular-carousel.min.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dist/angular-carousel.min.js b/dist/angular-carousel.min.js index 3c1b186..e3ec854 100644 --- a/dist/angular-carousel.min.js +++ b/dist/angular-carousel.min.js @@ -8,7 +8,7 @@ angular.module("angular-carousel",["ngTouch"]); angular.module("angular-carousel").directive("rnCarouselAutoSlide",["$timeout",function(c){return{restrict:"A",link:function(d,h,w){var z=Math.round(1E3*parseFloat(w.rnCarouselAutoSlide)),l=increment=!1,q=h.children().length;d.carouselExposedIndex||(d.carouselExposedIndex=0);stopAutoplay=function(){angular.isDefined(l)&&c.cancel(l);l=void 0};increment=function(){d.carouselExposedIndex=d.carouselExposedIndex\n \n \n')}]); +angular.module("angular-carousel").directive("rnCarouselControls",[function(){return{restrict:"A",replace:!0,scope:{items:"=",index:"=",loop:"="},link:function(c,d,h){c.prev=function(){c.index=c.index?c.index-1:c.items.length};c.next=function(){c.index=(c.index+1)%c.items.length}},templateUrl:"carousel-controls.html"}}]);angular.module("angular-carousel").run(["$templateCache",function(c){c.put("carousel-controls.html",'')}]); angular.module("angular-carousel").directive("rnCarouselIndicators",[function(){return{restrict:"A",replace:!0,scope:{items:"=",index:"="},templateUrl:"carousel-indicators.html"}}]);angular.module("angular-carousel").run(["$templateCache",function(c){c.put("carousel-indicators.html",'')}]); (function(){angular.module("angular-carousel").directive("rnCarousel",["$swipe","$window","$document","$parse","$compile","$rootScope",function(c,d,h,w,z,l){var q=0,G=d.requestAnimationFrame||d.webkitRequestAnimationFrame||d.mozRequestAnimationFrame;return{restrict:"A",scope:!0,compile:function(r,x){var H=r.children()[0].attributes,R=!1,S=!1,I=!1,T=angular.isDefined(x.rnCarouselLoop),m,J;r.addClass("rn-carousel-slides");r.children().addClass("rn-carousel-slide");["ng-repeat","data-ng-repeat","x-ng-repeat"].every(function(b){b= H[b];if(angular.isDefined(b)){var c=b.value.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),d=c[3];m=c[1];J=c[2];if(m)return angular.isDefined(x.rnCarouselBuffered)&&(S=!0,b.value=m+" in "+J+"|carouselSlice:carouselBufferIndex:carouselBufferSize",d&&(b.value+=" track by "+d)),R=!0,!1}return!0});return function(b,r,f,A){function m(){for(var a=[],c=0;c")(b),B.append(A));b.carouselBufferIndex=0;b.carouselBufferSize=5;b.carouselIndex=0;if(f.rnCarouselIndex){var v=w(f.rnCarouselIndex);angular.isFunction(v.assign)?(b.$watch("carouselIndex",function(a){v.assign(b.$parent,a)}),b.carouselIndex=v(b),b.$parent.$watch(v,function(a,c){void 0!==a&&(a>=e?(a=e-1,v.assign(b.$parent,a)):0>a&&(a=0,v.assign(b.$parent, a)),p(a,U))}),I=!0):isNaN(f.rnCarouselIndex)||(b.carouselIndex=parseInt(f.rnCarouselIndex,10))}R?b.$watchCollection(J,function(a,c){e=0;angular.isArray(a)?e=a.length:angular.isObject(a)&&(e=Object.keys(a).length);m();g||K();p(b.carouselIndex)}):(e=r.children().length,m(),K());f.$observe("rnCarouselSwipe",function(a,b){"false"!==a&&"off"!==a?c.bind(t,{start:H,move:W,end:C,cancel:function(a){C({},a)}}):t.unbind()});I||p(b.carouselIndex);M="transform";["webkit","Moz","O","ms"].every(function(a){a+="Transform"; return"undefined"!==typeof document.body.style[a]?(M=a,!1):!0});var V=function(){var a=document.createElement("p"),b,c={webkitTransform:"-webkit-transform",msTransform:"-ms-transform",transform:"transform"};document.body.insertBefore(a,null);for(var d in c)void 0!==a.style[d]&&(a.style[d]="translate3d(1px,1px,1px)",b=window.getComputedStyle(a).getPropertyValue(c[d]));document.body.removeChild(a);return void 0!==b&&0