Glide: Is there any way to prevent sliding?

Created on 22 May 2018  路  3Comments  路  Source: glidejs/glide

Hello!
I would like to navigate through slides only with nav buttons not with slide gesture (touch or mouse) as I would like to be able to slide content inside the slide. Is there any easy way to do it?
I haven't noticed any option to disable touch(slide) functionality.
Adam

Most helpful comment

@adambartosiewicz I had the same problem and am using HTML script tags to import Glide. You can disable the swipe by overriding the Swipe namespace:

const myGlide = new Glide('.glide')
myGlide.mount({
  Swipe: undefined
})

All 3 comments

There are two options that can help you swipeThreshold (for controlling touch swiping) and dragThreshold (for controlling mouse swiping). Please, refer to the docs.

However, if you using a modular build it's better to not to mount a Swipe component.

@adambartosiewicz I had the same problem and am using HTML script tags to import Glide. You can disable the swipe by overriding the Swipe namespace:

const myGlide = new Glide('.glide')
myGlide.mount({
  Swipe: undefined
})

@adambartosiewicz I had the same problem and am using HTML script tags to import Glide. You can disable the swipe by overriding the Swipe namespace:

const myGlide = new Glide('.glide')
myGlide.mount({
  Swipe: undefined
})

ily

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Danielvandervelden picture Danielvandervelden  路  4Comments

robertu7 picture robertu7  路  6Comments

lifeinchords picture lifeinchords  路  3Comments

thany picture thany  路  3Comments

JayBox325 picture JayBox325  路  7Comments