angular-carousel
angular-carousel copied to clipboard
rn-carousel-locked does not work when create slides with ng-repeat
When create slides dynamically using ng-repeat the rn-carousel-locked attribute does not work only works with static slides see http://jsfiddle.net/csyzd6xL/1/
It doesn't work if the locked flag is always true, it works with a checkbox: http://jsfiddle.net/a2ke6grk/2/
@milton-loayza-tierconnect-com, you can use $timeout
as a workaround: http://jsfiddle.net/a2ke6grk/1/
Thanks @andreicojea, for the suggestion.
For me it works if I set pressed to false in swipeStart() if locked
function swipeStart(coords, event) {
// console.log('swipeStart', coords, event);
if (locked || currentSlides.length <= 1) {
pressed = false; // <<<< HERE
return;
}
updateContainerWidth();
elX = iElement[0].querySelector('li').getBoundingClientRect().left;
pressed = true;
startX = coords.x;
return false;
}