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

Issue 807 #825

Merged
merged 6 commits into from
Nov 30, 2021
Merged

Issue 807 #825

merged 6 commits into from
Nov 30, 2021

Conversation

billhails
Copy link
Contributor

fix issue #807

Floating point rounding error because offsetHeight and offsetWidth are already rounded to integers.

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.
@billhails
Copy link
Contributor Author

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.

@apetresc
Copy link
Member

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!

@billhails
Copy link
Contributor Author

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.

Copy link
Member

@apetresc apetresc left a 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)

@apetresc apetresc added this to the v0.52.1 milestone Nov 30, 2021
@apetresc
Copy link
Member

Fully confirmed this fix works.

@apetresc apetresc merged commit af3118d into SabakiHQ:master Nov 30, 2021
@billhails
Copy link
Contributor Author

Cool

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

Successfully merging this pull request may close these issues.

None yet

2 participants