Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the width of the slides increases on swipe #122

Open
napulitanfrontend opened this issue Mar 3, 2017 · 2 comments
Open

the width of the slides increases on swipe #122

napulitanfrontend opened this issue Mar 3, 2017 · 2 comments

Comments

@napulitanfrontend
Copy link

I use angular-slick-carousel in my project, but on each images swipe width increases. WHY??
I used the same slider to another page, and I do not have this problem...
This is my code:

JS:

(function () {
'use strict';

angular.module('collection')
		.controller('CollectionCtrl', ['$state',  'RouteConstant', '$sce', function ($state, RouteConstant, $sce) {
	
		var vm = this;
		vm.srcImages=[{
			src:'./images/collection/collection_00.png'
		},
		{
			src:'./images/collection/collection_01.jpg'
		},
		{
			src:'./images/collection/collection_02.jpg'
		},
		{
			src:'./images/collection/collection_03.jpg'
		},
		{
			src:'./images/collection/collection_04.png'
		}];
		vm.currentIndex = 0;
		vm.slickConfig = {
				    enabled: true,
				    autoplay: false,
				    infinite:true,
				    draggable: false,
				    prevArrow: false,
				    centerMode:false,
				    nextArrow: false,
				    swipeToSlide: true,
				    slidesToShow:2,
				    edgeFriction: 0.02,
				    slide:'div',
				    swipe: true,
	                touchMove: true,
	                touchThreshold: 5,
				    method: {}
				 		
			};

HTML:

@samir-kamble
Copy link

same problem facing here. Any one have resolution of the same?

@samir-kamble
Copy link

found solution here.

kenwheeler/slick#2378

Please make sure you don't have flex element as parent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants