Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] wrong value set for the created frame width on first render #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Alx-l
Copy link

@Alx-l Alx-l commented Aug 18, 2018

Recompute the 'selectorWidth' value inside the 'buildSliderFrame' method:

  • to avoid an inconsistency (on first render) between the 'selectorWidth'
    set inside the constructor and the computed value in the browser

If you want to know what I'm talking about, please see this pen, actually it's a pen from the creator of this lib ^^:

  • resize your browser to the smallest possible size
  • then refresh the page
  • you will notice an offset on the right side of the carousel items

This PR aims to fix this issue.

Hey there @pawelgrzybek, first, thanks for your carousel, it's pretty neat and clean :)
Do you think you could take a look at my PR and see if it's mergeable?

I am currently using siema for a project at work, and I encounter this problem quite often.
See this video to see what it looks like: https://streamable.com/dpb5a

method
- to avoid an inconsistency (on first render) between the 'selectorWidth'
  set inside the constructor and the computed value in the browser
@cheeseflavoredsnacks
Copy link

Hello, I have this exact same problem. I have no understanding of javascript modules or how to import/export them. If I understand this correctly, the file you're editing is some kind of "Module" that has to be converted to regular javascript so it can be used in a webpage, correct? Can someone do this fix then save it as a minified .js file for me to download? That would be helpful.

@Alx-l
Copy link
Author

Alx-l commented Apr 21, 2019

Hello @cheeseflavoredsnacks, you can check this codesandbox to get an idea of how to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants