-
-
Notifications
You must be signed in to change notification settings - Fork 379
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
Issue 807 #825
Issue 807 #825
Conversation
Added Yunzi theme.
fix issue SabakiHQ#807 element offsetWidth and offsetHeight are rounded to integers, which was causing off by one errors when further rounded to calculate top and left values. This fix uses the raw floating point width and height from getBoundingClientRect(). The jittering described in the issue is easily reproduced by resizing the developer window to squash the goban, certain sizes are problematic. I've not been able to reproduce the issue with this fix in place.
Not sure how to loose those spurious extra commits in the history, I thought merging your repo master to my fork master then merging my master onto my branch would do it, but it just made it worse 😁 There's only one commit. |
No worries, I can squash them all together when merging :) Just going to attempt to reproduce this fix locally - assuming it works, I'm really really appreciative you sleuthed this down! |
I can't take full credit, I showed the problem to some friends at work and one pointed me to the relevant code, his suggested fix (replace round with floor) wasn't quite right but it narrowed down my search considerably. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay good news - I finally was able to reproduce this after all. The fix seems to work! (Although it's hard to tell for 100% certain since it took my so long to reproduce in the first place)
Fully confirmed this fix works. |
Cool |
fix issue #807
Floating point rounding error because offsetHeight and offsetWidth are already rounded to integers.