Glide: Disabling looping (formerly circular: false?)

Created on 17 May 2018  ·  9Comments  ·  Source: glidejs/glide

Hi there, thanks for maintaining this. Quick question: is there a way to disable looping at all? For example (ltr):

  • when the slideIndex is 0, no left sliding
  • when the slideIndex is at the last slide, no right sliding

Checking the old docs, it looks like this used to be possible with the option circular: false, but I don't see this in the current version. Is there another way to accomplish this? Thanks!

feature request

Most helpful comment

@jedrzejchalubek @i-a-n
There is a PR: #223

All 9 comments

+1 for this feature.

I've tried to subscribe to run.before event and prevent changing slide for those cases but with no luck.

Hello 👋 Currently, ^3.0 lacks this functionality. Gonna mark this as feature request.

Do you have any immediate thoughts on how that would best be accomplished with the current API? I'd be happy to take a look and open a PR, so any ideas/guidance would be helpful.

+1

+1 - need this feature too.

@jedrzejchalubek Hi Jedrzej, would it be possible to get this change in this week?

@i-a-n I appreciate help. Feel free to submit PR I'll help you there 👍

The required changes should come down to simple if check in Run.calculate method (inside this sections: run.js#L62-L66 and run.js#L78-L82). We should only overwrite Glide.index only when instance type is slider and new option named(?) rewind is set to true.


@ppmazur ¯_(ツ)_/¯ It's open-source

Sorry, I didn't mean to be rude. I thought that you've already had the code for this change. My bad :)

@jedrzejchalubek @i-a-n
There is a PR: #223

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dkindnes picture dkindnes  ·  5Comments

philmarc picture philmarc  ·  3Comments

dodozhang21 picture dodozhang21  ·  5Comments

thasmo picture thasmo  ·  4Comments

thany picture thany  ·  3Comments