Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

floating-point rounding compensation to range-item width (#2092) #2107

Merged
merged 1 commit into from
Sep 20, 2016

Conversation

Iskander508
Copy link
Contributor

No description provided.

@mojoaxel
Copy link
Member

@Iskander508 Thanks very much! It looks like it works.
Just for my understanding: It looks to me like the box-width is now rounded up every time. Can this not result in an overlap of 1px sometimes?

@mojoaxel mojoaxel merged commit d9576be into almende:develop Sep 20, 2016
@Iskander508
Copy link
Contributor Author

Yes, that's right, neighboring ranges can overlap by 1 pixel. It is not the cleanest solution for sure.
The overlapping could happen even in the old version in some cases.
e.g.:
range A: start 0.7, end 2.4
range B: start 2.4, end 3.4

A:
start: 0.7 => 1
width: 2.4 - 0.7 = 1.7 => 2
end: => 3

B:
start: 2.4 => 2
width: 3.4 - 2.4 = 1.0 => 1
end: => 3

B is completely overlapped by A, no compensation used.

@Iskander508 Iskander508 deleted the fix/2092 branch September 20, 2016 14:38
@yotamberk
Copy link
Contributor

@mojoaxel this merge causes #2318. I don;t understand this PR and what it solved. Can you explain?
If this PR is important and we don't want to revert, we can solve #2318 by subtracting 0.5 a pixel in the start time.

@mojoaxel
Copy link
Member

@yotamberk This was a fix for #2092 . It basically numerically rounds up the item-width. It's very possible that this causes #2318 , but I see no good way to deal with that kind of numerical inaccuracy.

@yotamberk
Copy link
Contributor

@mojoaxel no problem. Now it's clear to me the importance of this PR.
There are way to overcome the overlapping as mentioned in the issue #2318

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

Successfully merging this pull request may close these issues.

3 participants