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

[BUG] Responsive size calculation is buggy #149

Open
razzeee opened this issue Jun 25, 2023 · 1 comment · May be fixed by #152
Open

[BUG] Responsive size calculation is buggy #149

razzeee opened this issue Jun 25, 2023 · 1 comment · May be fixed by #152
Assignees
Labels
bug Something isn't working

Comments

@razzeee
Copy link

razzeee commented Jun 25, 2023

Describe the bug

It seems like the responsive size calculation doesn't run in some cases/stops at some sizes.

To Reproduce

  1. Go to https://yanivam.github.io/react-svg-worldmap/examples/text-labels/
  2. Change the width of your browser window (both up/down)

Expected behavior
It should not jump in sizes, but smoothly grow/shrink with the window.

It also seems to only start to calculate at some specific sizes, so if your with is too much, it never calculates the size it should be at?

And it breaks when it gets really small (which probably isn't unexpected, but I would have hoped for a smaller size)
image

Desktop (please complete the following information):

  • OS: Fedora 38
  • Browser: Tested chromium and firefox
@tobilg
Copy link

tobilg commented Jan 14, 2024

Having the same problem, https://github.com/yanivam/react-svg-worldmap/blob/main/lib/src/utils.ts#L30-L48 just calculates a 75% ratio of the window inner with, that has nothing to do with "responsiveness" honestly. It's not possible to dynamically enlarge to the given container size, e.g. with Tailwind. That's kind of an showstopper honestly.

@razzeee razzeee linked a pull request Jun 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants