question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update paddings (and other options) on glider refresh

See original GitHub issue

Would be cool if on glide_api.refresh() you could update certain options, for example paddings

This would enable things like better transitions to mobile layouts, for instance:

  • for desktop I use paddings: '25%' to enable 2 slides up at once
  • for mobile/small screen, I use paddings: '0%' to enable 1 slide up at this size (otherwise 2 up at once makes slides appear very skinny)

When resizing the window I would like to be able to change paddings if the window size changes from big to small and vice versa

A workaround i’m using at the moment is to destroy and recreate a new glider with the different paddings option, hax

The .refresh() method seems like a good place to be able to do this as setup is called within. But even any way of being able to update paddings after init of glider would be 👌

Thoughts?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jedrzejchalubekcommented, Apr 6, 2018

Introduced with v3.0.0 release 😃

Use breakpoints option when initializing glide. Example:

new Glide('.glide', {
  peek: 100,
  breakpoints: {
    800: { peek: 50 },
    480: { peek: 25 },
  }
}).mount();

You can also programmatically update instance settings with .update() API method:

var glide = new Glide('.glide', {
  peek: 100
}).mount();

glide.update({
  peek: 200
});
1reaction
jedrzejchalubekcommented, Feb 8, 2018

@marcaum54 From my previous message:

Now, glide lacks of functionality for changing options via api. Adding to the milestone 😃

This functionality is planned for v3.0.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using glide.js .refresh api - Stack Overflow
I am having an issue where I have an instance of a glide.js slide show inside a easytabs.js instance. When the window size...
Read more >
Update a Nursery Glider Rocking Chair - Pinterest
Glider Cushions and Ottoman cushion​​ It doesn't get more comfortable than this! Once your order one of our custom cushions, you'll wonder why...
Read more >
Available system properties
Enables (true) or disables (false) updating the task timer value based on changes to the task time worked records. Uses the Update task...
Read more >
Glider Rocker Replacement Cushions - VisualHunt
Put one of these navy glider rocker replacement cushions on your seasoned rocker to give it a refresh. The navy cushion works well...
Read more >
Fortnite bug tracker: Reported and officially ack issues and ...
We will be regularly updating this tracker as and when new Fortnite bugs and issues surface so make sure you keep an eye...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found