-
Notifications
You must be signed in to change notification settings - Fork 282
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
Columns miscalculated due to rounding issue #314
Comments
This comment has been minimized.
This comment has been minimized.
This project is nearly feature complete. You're welcome to send a PR to fix this if it's actually still an issue. |
This comment has been minimized.
This comment has been minimized.
Wow. You are the epitome of why open source sucks. |
Shuffle is available to everyone for free, has been taken care of for over 8 years, and still this dude is here saying "How dare your FREE code not be perfectly up to my standards" while providing nothing himself. Honestly, who hurt you foxnoodles? Anyway, I couldn't reproduce this bug on my colleagues computer and the only difference I could think of is that I'm running a 1440p screen and he's running a 1080p one, but when I scaled down to 1080p it made no difference. I provided the "fix" in the hopes it would help with discovering what's wrong, but it's a good rule not to go editing scripts without knowing exactly what's going on, so I don't think a pull request makes sense unless people can verify that it is an issue with Shuffle and not with Chrome or some zoom/OS/pixel density situation. |
Thanks @Isaac-Hall :) |
Note the provided fix solves the issue for me.
…On Sun, 21 Feb. 2021, 05:04 Glen Cheney, ***@***.***> wrote:
Thanks @Isaac-Hall <https://github.com/Isaac-Hall> :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#314 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYUDDDSHNDHQ3EFTKPVS3TACH47ANCNFSM4OABDB4A>
.
|
Fixed with #351. Released in v5.4.1. |
Shuffle version
v5.2.2
Describe the bug
For some reason Chrome returns the value of testComputedSize() as 9.99982px instead of 10px, even though box-sizing is calculating the widths of the items properly, which means the padding gets added twice (once by box-sizing including the paddings in the getComputedStyle value, and once by your logic below that in getNumberStyle).
I had a hunch that Chrome is returning the value differently due to screen pixel density, all of my testing suggests otherwise. I have no idea why Chrome is behaving so weirdly. In any case, an easy fix is to change your value var in testComputerSize() function like this:
value = Math.round(getNumber(window.getComputedStyle(e, null).width)) === 10;
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: