How disable first and last slides bounce in SlideBox?


#1

Hello. How can I disable bounce effect of first and last slides in SlideBox like on this image - http://ionicframework.com.s3.amazonaws.com/docs/controllers/slideBox.gif (blue and pink slides)?


#2

you can do something like this:

if ($ionicSlideBoxDelegate.currentIndex() == 0 || $ionicSlideBoxDelegate.currentIndex() == mySlidesLength-1) {
    $ionicSlideBoxDelegate.enableSlide(false)
}

#3

it is cool, but now I can’t swipe on this slides :slight_smile: I just don’t want to see black borders when I swipe to the right first slide and to the left last slide.


#4

Oh right! you won’t be able to slide back with my solution :smiley: sorry. Hmm I don’t know any other way…


#5

How other developers works with SlideBox and this white/black borders in their apps?


#6

looks like this issue has been pushed, but not fully working for slide box

last resort you might take a look at this,


#7

Thank you. It is what I am searching


#8

Hi @Stanislav is this working right now?
Doesn’t seem to work for me. Testing in Ionic 1.0 stable.


#9

I don’t try. I change some logic in my app so I don’t need to disable this bounce effect.


#10

My solution using drag-left and drag-right on first and last slide to enable slide and watch the indexSlide to disable it.

http://codepen.io/Scrubles/pen/VvebQr


#11

Hey, Scrubles!

I would be really happy if you could contact me and help me out a little bit. I can’t make this drag-left and drag-right to work.

Best regards,
Paul


#12

Hey there.

What’s up? You should check if the version is the same, that example is 1.1.0, and they might have changed something.