antonreshetov / vue-glide

A slider and carousel as vue component on top of the Glide.js
https://antonreshetov.github.io/vue-glide/
MIT License
269 stars 39 forks source link

Prevent ul 'glide__slides' element from resizing on window resize #33

Open Pickeringwareltd opened 5 years ago

Pickeringwareltd commented 5 years ago

I have a container in a fixed position that contains a vue-glide component, I then have a container which overlays and scrolls above that component that also includes a vue-glide component.

Upon window resize, the vue glide component in the fixed container continuously gets larger, even when the window gets smaller.

The vue glide component in the non-fixed container does not do this.

I dont expect my users to increase screen size mid-use, is there a way to disable resizing of the vue glide component upon window resize to prevent this?

Pickeringwareltd commented 5 years ago

For anyone who has a similar issue, even though it is admittedly a hack, I found that adding the carousel into a container with either fixed or absolute positioning prevented the bug from happening and allows the carousel to resize appropriately.