Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Wrong rounding pixel to row #3

Open
iofjuupasli opened this issue Oct 20, 2017 · 0 comments
Open

Wrong rounding pixel to row #3

iofjuupasli opened this issue Oct 20, 2017 · 0 comments

Comments

@iofjuupasli
Copy link

return Math.floor(pixelPosition / this.defaultLineHeight)

My values:

pixelPosition: 959
this.defaultLineHeight: 25.238096237182617
pixelPosition / this.defaultLineHeight: 37.99811170333564
Math.floor(pixelPosition / this.defaultLineHeight): 37

It blocks scrolling in my case. I have custom dpi on screen, that maybe causing issue.

Maybe it would be better to use round instead of floor?

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

No branches or pull requests

1 participant