angular-responsive-carousel
Advanced tools
Comparing version 1.3.9 to 1.3.10
@@ -888,3 +888,3 @@ (function (global, factory) { | ||
this.handleTouchstart = function (event) { | ||
event.preventDefault(); | ||
//event.preventDefault(); | ||
_this.carousel.handleTouchstart(event); | ||
@@ -891,0 +891,0 @@ _this.isMoving = true; |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-responsive-carousel",["exports","@angular/core","@angular/common"],e):e((t=t||self)["angular-responsive-carousel"]={},t.ng.core,t.ng.common)}(this,(function(t,e,i){"use strict";var n=function(){function t(t){var e=this;this.eventType=void 0,this.handlers={},this.startX=0,this.startY=0,this.lastTap=0,this.doubleTapMinTimeout=300,this.tapMinTimeout=200,this.touchstartTime=0,this.i=0,this.isMousedown=!1,this.touchListeners={touchstart:"handleTouchstart",touchmove:"handleTouchmove",touchend:"handleTouchend"},this.mouseListeners={mousedown:"handleMousedown",mousemove:"handleMousemove",mouseup:"handleMouseup",wheel:"handleWheel"},this.otherListeners={resize:"handleResize"},this.handleTouchstart=function(t){e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getTouchstartPosition(t),e.runHandler("touchstart",t)},this.handleTouchmove=function(t){var i=t.touches;switch(e.detectPan(i)&&e.runHandler("pan",t),e.detectPinch(t)&&e.runHandler("pinch",t),e.detectLinearSwipe(t)){case"horizontal-swipe":t.swipeType="horizontal-swipe",e.runHandler("horizontal-swipe",t);break;case"vertical-swipe":t.swipeType="vertical-swipe",e.runHandler("vertical-swipe",t)}(e.detectLinearSwipe(t)||"horizontal-swipe"===e.eventType||"vertical-swipe"===e.eventType)&&e.handleLinearSwipe(t)},this.handleTouchend=function(t){var i=t.touches;e.detectDoubleTap()&&e.runHandler("double-tap",t),e.detectTap(),e.runHandler("touchend",t),e.eventType="touchend",i&&0===i.length&&(e.eventType=void 0,e.i=0)},this.handleMousedown=function(t){e.isMousedown=!0,e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getMousedownPosition(t),e.runHandler("mousedown",t)},this.handleMousemove=function(t){if(e.isMousedown){switch(e.runHandler("pan",t),e.detectLinearSwipe(t)){case"horizontal-swipe":t.swipeType="horizontal-swipe",e.runHandler("horizontal-swipe",t);break;case"vertical-swipe":t.swipeType="vertical-swipe",e.runHandler("vertical-swipe",t)}(e.detectLinearSwipe(t)||"horizontal-swipe"===e.eventType||"vertical-swipe"===e.eventType)&&e.handleLinearSwipe(t)}},this.handleMouseup=function(t){e.detectTap(),e.isMousedown=!1,e.runHandler("mouseup",t),e.eventType=void 0,e.i=0},this.handleWheel=function(t){e.runHandler("wheel",t)},this.handleResize=function(t){e.runHandler("resize",t)},this.properties=t,this.element=this.properties.element,this.elementPosition=this.getElementPosition(),this.toggleEventListeners("addEventListener")}return t.prototype.destroy=function(){this.toggleEventListeners("removeEventListener")},t.prototype.toggleEventListeners=function(t){var e;for(var i in e="mouse and touch"===this.properties.listeners?Object.assign(this.touchListeners,this.mouseListeners):this.detectTouchScreen()?this.touchListeners:this.mouseListeners,this.properties.resize&&(e=Object.assign(e,this.otherListeners)),e){var n=e[i];"resize"===i?("addEventListener"===t&&window.addEventListener(i,this[n],!1),"removeEventListener"===t&&window.removeEventListener(i,this[n],!1)):"mouseup"===i||"mousemove"===i?("addEventListener"===t&&document.addEventListener(i,this[n],!1),"removeEventListener"===t&&document.removeEventListener(i,this[n],!1)):("addEventListener"===t&&this.element.addEventListener(i,this[n],!1),"removeEventListener"===t&&this.element.removeEventListener(i,this[n],!1))}},t.prototype.handleLinearSwipe=function(t){this.i++,this.i>3&&(this.eventType=this.getLinearSwipeType(t)),"horizontal-swipe"===this.eventType&&this.runHandler("horizontal-swipe",t),"vertical-swipe"===this.eventType&&this.runHandler("vertical-swipe",t)},t.prototype.runHandler=function(t,e){this.handlers[t]&&this.handlers[t](e)},t.prototype.detectPan=function(t){return 1===t.length&&!this.eventType||"pan"===this.eventType},t.prototype.detectDoubleTap=function(){var t=this;if(null==this.eventType){var e=(new Date).getTime(),i=e-this.lastTap;if(clearTimeout(this.doubleTapTimeout),i<this.doubleTapMinTimeout&&i>0)return!0;this.doubleTapTimeout=setTimeout((function(){clearTimeout(t.doubleTapTimeout)}),this.doubleTapMinTimeout),this.lastTap=e}},t.prototype.detectTap=function(){if(null==this.eventType){var t=(new Date).getTime()-this.touchstartTime;t>0&&(t<this.tapMinTimeout?this.runHandler("tap",event):this.runHandler("longtap",event))}},t.prototype.detectPinch=function(t){return 2===t.touches.length&&void 0===this.eventType||"pinch"===this.eventType},t.prototype.detectLinearSwipe=function(t){var e=t.touches;if(e){if(1===e.length&&!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)}else if(!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)},t.prototype.getLinearSwipeType=function(t){if("horizontal-swipe"!==this.eventType&&"vertical-swipe"!==this.eventType){var e=Math.abs(this.moveLeft(0,t)-this.startX);return 3*Math.abs(this.moveTop(0,t)-this.startY)>e?"vertical-swipe":"horizontal-swipe"}return this.eventType},t.prototype.getElementPosition=function(){return this.element.getBoundingClientRect()},t.prototype.getTouchstartPosition=function(t){this.startX=t.touches[0].clientX-this.elementPosition.left,this.startY=t.touches[0].clientY-this.elementPosition.top},t.prototype.getMousedownPosition=function(t){this.startX=t.clientX-this.elementPosition.left,this.startY=t.clientY-this.elementPosition.top},t.prototype.moveLeft=function(t,e){var i=e.touches;return i?i[t].clientX-this.elementPosition.left:e.clientX-this.elementPosition.left},t.prototype.moveTop=function(t,e){var i=e.touches;return i?i[t].clientY-this.elementPosition.top:e.clientY-this.elementPosition.top},t.prototype.detectTouchScreen=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");return"ontouchstart"in window||function(t){return window.matchMedia(t).matches}(["(",t.join("touch-enabled),("),"heartz",")"].join(""))},t.prototype.on=function(t,e){t&&(this.handlers[t]=e)},t}(),o=function(){function t(t){var e=this;this.initialPositionX=0,this.newContainerPositionIndex=0,this.preliminarySlideCounter=0,this.slideCounter=0,this.previousSlideCounter=0,this.isContentImages=!0,this.isLazyLoad=!0,this.isContainerLocked=!0,this.alignCells="left",this.initialContainerPosition=0,this.handleTouchstart=function(t){if(e.isTouchstart=!0,!e.isSlideInProgress){var i=t.touches;e.startX=i?i[0].clientX-e.getCarouselElementPosition().left:t.clientX-e.getCarouselElementPosition().left,e.containerInitialPositionX=e.getElementPosition().left-e.getCarouselElementPosition().left,e.isMoveInProgress=!0}},this.handleHorizontalSwipe=function(t){if(!e.isSlideInProgress){var i=t.touches;e.moveX=i?i[0].clientX-e.getCarouselElementPosition().left:t.clientX-e.getCarouselElementPosition().left,e.distanceAbs=e.getDistanceAbs(),e.direction=e.getDirection(),e.moveContainer()}},this.handleTouchend=function(t){!e.isSlideInProgress&&e.isTouchstart?(e.isMoveInProgress=!1,e.detectSlide()?e.handleSlide():(e.newContainerPositionIndex=0,e.alignContainer()),e.startX=e.moveX=e.distanceAbs=void 0,e.isTouchstart=!1):e.isTouchstart=!1},this.element=t.element,this.properties=t,this.cells=this.element.children,this.visibleWidth=this.properties.visibleWidth||this.element.parentElement.clientWidth,this.setContainerWidth(),this.alignContainer(0)}return Object.defineProperty(t.prototype,"cellLength",{get:function(){return this.images?this.images.length:this.cells.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalContainerCellsCount",{get:function(){if(this.images){var t=this.visibleCellsCount+2*this.overflowCellsLimit;return t>this.images.length&&(t=this.images.length),t}return this.cellLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirstCell",{get:function(){return 0===this.slideCounter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastCellIndex",{get:function(){return this.images.length?this.images.length-1:this.cells.length-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overflowCellsLimit",{get:function(){return this.images&&this.isImagesLessCellLimit?Math.floor((this.images.length-this.visibleCellsCount)/2):this.properties.overflowCellsLimit},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isImagesLessCellLimit",{get:function(){return 2*this.properties.overflowCellsLimit+this.visibleCellsCount>this.images.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellLimit",{get:function(){return this.visibleCellsCount+2*this.overflowCellsLimit},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"images",{get:function(){return this.properties.images},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return this.properties.margin},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minSwipeDistance",{get:function(){return this.properties.minSwipeDistance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitionDuration",{get:function(){return this.properties.transitionDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitionTimingFunction",{get:function(){return this.properties.transitionTimingFunction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullCellWidth",{get:function(){return this.properties.cellWidth+this.margin},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleCellsCount",{get:function(){return Math.ceil(this.visibleWidth/this.fullCellWidth)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lapCounter",{get:function(){return Math.floor(this.slideCounter/this.totalContainerCellsCount)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleCellsOverflowContainer",{get:function(){return this.visibleCellsCount*this.fullCellWidth-this.margin>this.visibleWidth},enumerable:!1,configurable:!0}),t.prototype.moveContainer=function(){var t=this.getMovePositionX();this.transformPositionX(t,0)},t.prototype.getMovePositionX=function(){var t=this.getDistance();return this.containerInitialPositionX-t},t.prototype.alignContainer=function(t){void 0===t&&(t=this.transitionDuration);var e=this.getContainerPosition();this.transformPositionX(e,t),this.setInitialContainerPosition(e)},t.prototype.getContainerPosition=function(){var t=this.getContainerPositionCorrection();return this.isContainerPositionCorrection=0!=t,this.initialContainerPosition+this.newContainerPositionIndex*this.fullCellWidth+t},t.prototype.setInitialContainerPosition=function(t){var e=this.getContainerPositionCorrection();this.initialContainerPosition=t-e},t.prototype.getContainerPositionCorrection=function(){var t=0;return this.properties.loop?0:((this.cellLength-this.preliminarySlideCounter<this.visibleCellsCount||this.isSlideLengthLimited)&&(this.visibleWidth<this.totalContainerCellsCount*this.fullCellWidth&&(t=-(this.visibleCellsCount*this.fullCellWidth-this.visibleWidth-this.margin)),t>=-this.margin&&(t=0)),t)},t.prototype.quicklyPositionContainer=function(){var t=this.getContainerPositionCorrection(),e=this.getNewContainerPosition()+t;this.transformPositionX(e,0),this.setInitialContainerPosition(e)},t.prototype.getNewContainerPosition=function(){return this.slideCounter>this.overflowCellsLimit&&"left"===this.alignCells?(this.lineUpCells(),-this.overflowCellsLimit*this.fullCellWidth):this.slideCounter<=this.overflowCellsLimit?(this.previousSlideCounter>this.overflowCellsLimit&&this.lineUpCells(),-this.slideCounter*this.fullCellWidth):void 0},t.prototype.setContainerWidth=function(){var t=this.getContainerWidth();this.element.style.width=t+"px"},t.prototype.getContainerWidth=function(){var t=this.totalContainerCellsCount*this.fullCellWidth,e=this.cellLength*this.fullCellWidth;return e<t&&(t=e),t},t.prototype.getFile=function(t){var e=this.getFileIndex(t),i=this.images[e];return i&&!i.type&&(i.type="image"),{image:this.images[e],imageIndex:e}},t.prototype.getFileIndex=function(t){var e,i=this.getPositionIndex(t),n=(this.totalContainerCellsCount,this.slideCounter);if(!this.isContainerLocked)return n<=this.overflowCellsLimit?t:(e=i+(n-this.overflowCellsLimit),this.images&&this.properties.loop&&(e%=this.images.length),e);"left"===this.alignCells&&(e=n>this.overflowCellsLimit?i+(n-this.overflowCellsLimit):t);return!(e>this.lastCellIndex&&!this.properties.loop)&&e},t.prototype.transformPositionX=function(t,e){void 0===e&&(e=this.transitionDuration),this.element.style.transition="transform "+e+"ms "+this.transitionTimingFunction,this.element.style.transform="translateX("+t+"px)"},t.prototype.detectSlide=function(){return this.distanceAbs>=this.minSwipeDistance},t.prototype.next=function(){this.isSlideInProgress||(this.direction="left",this.handleSlide(1))},t.prototype.prev=function(){this.isSlideInProgress||(this.direction="right",this.handleSlide(1))},t.prototype.select=function(t){this.slideCounter=t,this.quicklyPositionContainer()},t.prototype.handleSlide=function(t){void 0===t&&(t=void 0),this.slideLength=this.getSlideLength(),this.slideLength=t||this.limitSlideLength(this.slideLength),"left"!==this.direction||this.isSlideInProgress||(this.preliminarySlideCounter=this.slideCounter+this.slideLength,this.detectLastSlide(this.slideCounter+this.slideLength)||(this.newContainerPositionIndex=this.newContainerPositionIndex-this.slideLength,this.isSlideInProgress=!0,this.isLazyLoad&&(this.isContainerLocked=this.preliminarySlideCounter>this.overflowCellsLimit,this.detectContainerUnlock()&&(this.isContainerLocked=!1)))),"right"!==this.direction||this.isSlideInProgress||(this.slideCounter-this.slideLength<0&&(this.slideLength=this.slideCounter),this.preliminarySlideCounter=this.slideCounter-this.slideLength,this.isFirstCell||(this.newContainerPositionIndex=this.newContainerPositionIndex+this.slideLength,this.isSlideInProgress=!0,this.isLazyLoad&&(this.preliminarySlideCounter>this.overflowCellsLimit?this.isContainerLocked=!0:this.isContainerLocked=!1,this.detectContainerUnlock()&&(this.isContainerLocked=!1)))),this.alignContainer()},t.prototype.getSlideLength=function(){var t=this.getContainerPositionCorrection(),e=Math.floor((this.distanceAbs+t)/this.fullCellWidth);return this.distanceAbs%this.fullCellWidth>=this.minSwipeDistance&&e++,e},t.prototype.limitSlideLength=function(t){if(t>1)for(var e=0;e<t;e++){var i=this.slideCounter+(t-e);if(!this.detectLastSlide(i)){t-=e,this.isSlideLengthLimited=e>0;break}}return t},t.prototype.detectLastSlide=function(t){return!this.properties.loop&&this.cellLength-t<this.visibleCellsCount},t.prototype.isNextArrowDisabled=function(){return this.visibleCellsOverflowContainer?this.detectLastSlide(this.slideCounter+1)&&this.isContainerPositionCorrection:this.detectLastSlide(this.slideCounter+1)},t.prototype.isPrevArrowDisabled=function(){return 0===this.slideCounter},t.prototype.detectContainerUnlock=function(){return this.cellLength-this.preliminarySlideCounter<this.visibleCellsCount+this.overflowCellsLimit},t.prototype.handleSlideEnd=function(){this.isSlideInProgress&&(this.transformSlideEnd(),this.isSlideInProgress=!1,this.newContainerPositionIndex=0,this.isSlideLengthLimited=void 0)},t.prototype.transformSlideEnd=function(){this.isLazyLoad&&(this.setSlideCounter(),(this.images||!this.images&&this.properties.loop)&&this.quicklyPositionContainer()),this.previousSlideCounter=this.slideCounter},t.prototype.setSlideCounter=function(){"left"===this.direction&&(this.slideCounter=this.slideCounter+this.slideLength),"right"===this.direction&&(this.slideCounter=this.slideCounter-this.slideLength),this.direction=void 0,this.slideLength=0},t.prototype.resetTransition=function(){this.element.style.transition=""},t.prototype.getElementPosition=function(){return this.element.getBoundingClientRect()},t.prototype.getCarouselElementPosition=function(){return this.properties.container.getBoundingClientRect()},t.prototype.getDistance=function(){return this.startX-this.moveX},t.prototype.getDistanceAbs=function(){return Math.abs(this.startX-this.moveX)},t.prototype.getDirection=function(){var t=Math.sign(this.startX-this.moveX);return-1===t?"right":1===t?"left":void 0},t.prototype.lineUpCells=function(){for(var t=this.element.children,e=0;e<t.length;e++){var i=t[e],n=this.getCellPositionX(e);i.style.transform="translateX("+n+"px)",i.style.width=this.properties.cellWidth+"px"}},t.prototype.getCellPositionX=function(t){return this.getPositionIndex(t)*this.fullCellWidth},t.prototype.getPositionIndex=function(t){var e,i=this.slideCounter,n=this.totalContainerCellsCount,o=i-this.overflowCellsLimit;return o>n&&(o%=n),o<0?t:((e=t-o)<0&&(e=n+e),e)},t.prototype.getCenterPositionIndex=function(){return(this.totalContainerCellsCount-1)/2},t.prototype.autoplay=function(){var t=this;this.autoplayId=setInterval((function(){t.next()}),this.properties.autoplayInterval)},t.prototype.stopAutoplay=function(){this.autoplayId&&clearInterval(this.autoplayId)},t.prototype.destroy=function(){this.stopAutoplay()},t}(),s=function(){function t(t,i){var n=this;this.elementRef=t,this.ref=i,this.minTimeout=30,this._cellWidth=200,this.events=new e.EventEmitter,this.height=200,this.loop=!1,this.autoplay=!1,this.autoplayInterval=5e3,this.pauseOnHover=!0,this.dots=!1,this.margin=10,this.objectFit="cover",this.minSwipeDistance=50,this.transitionDuration=200,this.transitionTimingFunction="ease",this.counterSeparator=" / ",this.overflowCellsLimit=3,this.listeners="mouse and touch",this.arrows=!0,this.arrowsTheme="light",this.hostClassCarousel=!0,this.handleTouchstart=function(t){t.preventDefault(),n.carousel.handleTouchstart(t),n.isMoving=!0,n.events.emit({type:"touchstart",event:t})},this.handleHorizontalSwipe=function(t){t.preventDefault(),n.carousel.handleHorizontalSwipe(t),n.events.emit({type:"swipe",event:t})},this.handleTouchend=function(t){t.touches;n.carousel.handleTouchend(t),n.isMoving=!1,n.events.emit({type:"touchend",event:t})},this.handleTap=function(t){var e=n.carousel.slideCounter,i=n.carousel.currentCellIndex,o=n.carousel.getFileIndex(e),s=n.carousel.getFile(i);n.events.emit({type:"click",file:s,index:o})}}return Object.defineProperty(t.prototype,"isContainerLocked",{get:function(){return this.carousel.isContainerLocked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"slideCounter",{get:function(){return this.carousel.slideCounter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSlideCounter",{get:function(){return this.carousel.previousSlideCounter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lapCounter",{get:function(){return this.carousel.lapCounter},enumerable:!1,configurable:!0}),t.prototype.lineUpCells=function(){this.carousel.lineUpCells()},t.prototype.quicklyPositionContainer=function(){this.carousel.quicklyPositionContainer()},Object.defineProperty(t.prototype,"isLandscape",{get:function(){return window.innerWidth>window.innerHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSafari",{get:function(){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("safari"))return!(t.indexOf("chrome")>-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"counter",{get:function(){return(this.loop?this.slideCounter%this.cellLength:this.slideCounter)+1+this.counterSeparator+this.cellLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellsElement",{get:function(){return this.elementRef.nativeElement.querySelector(".carousel-cells")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"images",{get:function(){return this._images},set:function(t){this._images=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellWidth",{set:function(t){t&&(this._cellWidth=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCounter",{get:function(){return this._isCounter&&this.cellLength>1},set:function(t){t&&(this._isCounter=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeDotIndex",{get:function(){return this.slideCounter%this.cellLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellLimit",{get:function(){if(this.carousel)return this.carousel.cellLimit},enumerable:!1,configurable:!0}),t.prototype.onWindowResize=function(t){this.landscapeMode=this.isLandscape,this.ref.detectChanges(),this.initCarousel(),this.carousel.lineUpCells()},t.prototype.onMousemove=function(t){this.autoplay&&this.pauseOnHover&&this.carousel.stopAutoplay()},t.prototype.onMouseleave=function(t){this.autoplay&&this.pauseOnHover&&this.carousel.autoplay()},t.prototype.ngOnInit=function(){this.isNgContent=this.cellsElement.children.length>0,this.touches=new n({element:this.cellsElement,listeners:this.listeners}),this.touches.on("touchstart",this.handleTouchstart),this.touches.on("horizontal-swipe",this.handleHorizontalSwipe),this.touches.on("touchend",this.handleTouchend),this.touches.on("mousedown",this.handleTouchstart),this.touches.on("mouseup",this.handleTouchend),this.touches.on("tap",this.handleTap),this.initCarousel(),this.setDimensions(),this.autoplay&&this.carousel.autoplay()},t.prototype.ngAfterViewInit=function(){this.cellLength=this.getCellLength(),this.dotsArr=Array(this.cellLength).fill(1),this.ref.detectChanges(),this.carousel.lineUpCells(),this.detectDomChanges()},t.prototype.ngOnChanges=function(t){(t.width||t.height||t.images)&&(this.setDimensions(),this.initCarousel(),this.carousel.lineUpCells(),this.ref.detectChanges())},t.prototype.ngOnDestroy=function(){this.touches.destroy(),this.carousel.destroy()},t.prototype.initCarousel=function(){this.carousel=new o({element:this.elementRef.nativeElement.querySelector(".carousel-cells"),container:this.elementRef.nativeElement,images:this.images,cellWidth:this.getCellWidth(),loop:this.loop,autoplayInterval:this.autoplayInterval,overflowCellsLimit:this.overflowCellsLimit,visibleWidth:this.width,margin:this.margin,minSwipeDistance:this.minSwipeDistance,transitionDuration:this.transitionDuration,transitionTimingFunction:this.transitionTimingFunction,videoProperties:this.videoProperties})},t.prototype.detectDomChanges=function(){var t=this;new MutationObserver((function(e){t.onDomChanges()})).observe(this.elementRef.nativeElement,{attributes:!0,childList:!0,characterData:!0})},t.prototype.onDomChanges=function(){this.cellLength=this.getCellLength(),this.carousel.lineUpCells(),this.ref.detectChanges()},t.prototype.setDimensions=function(){this.hostStyleHeight=this.height+"px",this.hostStyleWidth=this.width+"px"},t.prototype.getFile=function(t){return this.carousel.getFile(t)},t.prototype.handleTransitionendCellContainer=function(t){this.carousel.handleSlideEnd()},t.prototype.toggleVideo=function(t){event.preventDefault(),this.videoProperties.noPlay||(t.paused?(t.play(),this.isVideoPlaying=!0):(t.pause(),this.isVideoPlaying=!1),this.ref.detectChanges())},t.prototype.getCurrentIndex=function(){return this.carousel.slideCounter},t.prototype.getCellWidth=function(){return"100%"===this._cellWidth?this.elementRef.nativeElement.clientWidth:this._cellWidth},t.prototype.next=function(){this.carousel.next(1),this.carousel.stopAutoplay()},t.prototype.prev=function(){this.carousel.prev(1),this.carousel.stopAutoplay()},t.prototype.select=function(t){this.carousel.select(t)},t.prototype.isNextArrowDisabled=function(){return this.carousel.isNextArrowDisabled()},t.prototype.isPrevArrowDisabled=function(){return this.carousel.isPrevArrowDisabled()},t.prototype.getCellLength=function(){return this.images?this.images.length:this.cellsElement.children.length},t}();s.decorators=[{type:e.Component,args:[{selector:"carousel, [carousel]",exportAs:"carousel",template:'<div class="carousel-counter" *ngIf="isCounter">{{counter}}</div>\n\n<div class="carousel-container" [class.carousel-moving]="isMoving">\n\t<div class="carousel-cells" #cells (transitionend)="handleTransitionendCellContainer($event)">\n\t\t<ng-content></ng-content>\n\n\t\t<ng-template ngFor let-image [ngForOf]="images" let-i="index">\n\t\t\t<div class="carousel-cell" \n\t\t\t\t*ngIf="i < cellLimit" \n\t\t\t\t[style.width]="getCellWidth()+\'px\'"\n\t\t\t\t[style.border-radius]="borderRadius+\'px\'">\n\n\t\t\t\t\x3c!-- Image --\x3e\n\t\t\t\t<img \n\t\t\t\t\t*ngIf="getFile(i) && getFile(i)[\'image\']" \n\t\t\t\t\t[src]="getFile(i)[\'image\'][\'path\']"\n\t\t\t\t\t[style.object-fit]="objectFit"\n\t\t\t\t\tdraggable="false" />\n\n\t\t\t\t\x3c!-- Video --\x3e\n\t\t\t\t<ng-template [ngIf]="getFile(i) && getFile(i)[\'type\'] === \'video\'">\n\t\t\t\t\t<div class="carousel-play" (click)="toggleVideo(video)"></div>\n\n\t\t\t\t\t<video #video\n\t\t\t\t\t\t[loop]="videoProperties.loop"\n\t\t\t\t\t\t[muted]="videoProperties.muted"\n\t\t\t\t\t\t[controls]="isSafari"\n\t\t\t\t\t\t[style.object-fit]="objectFit"\n\t\t\t\t\t\t[style.border-radius]="borderRadius+\'px\'">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<source [src]="getFile(i)[\'path\']" type="video/mp4">\n\t\t\t\t\t</video>\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t</div>\n\n\t<div class="carousel-dots" *ngIf="dots">\n\t\t<div class="carousel-dot" [class.carousel-dot-active]="i === activeDotIndex" *ngFor="let dot of dotsArr; index as i"></div>\n\t</div>\n</div>\n\n<div class="carousel-arrows" \n\t[class.carousel-arrows-outside]="arrowsOutside" \n\t[class.carousel-dark-arrows]="arrowsTheme === \'dark\'"\n\t*ngIf="arrows">\n\t\n\t<div class="carousel-arrow carousel-arrow-prev" [class.carousel-arrow-disabled]="isPrevArrowDisabled()" (click)="prev()"></div>\n\t<div class="carousel-arrow carousel-arrow-next" [class.carousel-arrow-disabled]="isNextArrowDisabled()" (click)="next()"></div>\n</div>',styles:[":host{-moz-user-select:none;-webkit-user-select:none;box-sizing:border-box;display:block;height:100%;left:0;position:relative;top:0;transform-origin:top left;user-select:none;width:100%;z-index:10000}:host .carousel-container{cursor:grab;height:100%;overflow:hidden;width:100%}:host .carousel-container.carousel-moving{cursor:grabbing}:host .carousel-counter{background-color:rgba(23,37,68,.3);border-radius:13px;color:#fff;font-size:11px;line-height:normal;padding:5px 7px;position:absolute;right:24px;text-align:right;top:8px;transition:opacity .2s;z-index:30}:host ::ng-deep .carousel-cells{display:block;height:100%;transition:transform .2s;width:100%}:host ::ng-deep .carousel-cells .carousel-cell.swiper-prev-image{transform:translate3d(-100%,0,0)}:host ::ng-deep .carousel-cells .carousel-cell.swiper-next-image{transform:translate3d(100%,0,0)}:host ::ng-deep .carousel-cells .carousel-cell{height:100%;overflow:hidden;position:absolute;width:100%}:host ::ng-deep .carousel-cells .carousel-cell img,:host ::ng-deep .carousel-cells .carousel-cell video{height:100%;object-fit:contain;position:relative;width:100%}:host ::ng-deep .carousel-cells .carousel-cell img.swiper-hide{display:none}:host ::ng-deep .carousel-cells .carousel-cell .carousel-play{bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}:host .carousel-arrow{background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:31px;border-radius:100px;box-shadow:0 0 5px rgba(0,0,0,.15);cursor:pointer;height:40px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:10}:host .carousel-arrow-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMTUuNDEgMTYuNTlMMTAuODMgMTJsNC41OC00LjU5TDE0IDZsLTYgNiA2IDYgMS40MS0xLjQxeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==);left:10px}:host .carousel-arrow-next{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNOC41OSAxNi41OUwxMy4xNyAxMiA4LjU5IDcuNDEgMTAgNmw2IDYtNiA2LTEuNDEtMS40MXoiLz48cGF0aCBkPSJNMCAwaDI0djI0SDBWMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=);right:10px}:host .carousel-arrows-outside .carousel-arrow-prev{left:-60px}:host .carousel-arrows-outside .carousel-arrow-next{right:-60px}:host .carousel-dark-arrows .carousel-arrow{filter:invert(1)}:host .carousel-arrow-disabled{cursor:default;opacity:.5}:host .carousel-dots{bottom:0;left:0;position:absolute;right:0;text-align:center;z-index:10}:host .carousel-dots .carousel-dot{border:2px solid #fff;border-radius:100px;display:inline-block;height:8px;margin:4px;width:8px}:host .carousel-dots .carousel-dot-active{background-color:#fff}"]}]}],s.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},s.propDecorators={images:[{type:e.Input}],events:[{type:e.Output}],height:[{type:e.Input}],width:[{type:e.Input}],loop:[{type:e.Input}],autoplay:[{type:e.Input}],autoplayInterval:[{type:e.Input}],pauseOnHover:[{type:e.Input}],dots:[{type:e.Input}],borderRadius:[{type:e.Input}],margin:[{type:e.Input}],objectFit:[{type:e.Input}],minSwipeDistance:[{type:e.Input}],transitionDuration:[{type:e.Input}],transitionTimingFunction:[{type:e.Input}],videoProperties:[{type:e.Input}],counterSeparator:[{type:e.Input}],overflowCellsLimit:[{type:e.Input}],listeners:[{type:e.Input}],cellWidth:[{type:e.Input,args:["cellWidth"]}],isCounter:[{type:e.Input,args:["counter"]}],arrows:[{type:e.Input}],arrowsOutside:[{type:e.Input}],arrowsTheme:[{type:e.Input}],hostClassCarousel:[{type:e.HostBinding,args:["class.carousel"]}],hostStyleHeight:[{type:e.HostBinding,args:["style.height"]}],hostStyleWidth:[{type:e.HostBinding,args:["style.width"]}],onWindowResize:[{type:e.HostListener,args:["window:resize",["$event"]]}],onMousemove:[{type:e.HostListener,args:["mousemove",["$event"]]}],onMouseleave:[{type:e.HostListener,args:["mouseleave",["$event"]]}]};var r=function(){};r.decorators=[{type:e.NgModule,args:[{declarations:[s],imports:[i.CommonModule],exports:[s],providers:[],bootstrap:[],entryComponents:[s]}]}],t.CarouselComponent=s,t.IvyCarouselModule=r,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common")):"function"==typeof define&&define.amd?define("angular-responsive-carousel",["exports","@angular/core","@angular/common"],e):e((t=t||self)["angular-responsive-carousel"]={},t.ng.core,t.ng.common)}(this,(function(t,e,i){"use strict";var n=function(){function t(t){var e=this;this.eventType=void 0,this.handlers={},this.startX=0,this.startY=0,this.lastTap=0,this.doubleTapMinTimeout=300,this.tapMinTimeout=200,this.touchstartTime=0,this.i=0,this.isMousedown=!1,this.touchListeners={touchstart:"handleTouchstart",touchmove:"handleTouchmove",touchend:"handleTouchend"},this.mouseListeners={mousedown:"handleMousedown",mousemove:"handleMousemove",mouseup:"handleMouseup",wheel:"handleWheel"},this.otherListeners={resize:"handleResize"},this.handleTouchstart=function(t){e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getTouchstartPosition(t),e.runHandler("touchstart",t)},this.handleTouchmove=function(t){var i=t.touches;switch(e.detectPan(i)&&e.runHandler("pan",t),e.detectPinch(t)&&e.runHandler("pinch",t),e.detectLinearSwipe(t)){case"horizontal-swipe":t.swipeType="horizontal-swipe",e.runHandler("horizontal-swipe",t);break;case"vertical-swipe":t.swipeType="vertical-swipe",e.runHandler("vertical-swipe",t)}(e.detectLinearSwipe(t)||"horizontal-swipe"===e.eventType||"vertical-swipe"===e.eventType)&&e.handleLinearSwipe(t)},this.handleTouchend=function(t){var i=t.touches;e.detectDoubleTap()&&e.runHandler("double-tap",t),e.detectTap(),e.runHandler("touchend",t),e.eventType="touchend",i&&0===i.length&&(e.eventType=void 0,e.i=0)},this.handleMousedown=function(t){e.isMousedown=!0,e.elementPosition=e.getElementPosition(),e.touchstartTime=(new Date).getTime(),void 0===e.eventType&&e.getMousedownPosition(t),e.runHandler("mousedown",t)},this.handleMousemove=function(t){if(e.isMousedown){switch(e.runHandler("pan",t),e.detectLinearSwipe(t)){case"horizontal-swipe":t.swipeType="horizontal-swipe",e.runHandler("horizontal-swipe",t);break;case"vertical-swipe":t.swipeType="vertical-swipe",e.runHandler("vertical-swipe",t)}(e.detectLinearSwipe(t)||"horizontal-swipe"===e.eventType||"vertical-swipe"===e.eventType)&&e.handleLinearSwipe(t)}},this.handleMouseup=function(t){e.detectTap(),e.isMousedown=!1,e.runHandler("mouseup",t),e.eventType=void 0,e.i=0},this.handleWheel=function(t){e.runHandler("wheel",t)},this.handleResize=function(t){e.runHandler("resize",t)},this.properties=t,this.element=this.properties.element,this.elementPosition=this.getElementPosition(),this.toggleEventListeners("addEventListener")}return t.prototype.destroy=function(){this.toggleEventListeners("removeEventListener")},t.prototype.toggleEventListeners=function(t){var e;for(var i in e="mouse and touch"===this.properties.listeners?Object.assign(this.touchListeners,this.mouseListeners):this.detectTouchScreen()?this.touchListeners:this.mouseListeners,this.properties.resize&&(e=Object.assign(e,this.otherListeners)),e){var n=e[i];"resize"===i?("addEventListener"===t&&window.addEventListener(i,this[n],!1),"removeEventListener"===t&&window.removeEventListener(i,this[n],!1)):"mouseup"===i||"mousemove"===i?("addEventListener"===t&&document.addEventListener(i,this[n],!1),"removeEventListener"===t&&document.removeEventListener(i,this[n],!1)):("addEventListener"===t&&this.element.addEventListener(i,this[n],!1),"removeEventListener"===t&&this.element.removeEventListener(i,this[n],!1))}},t.prototype.handleLinearSwipe=function(t){this.i++,this.i>3&&(this.eventType=this.getLinearSwipeType(t)),"horizontal-swipe"===this.eventType&&this.runHandler("horizontal-swipe",t),"vertical-swipe"===this.eventType&&this.runHandler("vertical-swipe",t)},t.prototype.runHandler=function(t,e){this.handlers[t]&&this.handlers[t](e)},t.prototype.detectPan=function(t){return 1===t.length&&!this.eventType||"pan"===this.eventType},t.prototype.detectDoubleTap=function(){var t=this;if(null==this.eventType){var e=(new Date).getTime(),i=e-this.lastTap;if(clearTimeout(this.doubleTapTimeout),i<this.doubleTapMinTimeout&&i>0)return!0;this.doubleTapTimeout=setTimeout((function(){clearTimeout(t.doubleTapTimeout)}),this.doubleTapMinTimeout),this.lastTap=e}},t.prototype.detectTap=function(){if(null==this.eventType){var t=(new Date).getTime()-this.touchstartTime;t>0&&(t<this.tapMinTimeout?this.runHandler("tap",event):this.runHandler("longtap",event))}},t.prototype.detectPinch=function(t){return 2===t.touches.length&&void 0===this.eventType||"pinch"===this.eventType},t.prototype.detectLinearSwipe=function(t){var e=t.touches;if(e){if(1===e.length&&!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)}else if(!this.eventType||"horizontal-swipe"===this.eventType||"vertical-swipe"===this.eventType)return this.getLinearSwipeType(t)},t.prototype.getLinearSwipeType=function(t){if("horizontal-swipe"!==this.eventType&&"vertical-swipe"!==this.eventType){var e=Math.abs(this.moveLeft(0,t)-this.startX);return 3*Math.abs(this.moveTop(0,t)-this.startY)>e?"vertical-swipe":"horizontal-swipe"}return this.eventType},t.prototype.getElementPosition=function(){return this.element.getBoundingClientRect()},t.prototype.getTouchstartPosition=function(t){this.startX=t.touches[0].clientX-this.elementPosition.left,this.startY=t.touches[0].clientY-this.elementPosition.top},t.prototype.getMousedownPosition=function(t){this.startX=t.clientX-this.elementPosition.left,this.startY=t.clientY-this.elementPosition.top},t.prototype.moveLeft=function(t,e){var i=e.touches;return i?i[t].clientX-this.elementPosition.left:e.clientX-this.elementPosition.left},t.prototype.moveTop=function(t,e){var i=e.touches;return i?i[t].clientY-this.elementPosition.top:e.clientY-this.elementPosition.top},t.prototype.detectTouchScreen=function(){var t=" -webkit- -moz- -o- -ms- ".split(" ");return"ontouchstart"in window||function(t){return window.matchMedia(t).matches}(["(",t.join("touch-enabled),("),"heartz",")"].join(""))},t.prototype.on=function(t,e){t&&(this.handlers[t]=e)},t}(),o=function(){function t(t){var e=this;this.initialPositionX=0,this.newContainerPositionIndex=0,this.preliminarySlideCounter=0,this.slideCounter=0,this.previousSlideCounter=0,this.isContentImages=!0,this.isLazyLoad=!0,this.isContainerLocked=!0,this.alignCells="left",this.initialContainerPosition=0,this.handleTouchstart=function(t){if(e.isTouchstart=!0,!e.isSlideInProgress){var i=t.touches;e.startX=i?i[0].clientX-e.getCarouselElementPosition().left:t.clientX-e.getCarouselElementPosition().left,e.containerInitialPositionX=e.getElementPosition().left-e.getCarouselElementPosition().left,e.isMoveInProgress=!0}},this.handleHorizontalSwipe=function(t){if(!e.isSlideInProgress){var i=t.touches;e.moveX=i?i[0].clientX-e.getCarouselElementPosition().left:t.clientX-e.getCarouselElementPosition().left,e.distanceAbs=e.getDistanceAbs(),e.direction=e.getDirection(),e.moveContainer()}},this.handleTouchend=function(t){!e.isSlideInProgress&&e.isTouchstart?(e.isMoveInProgress=!1,e.detectSlide()?e.handleSlide():(e.newContainerPositionIndex=0,e.alignContainer()),e.startX=e.moveX=e.distanceAbs=void 0,e.isTouchstart=!1):e.isTouchstart=!1},this.element=t.element,this.properties=t,this.cells=this.element.children,this.visibleWidth=this.properties.visibleWidth||this.element.parentElement.clientWidth,this.setContainerWidth(),this.alignContainer(0)}return Object.defineProperty(t.prototype,"cellLength",{get:function(){return this.images?this.images.length:this.cells.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"totalContainerCellsCount",{get:function(){if(this.images){var t=this.visibleCellsCount+2*this.overflowCellsLimit;return t>this.images.length&&(t=this.images.length),t}return this.cellLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFirstCell",{get:function(){return 0===this.slideCounter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastCellIndex",{get:function(){return this.images.length?this.images.length-1:this.cells.length-1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overflowCellsLimit",{get:function(){return this.images&&this.isImagesLessCellLimit?Math.floor((this.images.length-this.visibleCellsCount)/2):this.properties.overflowCellsLimit},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isImagesLessCellLimit",{get:function(){return 2*this.properties.overflowCellsLimit+this.visibleCellsCount>this.images.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellLimit",{get:function(){return this.visibleCellsCount+2*this.overflowCellsLimit},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"images",{get:function(){return this.properties.images},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return this.properties.margin},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minSwipeDistance",{get:function(){return this.properties.minSwipeDistance},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitionDuration",{get:function(){return this.properties.transitionDuration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"transitionTimingFunction",{get:function(){return this.properties.transitionTimingFunction},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fullCellWidth",{get:function(){return this.properties.cellWidth+this.margin},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleCellsCount",{get:function(){return Math.ceil(this.visibleWidth/this.fullCellWidth)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lapCounter",{get:function(){return Math.floor(this.slideCounter/this.totalContainerCellsCount)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleCellsOverflowContainer",{get:function(){return this.visibleCellsCount*this.fullCellWidth-this.margin>this.visibleWidth},enumerable:!1,configurable:!0}),t.prototype.moveContainer=function(){var t=this.getMovePositionX();this.transformPositionX(t,0)},t.prototype.getMovePositionX=function(){var t=this.getDistance();return this.containerInitialPositionX-t},t.prototype.alignContainer=function(t){void 0===t&&(t=this.transitionDuration);var e=this.getContainerPosition();this.transformPositionX(e,t),this.setInitialContainerPosition(e)},t.prototype.getContainerPosition=function(){var t=this.getContainerPositionCorrection();return this.isContainerPositionCorrection=0!=t,this.initialContainerPosition+this.newContainerPositionIndex*this.fullCellWidth+t},t.prototype.setInitialContainerPosition=function(t){var e=this.getContainerPositionCorrection();this.initialContainerPosition=t-e},t.prototype.getContainerPositionCorrection=function(){var t=0;return this.properties.loop?0:((this.cellLength-this.preliminarySlideCounter<this.visibleCellsCount||this.isSlideLengthLimited)&&(this.visibleWidth<this.totalContainerCellsCount*this.fullCellWidth&&(t=-(this.visibleCellsCount*this.fullCellWidth-this.visibleWidth-this.margin)),t>=-this.margin&&(t=0)),t)},t.prototype.quicklyPositionContainer=function(){var t=this.getContainerPositionCorrection(),e=this.getNewContainerPosition()+t;this.transformPositionX(e,0),this.setInitialContainerPosition(e)},t.prototype.getNewContainerPosition=function(){return this.slideCounter>this.overflowCellsLimit&&"left"===this.alignCells?(this.lineUpCells(),-this.overflowCellsLimit*this.fullCellWidth):this.slideCounter<=this.overflowCellsLimit?(this.previousSlideCounter>this.overflowCellsLimit&&this.lineUpCells(),-this.slideCounter*this.fullCellWidth):void 0},t.prototype.setContainerWidth=function(){var t=this.getContainerWidth();this.element.style.width=t+"px"},t.prototype.getContainerWidth=function(){var t=this.totalContainerCellsCount*this.fullCellWidth,e=this.cellLength*this.fullCellWidth;return e<t&&(t=e),t},t.prototype.getFile=function(t){var e=this.getFileIndex(t),i=this.images[e];return i&&!i.type&&(i.type="image"),{image:this.images[e],imageIndex:e}},t.prototype.getFileIndex=function(t){var e,i=this.getPositionIndex(t),n=(this.totalContainerCellsCount,this.slideCounter);if(!this.isContainerLocked)return n<=this.overflowCellsLimit?t:(e=i+(n-this.overflowCellsLimit),this.images&&this.properties.loop&&(e%=this.images.length),e);"left"===this.alignCells&&(e=n>this.overflowCellsLimit?i+(n-this.overflowCellsLimit):t);return!(e>this.lastCellIndex&&!this.properties.loop)&&e},t.prototype.transformPositionX=function(t,e){void 0===e&&(e=this.transitionDuration),this.element.style.transition="transform "+e+"ms "+this.transitionTimingFunction,this.element.style.transform="translateX("+t+"px)"},t.prototype.detectSlide=function(){return this.distanceAbs>=this.minSwipeDistance},t.prototype.next=function(){this.isSlideInProgress||(this.direction="left",this.handleSlide(1))},t.prototype.prev=function(){this.isSlideInProgress||(this.direction="right",this.handleSlide(1))},t.prototype.select=function(t){this.slideCounter=t,this.quicklyPositionContainer()},t.prototype.handleSlide=function(t){void 0===t&&(t=void 0),this.slideLength=this.getSlideLength(),this.slideLength=t||this.limitSlideLength(this.slideLength),"left"!==this.direction||this.isSlideInProgress||(this.preliminarySlideCounter=this.slideCounter+this.slideLength,this.detectLastSlide(this.slideCounter+this.slideLength)||(this.newContainerPositionIndex=this.newContainerPositionIndex-this.slideLength,this.isSlideInProgress=!0,this.isLazyLoad&&(this.isContainerLocked=this.preliminarySlideCounter>this.overflowCellsLimit,this.detectContainerUnlock()&&(this.isContainerLocked=!1)))),"right"!==this.direction||this.isSlideInProgress||(this.slideCounter-this.slideLength<0&&(this.slideLength=this.slideCounter),this.preliminarySlideCounter=this.slideCounter-this.slideLength,this.isFirstCell||(this.newContainerPositionIndex=this.newContainerPositionIndex+this.slideLength,this.isSlideInProgress=!0,this.isLazyLoad&&(this.preliminarySlideCounter>this.overflowCellsLimit?this.isContainerLocked=!0:this.isContainerLocked=!1,this.detectContainerUnlock()&&(this.isContainerLocked=!1)))),this.alignContainer()},t.prototype.getSlideLength=function(){var t=this.getContainerPositionCorrection(),e=Math.floor((this.distanceAbs+t)/this.fullCellWidth);return this.distanceAbs%this.fullCellWidth>=this.minSwipeDistance&&e++,e},t.prototype.limitSlideLength=function(t){if(t>1)for(var e=0;e<t;e++){var i=this.slideCounter+(t-e);if(!this.detectLastSlide(i)){t-=e,this.isSlideLengthLimited=e>0;break}}return t},t.prototype.detectLastSlide=function(t){return!this.properties.loop&&this.cellLength-t<this.visibleCellsCount},t.prototype.isNextArrowDisabled=function(){return this.visibleCellsOverflowContainer?this.detectLastSlide(this.slideCounter+1)&&this.isContainerPositionCorrection:this.detectLastSlide(this.slideCounter+1)},t.prototype.isPrevArrowDisabled=function(){return 0===this.slideCounter},t.prototype.detectContainerUnlock=function(){return this.cellLength-this.preliminarySlideCounter<this.visibleCellsCount+this.overflowCellsLimit},t.prototype.handleSlideEnd=function(){this.isSlideInProgress&&(this.transformSlideEnd(),this.isSlideInProgress=!1,this.newContainerPositionIndex=0,this.isSlideLengthLimited=void 0)},t.prototype.transformSlideEnd=function(){this.isLazyLoad&&(this.setSlideCounter(),(this.images||!this.images&&this.properties.loop)&&this.quicklyPositionContainer()),this.previousSlideCounter=this.slideCounter},t.prototype.setSlideCounter=function(){"left"===this.direction&&(this.slideCounter=this.slideCounter+this.slideLength),"right"===this.direction&&(this.slideCounter=this.slideCounter-this.slideLength),this.direction=void 0,this.slideLength=0},t.prototype.resetTransition=function(){this.element.style.transition=""},t.prototype.getElementPosition=function(){return this.element.getBoundingClientRect()},t.prototype.getCarouselElementPosition=function(){return this.properties.container.getBoundingClientRect()},t.prototype.getDistance=function(){return this.startX-this.moveX},t.prototype.getDistanceAbs=function(){return Math.abs(this.startX-this.moveX)},t.prototype.getDirection=function(){var t=Math.sign(this.startX-this.moveX);return-1===t?"right":1===t?"left":void 0},t.prototype.lineUpCells=function(){for(var t=this.element.children,e=0;e<t.length;e++){var i=t[e],n=this.getCellPositionX(e);i.style.transform="translateX("+n+"px)",i.style.width=this.properties.cellWidth+"px"}},t.prototype.getCellPositionX=function(t){return this.getPositionIndex(t)*this.fullCellWidth},t.prototype.getPositionIndex=function(t){var e,i=this.slideCounter,n=this.totalContainerCellsCount,o=i-this.overflowCellsLimit;return o>n&&(o%=n),o<0?t:((e=t-o)<0&&(e=n+e),e)},t.prototype.getCenterPositionIndex=function(){return(this.totalContainerCellsCount-1)/2},t.prototype.autoplay=function(){var t=this;this.autoplayId=setInterval((function(){t.next()}),this.properties.autoplayInterval)},t.prototype.stopAutoplay=function(){this.autoplayId&&clearInterval(this.autoplayId)},t.prototype.destroy=function(){this.stopAutoplay()},t}(),s=function(){function t(t,i){var n=this;this.elementRef=t,this.ref=i,this.minTimeout=30,this._cellWidth=200,this.events=new e.EventEmitter,this.height=200,this.loop=!1,this.autoplay=!1,this.autoplayInterval=5e3,this.pauseOnHover=!0,this.dots=!1,this.margin=10,this.objectFit="cover",this.minSwipeDistance=50,this.transitionDuration=200,this.transitionTimingFunction="ease",this.counterSeparator=" / ",this.overflowCellsLimit=3,this.listeners="mouse and touch",this.arrows=!0,this.arrowsTheme="light",this.hostClassCarousel=!0,this.handleTouchstart=function(t){n.carousel.handleTouchstart(t),n.isMoving=!0,n.events.emit({type:"touchstart",event:t})},this.handleHorizontalSwipe=function(t){t.preventDefault(),n.carousel.handleHorizontalSwipe(t),n.events.emit({type:"swipe",event:t})},this.handleTouchend=function(t){t.touches;n.carousel.handleTouchend(t),n.isMoving=!1,n.events.emit({type:"touchend",event:t})},this.handleTap=function(t){var e=n.carousel.slideCounter,i=n.carousel.currentCellIndex,o=n.carousel.getFileIndex(e),s=n.carousel.getFile(i);n.events.emit({type:"click",file:s,index:o})}}return Object.defineProperty(t.prototype,"isContainerLocked",{get:function(){return this.carousel.isContainerLocked},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"slideCounter",{get:function(){return this.carousel.slideCounter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousSlideCounter",{get:function(){return this.carousel.previousSlideCounter},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lapCounter",{get:function(){return this.carousel.lapCounter},enumerable:!1,configurable:!0}),t.prototype.lineUpCells=function(){this.carousel.lineUpCells()},t.prototype.quicklyPositionContainer=function(){this.carousel.quicklyPositionContainer()},Object.defineProperty(t.prototype,"isLandscape",{get:function(){return window.innerWidth>window.innerHeight},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isSafari",{get:function(){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("safari"))return!(t.indexOf("chrome")>-1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"counter",{get:function(){return(this.loop?this.slideCounter%this.cellLength:this.slideCounter)+1+this.counterSeparator+this.cellLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellsElement",{get:function(){return this.elementRef.nativeElement.querySelector(".carousel-cells")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"images",{get:function(){return this._images},set:function(t){this._images=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellWidth",{set:function(t){t&&(this._cellWidth=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCounter",{get:function(){return this._isCounter&&this.cellLength>1},set:function(t){t&&(this._isCounter=t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeDotIndex",{get:function(){return this.slideCounter%this.cellLength},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cellLimit",{get:function(){if(this.carousel)return this.carousel.cellLimit},enumerable:!1,configurable:!0}),t.prototype.onWindowResize=function(t){this.landscapeMode=this.isLandscape,this.ref.detectChanges(),this.initCarousel(),this.carousel.lineUpCells()},t.prototype.onMousemove=function(t){this.autoplay&&this.pauseOnHover&&this.carousel.stopAutoplay()},t.prototype.onMouseleave=function(t){this.autoplay&&this.pauseOnHover&&this.carousel.autoplay()},t.prototype.ngOnInit=function(){this.isNgContent=this.cellsElement.children.length>0,this.touches=new n({element:this.cellsElement,listeners:this.listeners}),this.touches.on("touchstart",this.handleTouchstart),this.touches.on("horizontal-swipe",this.handleHorizontalSwipe),this.touches.on("touchend",this.handleTouchend),this.touches.on("mousedown",this.handleTouchstart),this.touches.on("mouseup",this.handleTouchend),this.touches.on("tap",this.handleTap),this.initCarousel(),this.setDimensions(),this.autoplay&&this.carousel.autoplay()},t.prototype.ngAfterViewInit=function(){this.cellLength=this.getCellLength(),this.dotsArr=Array(this.cellLength).fill(1),this.ref.detectChanges(),this.carousel.lineUpCells(),this.detectDomChanges()},t.prototype.ngOnChanges=function(t){(t.width||t.height||t.images)&&(this.setDimensions(),this.initCarousel(),this.carousel.lineUpCells(),this.ref.detectChanges())},t.prototype.ngOnDestroy=function(){this.touches.destroy(),this.carousel.destroy()},t.prototype.initCarousel=function(){this.carousel=new o({element:this.elementRef.nativeElement.querySelector(".carousel-cells"),container:this.elementRef.nativeElement,images:this.images,cellWidth:this.getCellWidth(),loop:this.loop,autoplayInterval:this.autoplayInterval,overflowCellsLimit:this.overflowCellsLimit,visibleWidth:this.width,margin:this.margin,minSwipeDistance:this.minSwipeDistance,transitionDuration:this.transitionDuration,transitionTimingFunction:this.transitionTimingFunction,videoProperties:this.videoProperties})},t.prototype.detectDomChanges=function(){var t=this;new MutationObserver((function(e){t.onDomChanges()})).observe(this.elementRef.nativeElement,{attributes:!0,childList:!0,characterData:!0})},t.prototype.onDomChanges=function(){this.cellLength=this.getCellLength(),this.carousel.lineUpCells(),this.ref.detectChanges()},t.prototype.setDimensions=function(){this.hostStyleHeight=this.height+"px",this.hostStyleWidth=this.width+"px"},t.prototype.getFile=function(t){return this.carousel.getFile(t)},t.prototype.handleTransitionendCellContainer=function(t){this.carousel.handleSlideEnd()},t.prototype.toggleVideo=function(t){event.preventDefault(),this.videoProperties.noPlay||(t.paused?(t.play(),this.isVideoPlaying=!0):(t.pause(),this.isVideoPlaying=!1),this.ref.detectChanges())},t.prototype.getCurrentIndex=function(){return this.carousel.slideCounter},t.prototype.getCellWidth=function(){return"100%"===this._cellWidth?this.elementRef.nativeElement.clientWidth:this._cellWidth},t.prototype.next=function(){this.carousel.next(1),this.carousel.stopAutoplay()},t.prototype.prev=function(){this.carousel.prev(1),this.carousel.stopAutoplay()},t.prototype.select=function(t){this.carousel.select(t)},t.prototype.isNextArrowDisabled=function(){return this.carousel.isNextArrowDisabled()},t.prototype.isPrevArrowDisabled=function(){return this.carousel.isPrevArrowDisabled()},t.prototype.getCellLength=function(){return this.images?this.images.length:this.cellsElement.children.length},t}();s.decorators=[{type:e.Component,args:[{selector:"carousel, [carousel]",exportAs:"carousel",template:'<div class="carousel-counter" *ngIf="isCounter">{{counter}}</div>\n\n<div class="carousel-container" [class.carousel-moving]="isMoving">\n\t<div class="carousel-cells" #cells (transitionend)="handleTransitionendCellContainer($event)">\n\t\t<ng-content></ng-content>\n\n\t\t<ng-template ngFor let-image [ngForOf]="images" let-i="index">\n\t\t\t<div class="carousel-cell" \n\t\t\t\t*ngIf="i < cellLimit" \n\t\t\t\t[style.width]="getCellWidth()+\'px\'"\n\t\t\t\t[style.border-radius]="borderRadius+\'px\'">\n\n\t\t\t\t\x3c!-- Image --\x3e\n\t\t\t\t<img \n\t\t\t\t\t*ngIf="getFile(i) && getFile(i)[\'image\']" \n\t\t\t\t\t[src]="getFile(i)[\'image\'][\'path\']"\n\t\t\t\t\t[style.object-fit]="objectFit"\n\t\t\t\t\tdraggable="false" />\n\n\t\t\t\t\x3c!-- Video --\x3e\n\t\t\t\t<ng-template [ngIf]="getFile(i) && getFile(i)[\'type\'] === \'video\'">\n\t\t\t\t\t<div class="carousel-play" (click)="toggleVideo(video)"></div>\n\n\t\t\t\t\t<video #video\n\t\t\t\t\t\t[loop]="videoProperties.loop"\n\t\t\t\t\t\t[muted]="videoProperties.muted"\n\t\t\t\t\t\t[controls]="isSafari"\n\t\t\t\t\t\t[style.object-fit]="objectFit"\n\t\t\t\t\t\t[style.border-radius]="borderRadius+\'px\'">\n\t\t\t\t\t\t\n\t\t\t\t\t\t<source [src]="getFile(i)[\'path\']" type="video/mp4">\n\t\t\t\t\t</video>\n\t\t\t\t</ng-template>\n\t\t\t</div>\n\t\t</ng-template>\n\t</div>\n\n\t<div class="carousel-dots" *ngIf="dots">\n\t\t<div class="carousel-dot" [class.carousel-dot-active]="i === activeDotIndex" *ngFor="let dot of dotsArr; index as i"></div>\n\t</div>\n</div>\n\n<div class="carousel-arrows" \n\t[class.carousel-arrows-outside]="arrowsOutside" \n\t[class.carousel-dark-arrows]="arrowsTheme === \'dark\'"\n\t*ngIf="arrows">\n\t\n\t<div class="carousel-arrow carousel-arrow-prev" [class.carousel-arrow-disabled]="isPrevArrowDisabled()" (click)="prev()"></div>\n\t<div class="carousel-arrow carousel-arrow-next" [class.carousel-arrow-disabled]="isNextArrowDisabled()" (click)="next()"></div>\n</div>',styles:[":host{-moz-user-select:none;-webkit-user-select:none;box-sizing:border-box;display:block;height:100%;left:0;position:relative;top:0;transform-origin:top left;user-select:none;width:100%;z-index:10000}:host .carousel-container{cursor:grab;height:100%;overflow:hidden;width:100%}:host .carousel-container.carousel-moving{cursor:grabbing}:host .carousel-counter{background-color:rgba(23,37,68,.3);border-radius:13px;color:#fff;font-size:11px;line-height:normal;padding:5px 7px;position:absolute;right:24px;text-align:right;top:8px;transition:opacity .2s;z-index:30}:host ::ng-deep .carousel-cells{display:block;height:100%;transition:transform .2s;width:100%}:host ::ng-deep .carousel-cells .carousel-cell.swiper-prev-image{transform:translate3d(-100%,0,0)}:host ::ng-deep .carousel-cells .carousel-cell.swiper-next-image{transform:translate3d(100%,0,0)}:host ::ng-deep .carousel-cells .carousel-cell{height:100%;overflow:hidden;position:absolute;width:100%}:host ::ng-deep .carousel-cells .carousel-cell img,:host ::ng-deep .carousel-cells .carousel-cell video{height:100%;object-fit:contain;position:relative;width:100%}:host ::ng-deep .carousel-cells .carousel-cell img.swiper-hide{display:none}:host ::ng-deep .carousel-cells .carousel-cell .carousel-play{bottom:0;left:0;position:absolute;right:0;top:0;z-index:1}:host .carousel-arrow{background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:31px;border-radius:100px;box-shadow:0 0 5px rgba(0,0,0,.15);cursor:pointer;height:40px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:10}:host .carousel-arrow-prev{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMTUuNDEgMTYuNTlMMTAuODMgMTJsNC41OC00LjU5TDE0IDZsLTYgNiA2IDYgMS40MS0xLjQxeiIvPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==);left:10px}:host .carousel-arrow-next{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNOC41OSAxNi41OUwxMy4xNyAxMiA4LjU5IDcuNDEgMTAgNmw2IDYtNiA2LTEuNDEtMS40MXoiLz48cGF0aCBkPSJNMCAwaDI0djI0SDBWMHoiIGZpbGw9Im5vbmUiLz48L3N2Zz4=);right:10px}:host .carousel-arrows-outside .carousel-arrow-prev{left:-60px}:host .carousel-arrows-outside .carousel-arrow-next{right:-60px}:host .carousel-dark-arrows .carousel-arrow{filter:invert(1)}:host .carousel-arrow-disabled{cursor:default;opacity:.5}:host .carousel-dots{bottom:0;left:0;position:absolute;right:0;text-align:center;z-index:10}:host .carousel-dots .carousel-dot{border:2px solid #fff;border-radius:100px;display:inline-block;height:8px;margin:4px;width:8px}:host .carousel-dots .carousel-dot-active{background-color:#fff}"]}]}],s.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef}]},s.propDecorators={images:[{type:e.Input}],events:[{type:e.Output}],height:[{type:e.Input}],width:[{type:e.Input}],loop:[{type:e.Input}],autoplay:[{type:e.Input}],autoplayInterval:[{type:e.Input}],pauseOnHover:[{type:e.Input}],dots:[{type:e.Input}],borderRadius:[{type:e.Input}],margin:[{type:e.Input}],objectFit:[{type:e.Input}],minSwipeDistance:[{type:e.Input}],transitionDuration:[{type:e.Input}],transitionTimingFunction:[{type:e.Input}],videoProperties:[{type:e.Input}],counterSeparator:[{type:e.Input}],overflowCellsLimit:[{type:e.Input}],listeners:[{type:e.Input}],cellWidth:[{type:e.Input,args:["cellWidth"]}],isCounter:[{type:e.Input,args:["counter"]}],arrows:[{type:e.Input}],arrowsOutside:[{type:e.Input}],arrowsTheme:[{type:e.Input}],hostClassCarousel:[{type:e.HostBinding,args:["class.carousel"]}],hostStyleHeight:[{type:e.HostBinding,args:["style.height"]}],hostStyleWidth:[{type:e.HostBinding,args:["style.width"]}],onWindowResize:[{type:e.HostListener,args:["window:resize",["$event"]]}],onMousemove:[{type:e.HostListener,args:["mousemove",["$event"]]}],onMouseleave:[{type:e.HostListener,args:["mouseleave",["$event"]]}]};var r=function(){};r.decorators=[{type:e.NgModule,args:[{declarations:[s],imports:[i.CommonModule],exports:[s],providers:[],bootstrap:[],entryComponents:[s]}]}],t.CarouselComponent=s,t.IvyCarouselModule=r,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=angular-responsive-carousel.umd.min.js.map |
@@ -30,3 +30,3 @@ import { ChangeDetectorRef, Component, ElementRef, EventEmitter, HostBinding, HostListener, Input, Output } from '@angular/core'; | ||
this.handleTouchstart = (event) => { | ||
event.preventDefault(); | ||
//event.preventDefault(); | ||
this.carousel.handleTouchstart(event); | ||
@@ -331,2 +331,2 @@ this.isMoving = true; | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2Fyb3VzZWwuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvYW5ndWxhci1yZXNwb25zaXZlLWNhcm91c2VsL3NyYy9saWIvY2Fyb3VzZWwuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxpQkFBaUIsRUFBRSxTQUFTLEVBQUUsVUFBVSxF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gICAgICAgICAgdHlwZTogJ2NsaWNrJyxcbiAgICAgICAgICAgIGZpbGU6IGZpbGUsXG4gICAgICAgICAgICBpbmRleDogZmlsZUluZGV4XG4gICAgICAgIH0pO1xuICAgIH1cblxuICAgIGhhbmRsZVRyYW5zaXRpb25lbmRDZWxsQ29udGFpbmVyKGV2ZW50KSB7XG4gICAgICAgIHRoaXMuY2Fyb3VzZWwuaGFuZGxlU2xpZGVFbmQoKTtcbiAgICB9XG5cbiAgICB0b2dnbGVWaWRlbyh2aWRlbykge1xuICAgICAgICBldmVudC5wcmV2ZW50RGVmYXVsdCgpO1xuICAgICAgICBpZiAodGhpcy52aWRlb1Byb3BlcnRpZXMubm9QbGF5KSB7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAodmlkZW8ucGF1c2VkKSB7XG4gICAgICAgICAgICB2aWRlby5wbGF5KCk7XG4gICAgICAgICAgICB0aGlzLmlzVmlkZW9QbGF5aW5nID0gdHJ1ZTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHZpZGVvLnBhdXNlKCk7XG4gICAgICAgICAgICB0aGlzLmlzVmlkZW9QbGF5aW5nID0gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLnJlZi5kZXRlY3RDaGFuZ2VzKCk7XG4gICAgfVxuXG4gICAgZ2V0Q3VycmVudEluZGV4KCkge1xuICAgICAgICByZXR1cm4gdGhpcy5jYXJvdXNlbC5zbGlkZUNvdW50ZXI7XG4gICAgfVxuXG4gICAgZ2V0Q2VsbFdpZHRoKCk6IG51bWJlciB7XG4gICAgICAgIGlmICh0aGlzLl9jZWxsV2lkdGggPT09ICcxMDAlJykge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LmNsaWVudFdpZHRoO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuX2NlbGxXaWR0aDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5leHQoKSB7XG4gICAgICAgIHRoaXMuY2Fyb3VzZWwubmV4dCgxKTtcbiAgICAgICAgdGhpcy5jYXJvdXNlbC5zdG9wQXV0b3BsYXkoKTtcbiAgICB9XG5cbiAgICBwcmV2KCkge1xuICAgICAgICB0aGlzLmNhcm91c2VsLnByZXYoMSk7XG4gICAgICAgIHRoaXMuY2Fyb3VzZWwuc3RvcEF1dG9wbGF5KCk7XG4gICAgfVxuXG4gICAgc2VsZWN0KGluZGV4OiBudW1iZXIpIHtcbiAgICAgICAgdGhpcy5jYXJvdXNlbC5zZWxlY3QoaW5kZXgpO1xuICAgIH1cblxuICAgIGlzTmV4dEFycm93RGlzYWJsZWQoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLmNhcm91c2VsLmlzTmV4dEFycm93RGlzYWJsZWQoKTtcbiAgICB9XG5cbiAgICBpc1ByZXZBcnJvd0Rpc2FibGVkKCkge1xuICAgICAgICByZXR1cm4gdGhpcy5jYXJvdXNlbC5pc1ByZXZBcnJvd0Rpc2FibGVkKCk7XG4gICAgfVxuXG4gICAgZ2V0Q2VsbExlbmd0aCgpIHtcbiAgICAgICAgaWYgKHRoaXMuaW1hZ2VzKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5pbWFnZXMubGVuZ3RoO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2VsbHNFbGVtZW50LmNoaWxkcmVuLmxlbmd0aDtcbiAgICAgICAgfVxuICAgIH1cbn0iXX0= |
@@ -811,3 +811,3 @@ import { EventEmitter, Component, ElementRef, ChangeDetectorRef, Input, Output, HostBinding, HostListener, NgModule } from '@angular/core'; | ||
this.handleTouchstart = (event) => { | ||
event.preventDefault(); | ||
//event.preventDefault(); | ||
this.carousel.handleTouchstart(event); | ||
@@ -814,0 +814,0 @@ this.isMoving = true; |
{ | ||
"name": "angular-responsive-carousel", | ||
"version": "1.3.9", | ||
"version": "1.3.10", | ||
"description": "Carousel for Angular. A simple solution for horizontal scrolling images with lazy loading.", | ||
@@ -5,0 +5,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
523573