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

translateDOMPositionXY.js and effects of translate3d in Chrome browser #273

Open
sergek opened this issue Nov 8, 2017 · 0 comments
Open

Comments

@sergek
Copy link

sergek commented Nov 8, 2017

Hello, I'm using a js module (it's basically a fork of fb fixed-data-table) that relies on fbjs translateDOMPositionXY.js for scrolling it's dom content.
https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/dom/translateDOMPositionXY.js

In Chrome for Mac Os translate3d is used and, when called with non-integer values, it causes the whole content of the moved element to appear blurred.

The effect can be mitigated by using only integer part of x/y value, i.e. parseInt() or bitwise for perf, or by rounding the value.
Also I see no positioning errors if only integer part of the value is used, but I can only test on Mac.

What do you think would be the best way to handle this? Is it OK to add the rounding to translate3d
in translateDOMPositionXY.js itself, or it's best to round the values higher in the code and only call translateDOMPositionXY() with integer values?

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

No branches or pull requests

1 participant